# Field exclude from analyzed

**URL:** <https://discuss.elastic.co/t/field-exclude-from-analyzed/4791>\
**Category:** Elasticsearch\
**Created:** [July 6, 2011, 1:10pm UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791 "2011-07-06T13:10:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 6, 2011, 1:10pm UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791/1 "2011-07-06T13:10:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 6, 2011, 4:14pm UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791/2 "2011-07-06T16:14:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 6, 2011, 6:42pm UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791/3 "2011-07-06T18:42:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 7, 2011, 2:18pm UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791/4 "2011-07-07T14:18:02Z")

</div>

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) ([mailto: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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:01am UTC](https://discuss.elastic.co/t/field-exclude-from-analyzed/4791/5 "2017-07-06T04:01:27Z")

</div>


