Hi there,
I need to use the count api for counting the document. and its
giving me the correct results if the use the string field in query. but if
i query in the numeric field, its giving 0 count always although, the
document count is not zero.
for example :
and two type of docs are
type :A
{
"title": "abc",
"state_guid": 15678}
type:B
{
name:"xyz",
state_guid: 15678}
if the query is this:
{"query":
{"term":
{state_guid:"15678"
}
}
}
so if the query is run on the type A, its giving correct count results ,
but zero in case of type: B
Can anyone please explain this and if possible please give the solution
without reindexing the data
On Friday, March 30, 2012 5:43:37 PM UTC+5:30, Narinder Kaur wrote:
Hi there,
I need to use the count api for counting the document. and its
giving me the correct results if the use the string field in query. but if
i query in the numeric field, its giving 0 count always although, the
document count is not zero.
for example :
and two type of docs are
type :A
{
"title": "abc",
"state_guid": 15678}
type:B
{
name:"xyz",
state_guid: "15678"}
if the query is this:
{"query":
{"term":
{state_guid:"15678"
}
}
}
so if the query is run on the type A, its giving correct count results ,
but zero in case of type: B
Can anyone please explain this and if possible please give the solution
without reindexing the data
Hi there,
I need to use the count api for counting the document. and its
giving me the correct results if the use the string field in query. but if
i query in the numeric field, its giving 0 count always although, the
document count is not zero.
for example :
and two type of docs are
type :A
{
"title": "abc",
"state_guid": 15678}
type:B
{
name:"xyz",
state_guid: 15678}
if the query is this:
{"query":
{"term":
{state_guid:"15678"
}
}
}
so if the query is run on the type A, its giving correct count results ,
but zero in case of type: B
Can anyone please explain this and if possible please give the solution
without reindexing the data
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.