# Does field value "it" carry special meaning?

**URL:** <https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046>\
**Category:** Elasticsearch\
**Created:** [March 6, 2011, 2:59pm UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046 "2011-03-06T14:59:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jae\_Lee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae_lee/32/3258_2.png) [@Jae\_Lee](https://discuss.elastic.co/u/Jae_Lee)\
**Post date:** [March 6, 2011, 2:59pm UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/1 "2011-03-06T14:59:37Z")

</div>

Hi

I'm finding this really weird but when I have a document like below indexed

{  
"site":"it",  
"message":"my site is it"  
}

{  
"site":"fr",  
"message":"my site is fr"  
}

post 127.0.0.1:9200 /index/type/\_search?size=10  
{"query":{"term":{"site":"it"}}}

returns me nothing where as

post 127.0.0.1:9200 /index/type/\_search?size=10  
{"query":{"term":{"site":"fr"}}}

returns me the 2nd document with message "my site is fr"

Is there any special thing about field value "it"?

J

---

<div class="post-metadata">

**Author:** ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)\
**Post date:** [March 6, 2011, 3:16pm UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/2 "2011-03-06T15:16:58Z")

</div>

Hi,

can it be removed during index analysis because "it" is a stopword whereas  
"fr" is not?

Regards,  
Lukas

On Sun, Mar 6, 2011 at 3:59 PM, Jae Lee [jlee119@gmail.com](mailto:jlee119@gmail.com) wrote:

> Hi
> 
> I'm finding this really weird but when I have a document like below indexed
> 
> {  
> "site":"it",  
> "message":"my site is it"  
> }
> 
> {  
> "site":"fr",  
> "message":"my site is fr"  
> }
> 
> post 127.0.0.1:9200 /index/type/\_search?size=10  
> {"query":{"term":{"site":"it"}}}
> 
> returns me nothing where as
> 
> post 127.0.0.1:9200 /index/type/\_search?size=10  
> {"query":{"term":{"site":"fr"}}}
> 
> returns me the 2nd document with message "my site is fr"
> 
> Is there any special thing about field value "it"?
> 
> J

---

<div class="post-metadata">

