# Terms Filter Help

**URL:** <https://discuss.elastic.co/t/terms-filter-help/7913>\
**Category:** Elasticsearch\
**Created:** [May 30, 2012, 2:26pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913 "2012-05-30T14:26:39Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 2:26pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/1 "2012-05-30T14:26:39Z")

</div>

I'm indexing user records. Within a user's record, there are 2 arrays  
holding connection IDs like this:

fb\_connections: ["1213", 12312", ...]  
linkedin\_connections: ["asdfas", "asdfasdf,...]

I'm attempting to use a filter, to only include the people that I'm  
connected to in the result set. This works fine for the "fb\_connections"  
query, but not for "linkedin\_connections". Using a "query\_string" filter,  
brings back the results, but not terms. Here are the tests:

_This does NOT work:_

{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"terms": {  
"linkedin\_id": [  
"KfotObi8Rj"  
]  
}  
}  
}  
}  
}

_This works:_  
\*  
\*  
{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"query": {  
"query\_string": {  
"query": "KfotObi8Rj"  
}  
}  
}  
}  
}  
}

Facebook user IDs are large numbers, which we store as strings  
("231234234345"), and linked in IDs are true strings, sometimes with  
symbols ("KfotObi8Rj").

Is there a reason that a terms filter wouldn't work with this type of data?

---

<div class="post-metadata">

**Author:** ![Tanguy1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tanguy1/32/1749_2.png) [@Tanguy1](https://discuss.elastic.co/u/Tanguy1)\
**Post date:** [May 30, 2012, 2:38pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/2 "2012-05-30T14:38:39Z")

</div>

I tried to reproduce, term filter works as expected. Maybe you specified a  
wrong field name linkedin\_id/linkedin\_connections?

This works:  
{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"terms": {  
"linkedin\_connections": [  
"asdfas"  
]  
}  
}  
}  
}  
}

-- Tanguy  
Twitter: @tlrx

Le mercredi 30 mai 2012 16:26:39 UTC+2, Brandon Hilkert a écrit :

