Field exclude from analyzed


(Kartavya) #1

Hi,

I have field value "-1" in document and when I search 1 it gives me that -1
document.
But i want to search exact value for -1.

Regards,
Pulkit Agrawal


(Shay Banon) #2

Can you post a curl sample for it? Does it find it in _all?

On Wednesday, July 6, 2011 at 4:10 PM, Pulkit Agrawal wrote:

Hi,

I have field value "-1" in document and when I search 1 it gives me that -1 document.
But i want to search exact value for -1.

Regards,
Pulkit Agrawal


(Kartavya) #3

Hi Shay,

You can find the curl below

"query":{"filtered":{
"query":{
"field":{"Data":"google"}
},
"filter":{
"and":[
{
"term": {"polarity":1}
}
]
}
}
}
}'

It gives me result for result for polarity value 1 and -1 as well. I have
-1,0,1 as possible values for the polarity.

Please help.

Regards,
Pulkit
On Wed, Jul 6, 2011 at 9:44 PM, Shay Banon shay.banon@elasticsearch.comwrote:

Can you post a curl sample for it? Does it find it in _all?

On Wednesday, July 6, 2011 at 4:10 PM, Pulkit Agrawal wrote:

Hi,

I have field value "-1" in document and when I search 1 it gives me that -1
document.
But i want to search exact value for -1.

Regards,
Pulkit Agrawal


(Shay Banon) #4

And the document that you index?

On Wednesday, July 6, 2011 at 9:42 PM, Pulkit Agrawal wrote:

Hi Shay,

You can find the curl below

"query":{"filtered":{
"query":{
"field":{"Data":"google"}
},
"filter":{
"and":[
{
"term": {"polarity":1}
}
]
}
}
}
}'

It gives me result for result for polarity value 1 and -1 as well. I have -1,0,1 as possible values for the polarity.

Please help.

Regards,
Pulkit
On Wed, Jul 6, 2011 at 9:44 PM, Shay Banon <shay.banon@elasticsearch.com (mailto:shay.banon@elasticsearch.com)> wrote:

Can you post a curl sample for it? Does it find it in _all?

On Wednesday, July 6, 2011 at 4:10 PM, Pulkit Agrawal wrote:

Hi,

I have field value "-1" in document and when I search 1 it gives me that -1 document.
But i want to search exact value for -1.

Regards,
Pulkit Agrawal


(system) #5