**Author:** ![Jae\_Lee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae_lee/32/3258_2.png) [@Jae\_Lee](https://discuss.elastic.co/u/Jae_Lee)\
**Post date:** [March 6, 2011, 4:24pm UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/3 "2011-03-06T16:24:35Z")

</div>

ah ok

yes you are right...

so what I didn't realise is that my field "index" property doesn't inherit  
from root object's "index" property.

my mapping for the index was

{

"type":

{

```
"index":"not_analyzed",

"properties":

{

  "site":{"type":"string"}

}

```

}

}

then when I changed it to

{

"type":

{

```
"properties":

{

  "site":{"type":"string","index":"not_analyzed"}

}

```

}

}

it started to return those document with site field value being "it"

ok I suppose I need to rely on dynamic templates to have default index  
settings to be "not\_analyzed" for string type field.

{"type":

{"dynamic\_templates":[

```
{"string_field":{

  "match":"*",

  "match_mapping_type":"string",

  "mapping":{

    "type":"string",

    "index":"not_analyzed"

  }

}}

```

]}

}

that probably work fine if you have enabled dynamic indexing...

what should I do if I have disabled dynamic indexing... would that leave me  
with setting index property to override the default setting for string  
field?

J

On Sun, Mar 6, 2011 at 3:16 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:

> Hi,
> 
> can it be removed during index analysis because "it" is a stopword whereas  
> "fr" is not?
> 
> Regards,  
> Lukas
> 
> On Sun, Mar 6, 2011 at 3:59 PM, Jae Lee [jlee119@gmail.com](mailto:jlee119@gmail.com) wrote:
> 
> > Hi
> > 
> > I'm finding this really weird but when I have a document like below  
> > indexed
> > 
> > {  
> > "site":"it",  
> > "message":"my site is it"  
> > }
> > 
> > {  
> > "site":"fr",  
> > "message":"my site is fr"  
> > }
> > 
> > post 127.0.0.1:9200 /index/type/\_search?size=10  
> > {"query":{"term":{"site":"it"}}}
> > 
> > returns me nothing where as
> > 
> > post 127.0.0.1:9200 /index/type/\_search?size=10  
> > {"query":{"term":{"site":"fr"}}}
> > 
> > returns me the 2nd document with message "my site is fr"
> > 
> > Is there any special thing about field value "it"?
> > 
> > J

---

<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:** [March 7, 2011, 4:30am UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/4 "2011-03-07T04:30:18Z")

</div>

Yes, you will have to set it explicitly on each one (at least thats how it works now).  
On Sunday, March 6, 2011 at 6:24 PM, Jae Lee wrote:

> ah ok
> 
> yes you are right...
> 
> so what I didn't realise is that my field "index" property doesn't inherit from root object's "index" property.
> 
> my mapping for the index was
> 
> {  
> "type":  
> {  
> "index":"not\_analyzed",  
> "properties":  
> {  
> "site":{"type":"string"}  
> }  
> }  
> }
> 
> then when I changed it to
> 
> {  
> "type":  
> {  
> "properties":  
> {  
> "site":{"type":"string","index":"not\_analyzed"}  
> }  
> }  
> }
> 
> it started to return those document with site field value being "it"
> 
> ok I suppose I need to rely on dynamic templates to have default index settings to be "not\_analyzed" for string type field.
> 
> {"type":  
> {"dynamic\_templates":[  
> {"string\_field":{  
> "match":"\*",  
> "match\_mapping\_type":"string",  
> "mapping":{  
> "type":"string",  
> "index":"not\_analyzed"  
> }  
> }}  
> ]}  
> }
> 
> that probably work fine if you have enabled dynamic indexing...
> 
> what should I do if I have disabled dynamic indexing... would that leave me with setting index property to override the default setting for string field?
> 
> J
> 
> On Sun, Mar 6, 2011 at 3:16 PM, LukÃ¡Å¡ VlÄek [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:
> 
> > Hi,
> > 
> > can it be removed during index analysis because "it" is a stopword whereas "fr" is not?
> > 
> > Regards,  
> > Lukas
> > 
> > On Sun, Mar 6, 2011 at 3:59 PM, Jae Lee [jlee119@gmail.com](mailto:jlee119@gmail.com) wrote:
> > 
> > > Hi
> > > 
> > > I'm finding this really weird but when I have a document like below indexed
> > > 
> > > {  
> > > "site":"it",  
> > > "message":"my site is it"  
> > > }
> > > 
> > > {  
> > > "site":"fr",  
> > > "message":"my site is fr"  
> > > }
> > > 
> > > post 127.0.0.1:9200 /index/type/\_search?size=10 {"query":{"term":{"site":"it"}}}
> > > 
> > > returns me nothing where as
> > > 
> > > post 127.0.0.1:9200 /index/type/\_search?size=10 {"query":{"term":{"site":"fr"}}}
> > > 
> > > returns me the 2nd document with message "my site is fr"
> > > 
> > > Is there any special thing about field value "it"?
> > > 
> > > J

---

<div class="post-metadata">

**Author:** ![Jae\_Lee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jae_lee/32/3258_2.png) [@Jae\_Lee](https://discuss.elastic.co/u/Jae_Lee)\
**Post date:** [March 8, 2011, 12:11pm UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/5 "2011-03-08T12:11:15Z")

</div>

ok thanks Shay

On Mon, Mar 7, 2011 at 4:30 AM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Yes, you will have to set it explicitly on each one (at least thats how  
> it works now).
> 
> On Sunday, March 6, 2011 at 6:24 PM, Jae Lee wrote:
> 
> ah ok
> 
> yes you are right...
> 
> so what I didn't realise is that my field "index" property doesn't inherit  
> from root object's "index" property.
> 
> my mapping for the index was
> 
> {
> 
> "type":
> 
> {
> 
> ```
> "index":"not_analyzed",
> 
> "properties":
> 
> {
> 
> "site":{"type":"string"}
> 
> }
> 
> ```
> 
> }
> 
> }
> 
> then when I changed it to
> 
> {
> 
> "type":
> 
> {
> 
> ```
> "properties":
> 
> {
> 
> "site":{"type":"string","index":"not_analyzed"}
> 
> }
> 
> ```
> 
> }
> 
> }
> 
> it started to return those document with site field value being "it"
> 
> ok I suppose I need to rely on dynamic templates to have default index  
> settings to be "not\_analyzed" for string type field.
> 
> {"type":
> 
> {"dynamic\_templates":[
> 
> ```
> {"string_field":{
> 
> "match":"*",
> 
> "match_mapping_type":"string",
> 
> "mapping":{
> 
> "type":"string",
> 
> "index":"not_analyzed"
> 
> }
> 
> }}
> 
> ```
> 
> ]}
> 
> }
> 
> that probably work fine if you have enabled dynamic indexing...
> 
> what should I do if I have disabled dynamic indexing... would that leave me  
> with setting index property to override the default setting for string  
> field?
> 
> J
> 
> On Sun, Mar 6, 2011 at 3:16 PM, Lukáš Vlček [lukas.vlcek@gmail.com](mailto:lukas.vlcek@gmail.com) wrote:
> 
> Hi,
> 
> can it be removed during index analysis because "it" is a stopword whereas  
> "fr" is not?
> 
> Regards,  
> Lukas
> 
> On Sun, Mar 6, 2011 at 3:59 PM, Jae Lee [jlee119@gmail.com](mailto:jlee119@gmail.com) wrote:
> 
> Hi
> 
> I'm finding this really weird but when I have a document like below indexed
> 
> {  
> "site":"it",  
> "message":"my site is it"  
> }
> 
> {  
> "site":"fr",  
> "message":"my site is fr"  
> }
> 
> post 127.0.0.1:9200 /index/type/\_search?size=10  
> {"query":{"term":{"site":"it"}}}
> 
> returns me nothing where as
> 
> post 127.0.0.1:9200 /index/type/\_search?size=10  
> {"query":{"term":{"site":"fr"}}}
> 
> returns me the 2nd document with message "my site is fr"
> 
> Is there any special thing about field value "it"?
> 
> J

---

<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:10am UTC](https://discuss.elastic.co/t/does-field-value-it-carry-special-meaning/4046/6 "2017-07-06T04:10:33Z")

</div>

Closed on July 6, 2017, 4:10am UTC