> I'm indexing user records. Within a user's record, there are 2 arrays  
> holding connection IDs like this:
> 
> fb\_connections: ["1213", 12312", ...]  
> linkedin\_connections: ["asdfas", "asdfasdf,...]
> 
> I'm attempting to use a filter, to only include the people that I'm  
> connected to in the result set. This works fine for the "fb\_connections"  
> query, but not for "linkedin\_connections". Using a "query\_string" filter,  
> brings back the results, but not terms. Here are the tests:
> 
> _This does NOT work:_
> 
> {  
> "query": {  
> "filtered": {  
> "query": {  
> "match\_all": {}  
> },  
> "filter": {  
> "terms": {  
> "linkedin\_id": [  
> "KfotObi8Rj"  
> ]  
> }  
> }  
> }  
> }  
> }
> 
> _This works:_  
> \*  
> \*  
> {  
> "query": {  
> "filtered": {  
> "query": {  
> "match\_all": {}  
> },  
> "filter": {  
> "query": {  
> "query\_string": {  
> "query": "KfotObi8Rj"  
> }  
> }  
> }  
> }  
> }  
> }
> 
> Facebook user IDs are large numbers, which we store as strings  
> ("231234234345"), and linked in IDs are true strings, sometimes with  
> symbols ("KfotObi8Rj").
> 
> Is there a reason that a terms filter wouldn't work with this type of data?

---

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 3:01pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/3 "2012-05-30T15:01:13Z")

</div>

The field name "linkedin\_id" is the user's associated ID. The array  
"linkedin\_connections" contains a user's linkedin connections. Thus, I'd  
want to send the array of connections in as "terms" on the linkedin\_id  
field.

Actually, come to think of it...does the "terms" filter have to work on an  
array field?

Since Linkedin\_id is a string field, I want to only keep the results that  
have one of the elements of the array "linkedin\_connections" in the  
"linkedin\_id" field. Does this require that you use a "query" filter?

On Wednesday, May 30, 2012 10:38:39 AM UTC-4, Tanguy wrote:

> I tried to reproduce, term filter works as expected. Maybe you specified a  
> wrong field name linkedin\_id/linkedin\_connections?
> 
> This works:  
> {  
> "query": {  
> "filtered": {  
> "query": {  
> "match\_all": {}  
> },  
> "filter": {  
> "terms": {  
> "linkedin\_connections": [  
> "asdfas"  
> ]  
> }  
> }  
> }  
> }  
> }
> 
> -- Tanguy  
> Twitter: @tlrx
> 
> Le mercredi 30 mai 2012 16:26:39 UTC+2, Brandon Hilkert a écrit :
> 
> > I'm indexing user records. Within a user's record, there are 2 arrays  
> > holding connection IDs like this:
> > 
> > fb\_connections: ["1213", 12312", ...]  
> > linkedin\_connections: ["asdfas", "asdfasdf,...]
> > 
> > I'm attempting to use a filter, to only include the people that I'm  
> > connected to in the result set. This works fine for the "fb\_connections"  
> > query, but not for "linkedin\_connections". Using a "query\_string" filter,  
> > brings back the results, but not terms. Here are the tests:
> > 
> > _This does NOT work:_
> > 
> > {  
> > "query": {  
> > "filtered": {  
> > "query": {  
> > "match\_all": {}  
> > },  
> > "filter": {  
> > "terms": {  
> > "linkedin\_id": [  
> > "KfotObi8Rj"  
> > ]  
> > }  
> > }  
> > }  
> > }  
> > }
> > 
> > _This works:_  
> > \*  
> > \*  
> > {  
> > "query": {  
> > "filtered": {  
> > "query": {  
> > "match\_all": {}  
> > },  
> > "filter": {  
> > "query": {  
> > "query\_string": {  
> > "query": "KfotObi8Rj"  
> > }  
> > }  
> > }  
> > }  
> > }  
> > }
> > 
> > Facebook user IDs are large numbers, which we store as strings  
> > ("231234234345"), and linked in IDs are true strings, sometimes with  
> > symbols ("KfotObi8Rj").
> > 
> > Is there a reason that a terms filter wouldn't work with this type of  
> > data?

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 30, 2012, 3:03pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/4 "2012-05-30T15:03:11Z")

</div>

Just make sure your linkedin\_id is set to { index: not\_analyzed}

c

On Wed, 2012-05-30 at 08:01 -0700, Brandon Hilkert wrote:

> The field name "linkedin\_id" is the user's associated ID. The array  
> "linkedin\_connections" contains a user's linkedin connections. Thus,  
> I'd want to send the array of connections in as "terms" on the  
> linkedin\_id field.
> 
> Actually, come to think of it...does the "terms" filter have to work  
> on an array field?
> 
> Since Linkedin\_id is a string field, I want to only keep the results  
> that have one of the elements of the array "linkedin\_connections" in  
> the "linkedin\_id" field. Does this require that you use a "query"  
> filter?
> 
> On Wednesday, May 30, 2012 10:38:39 AM UTC-4, Tanguy wrote:  
> I tried to reproduce, term filter works as expected. Maybe you  
> specified a wrong field name linkedin\_id/linkedin\_connections?
> 
> ```
> This works:
> {
> "query": {
> "filtered": {
> "query": {
> "match_all": {}
> },
> "filter": {
> "terms": {
> "linkedin_connections": [
> "asdfas"
> ]
> }
> }
> }
> }
> }
>     
>     
> -- Tanguy
> Twitter: @tlrx
>     
> Le mercredi 30 mai 2012 16:26:39 UTC+2, Brandon Hilkert a
> Ã©crit :
> I'm indexing user records. Within a user's record,
> there are 2 arrays holding connection IDs like this:
>             
>             
> fb_connections: ["1213", 12312", ...]
> linkedin_connections: ["asdfas", "asdfasdf,...]
>             
>             
> I'm attempting to use a filter, to only include the
> people that I'm connected to in the result set. This
> works fine for the "fb_connections" query, but not for
> "linkedin_connections". Using a "query_string" filter,
> brings back the results, but not terms. Here are the
> tests:
>             
>             
> This does NOT work:
>             
>             
> {
> "query": {
> "filtered": {
> "query": {
> "match_all": {}
> },
> "filter": {
> "terms": {
> "linkedin_id": [
> "KfotObi8Rj"
> ]
> }
> }
> }
> }
> }
>             
>             
> This works:
>             
>             
> {
> "query": {
> "filtered": {
> "query": {
> "match_all": {}
> },
> "filter": {
> "query": {
> "query_string": {
> "query": "KfotObi8Rj"
> }
> }
> }
> }
> }
> }
>             
>             
> Facebook user IDs are large numbers, which we store as
> strings ("231234234345"), and linked in IDs are true
> strings, sometimes with symbols ("KfotObi8Rj").
>             
>             
> Is there a reason that a terms filter wouldn't work
> with this type of data?
> 
> ```

---

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 3:12pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/5 "2012-05-30T15:12:06Z")

</div>

Marking as "not\_analyzed", are you suggesting I use the "terms" filter, or  
"query" filter?

On Wednesday, May 30, 2012 11:03:11 AM UTC-4, Clinton Gormley wrote:

> Just make sure your linkedin\_id is set to { index: not\_analyzed}
> 
> c
> 
> On Wed, 2012-05-30 at 08:01 -0700, Brandon Hilkert wrote:
> 
> > The field name "linkedin\_id" is the user's associated ID. The array  
> > "linkedin\_connections" contains a user's linkedin connections. Thus,  
> > I'd want to send the array of connections in as "terms" on the  
> > linkedin\_id field.
> > 
> > Actually, come to think of it...does the "terms" filter have to work  
> > on an array field?
> > 
> > Since Linkedin\_id is a string field, I want to only keep the results  
> > that have one of the elements of the array "linkedin\_connections" in  
> > the "linkedin\_id" field. Does this require that you use a "query"  
> > filter?
> > 
> > On Wednesday, May 30, 2012 10:38:39 AM UTC-4, Tanguy wrote:  
> > I tried to reproduce, term filter works as expected. Maybe you  
> > specified a wrong field name linkedin\_id/linkedin\_connections?
> > 
> > ```
> > This works: 
> > { 
> > "query": { 
> > "filtered": { 
> > "query": { 
> > "match_all": {} 
> > }, 
> > "filter": { 
> > "terms": { 
> > "linkedin_connections": [ 
> > "asdfas" 
> > ] 
> > } 
> > } 
> > } 
> > } 
> > } 
> >     
> >     
> > -- Tanguy 
> > Twitter: @tlrx 
> >     
> > Le mercredi 30 mai 2012 16:26:39 UTC+2, Brandon Hilkert a 
> > écrit : 
> > I'm indexing user records. Within a user's record, 
> > there are 2 arrays holding connection IDs like this: 
> >             
> >             
> > fb_connections: ["1213", 12312", ...] 
> > linkedin_connections: ["asdfas", "asdfasdf,...] 
> >             
> >             
> > I'm attempting to use a filter, to only include the 
> > people that I'm connected to in the result set. This 
> > works fine for the "fb_connections" query, but not for 
> > "linkedin_connections". Using a "query_string" filter, 
> > brings back the results, but not terms. Here are the 
> > tests: 
> >             
> >             
> > This does NOT work: 
> >             
> >             
> > { 
> > "query": { 
> > "filtered": { 
> > "query": { 
> > "match_all": {} 
> > }, 
> > "filter": { 
> > "terms": { 
> > "linkedin_id": [ 
> > "KfotObi8Rj" 
> > ] 
> > } 
> > } 
> > } 
> > } 
> > } 
> >             
> >             
> > This works: 
> >             
> >             
> > { 
> > "query": { 
> > "filtered": { 
> > "query": { 
> > "match_all": {} 
> > }, 
> > "filter": { 
> > "query": { 
> > "query_string": { 
> > "query": "KfotObi8Rj" 
> > } 
> > } 
> > } 
> > } 
> > } 
> > } 
> >             
> >             
> > Facebook user IDs are large numbers, which we store as 
> > strings ("231234234345"), and linked in IDs are true 
> > strings, sometimes with symbols ("KfotObi8Rj"). 
> >             
> >             
> > Is there a reason that a terms filter wouldn't work 
> > with this type of data? 
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 3:45pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/6 "2012-05-30T15:45:11Z")

</div>

Turns out, it's down casing everything, so looking for the proper casing of  
the ID didn't return any results.

The query below, searches for both the regular case, along with the  
down-cased version and the down cased gets the result. Is there a way to  
turn this off so it doesn't do that?

{  
"query": {  
"filtered": {  
"query": {  
"match\_all": {}  
},  
"filter": {  
"terms": {  
"linkedin\_id": [  
"axXd7QNb8n",  
"axxd7qnb8n"  
]  
}  
}  
}  
}  
}

On Wednesday, May 30, 2012 11:12:06 AM UTC-4, Brandon Hilkert wrote:

> Marking as "not\_analyzed", are you suggesting I use the "terms" filter, or  
> "query" filter?
> 
> On Wednesday, May 30, 2012 11:03:11 AM UTC-4, Clinton Gormley wrote:
> 
> > Just make sure your linkedin\_id is set to { index: not\_analyzed}
> > 
> > c
> > 
> > On Wed, 2012-05-30 at 08:01 -0700, Brandon Hilkert wrote:
> > 
> > > The field name "linkedin\_id" is the user's associated ID. The array  
> > > "linkedin\_connections" contains a user's linkedin connections. Thus,  
> > > I'd want to send the array of connections in as "terms" on the  
> > > linkedin\_id field.
> > > 
> > > Actually, come to think of it...does the "terms" filter have to work  
> > > on an array field?
> > > 
> > > Since Linkedin\_id is a string field, I want to only keep the results  
> > > that have one of the elements of the array "linkedin\_connections" in  
> > > the "linkedin\_id" field. Does this require that you use a "query"  
> > > filter?
> > > 
> > > On Wednesday, May 30, 2012 10:38:39 AM UTC-4, Tanguy wrote:  
> > > I tried to reproduce, term filter works as expected. Maybe you  
> > > specified a wrong field name linkedin\_id/linkedin\_connections?
> > > 
> > > ```
> > > This works: 
> > > { 
> > > "query": { 
> > > "filtered": { 
> > > "query": { 
> > > "match_all": {} 
> > > }, 
> > > "filter": { 
> > > "terms": { 
> > > "linkedin_connections": [ 
> > > "asdfas" 
> > > ] 
> > > } 
> > > } 
> > > } 
> > > } 
> > > } 
> > >     
> > >     
> > > -- Tanguy 
> > > Twitter: @tlrx 
> > >     
> > > Le mercredi 30 mai 2012 16:26:39 UTC+2, Brandon Hilkert a 
> > > écrit : 
> > > I'm indexing user records. Within a user's record, 
> > > there are 2 arrays holding connection IDs like this: 
> > >             
> > >             
> > > fb_connections: ["1213", 12312", ...] 
> > > linkedin_connections: ["asdfas", "asdfasdf,...] 
> > >             
> > >             
> > > I'm attempting to use a filter, to only include the 
> > > people that I'm connected to in the result set. This 
> > > works fine for the "fb_connections" query, but not for 
> > > "linkedin_connections". Using a "query_string" filter, 
> > > brings back the results, but not terms. Here are the 
> > > tests: 
> > >             
> > >             
> > > This does NOT work: 
> > >             
> > >             
> > > { 
> > > "query": { 
> > > "filtered": { 
> > > "query": { 
> > > "match_all": {} 
> > > }, 
> > > "filter": { 
> > > "terms": { 
> > > "linkedin_id": [ 
> > > "KfotObi8Rj" 
> > > ] 
> > > } 
> > > } 
> > > } 
> > > } 
> > > } 
> > >             
> > >             
> > > This works: 
> > >             
> > >             
> > > { 
> > > "query": { 
> > > "filtered": { 
> > > "query": { 
> > > "match_all": {} 
> > > }, 
> > > "filter": { 
> > > "query": { 
> > > "query_string": { 
> > > "query": "KfotObi8Rj" 
> > > } 
> > > } 
> > > } 
> > > } 
> > > } 
> > > } 
> > >             
> > >             
> > > Facebook user IDs are large numbers, which we store as 
> > > strings ("231234234345"), and linked in IDs are true 
> > > strings, sometimes with symbols ("KfotObi8Rj"). 
> > >             
> > >             
> > > Is there a reason that a terms filter wouldn't work 
> > > with this type of data? 
> > > 
> > > ```

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 30, 2012, 3:47pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/7 "2012-05-30T15:47:53Z")

</div>

On Wed, 2012-05-30 at 08:45 -0700, Brandon Hilkert wrote:

> Turns out, it's down casing everything, so looking for the proper  
> casing of the ID didn't return any results.

> The query below, searches for both the regular case, along with the  
> down-cased version and the down cased gets the result. Is there a way  
> to turn this off so it doesn't do that?

I repeat 🙂

Just make sure your linkedin\_id is set to { index: not\_analyzed}

c

---

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 5:07pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/8 "2012-05-30T17:07:39Z")

</div>

Got it. Thanks!

Is there a way to see on ES if the field is analyzed?

I'm using the Tire Ruby gem and passing in :index =\> :not\_analyzed, but I'm  
not confident it's actually making the setting, because I'm not getting the  
results I expect from my program.

On Wednesday, May 30, 2012 11:47:53 AM UTC-4, Clinton Gormley wrote:

> On Wed, 2012-05-30 at 08:45 -0700, Brandon Hilkert wrote:
> 
> > Turns out, it's down casing everything, so looking for the proper  
> > casing of the ID didn't return any results.
> 
> > The query below, searches for both the regular case, along with the  
> > down-cased version and the down cased gets the result. Is there a way  
> > to turn this off so it doesn't do that?
> 
> I repeat 🙂
> 
> Just make sure your linkedin\_id is set to { index: not\_analyzed}
> 
> c

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 30, 2012, 5:09pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/9 "2012-05-30T17:09:57Z")

</div>

On Wed, 2012-05-30 at 10:07 -0700, Brandon Hilkert wrote:

> Got it. Thanks!
> 
> Is there a way to see on ES if the field is analyzed?

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

c

> I'm using the Tire Ruby gem and passing in :index =\> :not\_analyzed,  
> but I'm not confident it's actually making the setting, because I'm  
> not getting the results I expect from my program.
> 
> On Wednesday, May 30, 2012 11:47:53 AM UTC-4, Clinton Gormley wrote:  
> On Wed, 2012-05-30 at 08:45 -0700, Brandon Hilkert wrote:  
> \> Turns out, it's down casing everything, so looking for the  
> proper  
> \> casing of the ID didn't return any results.
> 
> ```
> > The query below, searches for both the regular case, along
> with the 
> > down-cased version and the down cased gets the result. Is
> there a way 
> > to turn this off so it doesn't do that? 
>     
> I repeat :) 
>     
> Just make sure your linkedin_id is set to { index:
> not_analyzed} 
>     
> c 
> 
> ```

---

<div class="post-metadata">

**Author:** ![Brandon\_Hilkert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_hilkert/32/2182_2.png) [@Brandon\_Hilkert](https://discuss.elastic.co/u/Brandon_Hilkert)\
**Post date:** [May 30, 2012, 5:13pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/10 "2012-05-30T17:13:46Z")

</div>

Did that. If there's nothing about analyzer, should I assume it's taking  
the defaults of being analyzed?

- }

- fb\_user\_id: {

- linkedin\_id: {

On Wednesday, May 30, 2012 1:09:57 PM UTC-4, Clinton Gormley wrote:

> On Wed, 2012-05-30 at 10:07 -0700, Brandon Hilkert wrote:
> 
> > Got it. Thanks!
> > 
> > Is there a way to see on ES if the field is analyzed?
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html)
> 
> c
> 
> > I'm using the Tire Ruby gem and passing in :index =\> :not\_analyzed,  
> > but I'm not confident it's actually making the setting, because I'm  
> > not getting the results I expect from my program.
> > 
> > On Wednesday, May 30, 2012 11:47:53 AM UTC-4, Clinton Gormley wrote:  
> > On Wed, 2012-05-30 at 08:45 -0700, Brandon Hilkert wrote:  
> > \> Turns out, it's down casing everything, so looking for the  
> > proper  
> > \> casing of the ID didn't return any results.
> > 
> > ```
> > > The query below, searches for both the regular case, along 
> > with the 
> > > down-cased version and the down cased gets the result. Is 
> > there a way 
> > > to turn this off so it doesn't do that? 
> >     
> > I repeat :) 
> >     
> > Just make sure your linkedin_id is set to { index: 
> > not_analyzed} 
> >     
> > c 
> > 
> > ```

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 30, 2012, 5:23pm UTC](https://discuss.elastic.co/t/terms-filter-help/7913/11 "2012-05-30T17:23:19Z")

</div>

On Wed, 2012-05-30 at 10:13 -0700, Brandon Hilkert wrote:

> Did that. If there's nothing about analyzer, should I assume it's  
> taking the defaults of being analyzed?

Yes, that's correct. Anything that isn't explicitly mentioned in the  
mapping is the default setting, and strings are analyzed by default

clint

> ```
> * }
> * fb_user_id: {
> * type: string
> }
> * linkedin_id: {
> * type: string
> }
> 
> ```
> 
> On Wednesday, May 30, 2012 1:09:57 PM UTC-4, Clinton Gormley wrote:  
> On Wed, 2012-05-30 at 10:07 -0700, Brandon Hilkert wrote:  
> \> Got it. Thanks!  
> \>  
> \>  
> \> Is there a way to see on ES if the field is analyzed?
> 
> ```
> http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html 
>     
> c 
>     
> > 
> > 
> > I'm using the Tire Ruby gem and passing in :index
> => :not_analyzed, 
> > but I'm not confident it's actually making the setting,
> because I'm 
> > not getting the results I expect from my program. 
> > 
> > On Wednesday, May 30, 2012 11:47:53 AM UTC-4, Clinton
> Gormley wrote: 
> > On Wed, 2012-05-30 at 08:45 -0700, Brandon Hilkert
> wrote: 
> > > Turns out, it's down casing everything, so looking
> for the 
> > proper 
> > > casing of the ID didn't return any results. 
> >         
> > > The query below, searches for both the regular
> case, along 
> > with the 
> > > down-cased version and the down cased gets the
> result. Is 
> > there a way 
> > > to turn this off so it doesn't do that? 
> >         
> > I repeat :) 
> >         
> > Just make sure your linkedin_id is set to { index: 
> > not_analyzed} 
> >         
> > c 
> >         
> >         
> >         
> 
> ```

---

<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, 3:26am UTC](https://discuss.elastic.co/t/terms-filter-help/7913/12 "2017-07-06T03:26:16Z")

</div>


