# My search results doesn't contain some of the documents that are present in the index

**URL:** <https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533>\
**Category:** Elasticsearch\
**Created:** [January 29, 2013, 1:16am UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533 "2013-01-29T01:16:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [January 29, 2013, 1:16am UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/1 "2013-01-29T01:16:15Z")

</div>

I have the following document in my index -

{  
"\_index" : "supplier",  
"\_type" : "0000016920",  
"\_id" : "37053.5138.32768.19768",  
"\_version" : 1,  
"exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
}

When I search for documents that starts with a\*, I am not finding this  
document in my search results.

[http://localhost:9200/supplier/0000016920/\_search?q=name:a\*&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:a*&pretty=true)

{  
"took" : 3,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "supplier",  
"\_type" : "0000016920",  
"\_id" : "37053.5138.23591.11163",  
"\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800","revision":"","description":"ADAPTER,MPTEE","current":"History","kindof":"Part"}  
} ]  
}  
}

Instead of the above query, if I  
try [http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)

I get the document in my result..

{  
"took" : 18,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 5,  
"successful" : 5,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 4.091176,  
"hits" : [ {  
"\_index" : "supplier",  
"\_type" : "0000016920",  
"\_id" : "37053.5138.32768.19768",  
"\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
} ]  
}  
}

I must be doing something stupid.. please tell me how to get this document  
["name":"A-0160-0163-1"] in my result set.

Here is my mapping:

```
"0000016920" : {
  "properties" : {
    "current" : {
      "type" : "string"
    },
    "description" : {
      "type" : "string"
    },
    "kindof" : {
      "type" : "string"
    },
    "name" : {
      "type" : "string",
      "store" : "yes"
    },
    "revision" : {
      "type" : "string"
    },
    "type" : {
      "type" : "string"
    }
  }
}

```

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![egaumer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/egaumer/32/2365_2.png) [@egaumer](https://discuss.elastic.co/u/egaumer)\
**Post date:** [January 29, 2013, 3:58am UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/2 "2013-01-29T03:58:01Z")

</div>

The string A-0160-0163-1 gets tokenized by the standard analyzer as...

t = [a, 0160, 0163, 1]

At which point, 'a' is an english stopword so it's removed by the 'stop  
token filter'.

> **[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.

On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:

> I have the following document in my index -
> 
> {  
> "\_index" : "supplier",  
> "\_type" : "0000016920",  
> "\_id" : "37053.5138.32768.19768",  
> "\_version" : 1,  
> "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
> }
> 
> When I search for documents that starts with a\*, I am not finding this  
> document in my search results.
> 
> [http://localhost:9200/supplier/0000016920/\_search?q=name:a\*&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:a*&pretty=true)
> 
> {  
> "took" : 3,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 1,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "supplier",  
> "\_type" : "0000016920",  
> "\_id" : "37053.5138.23591.11163",  
> "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800","revision":"","description":"ADAPTER,MPTEE","current":"History","kindof":"Part"}  
> } ]  
> }  
> }
> 
> Instead of the above query, if I try  
> [http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> 
> I get the document in my result..
> 
> {  
> "took" : 18,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 1,  
> "max\_score" : 4.091176,  
> "hits" : [ {  
> "\_index" : "supplier",  
> "\_type" : "0000016920",  
> "\_id" : "37053.5138.32768.19768",  
> "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
> } ]  
> }  
> }
> 
> I must be doing something stupid.. please tell me how to get this document  
> ["name":"A-0160-0163-1"] in my result set.
> 
> Here is my mapping:
> 
> ```
> "0000016920" : {
> "properties" : {
> "current" : {
> "type" : "string"
> },
> "description" : {
> "type" : "string"
> },
> "kindof" : {
> "type" : "string"
> },
> "name" : {
> "type" : "string",
> "store" : "yes"
> },
> "revision" : {
> "type" : "string"
> },
> "type" : {
> "type" : "string"
> }
> }
> }
> 
> ```
> 
> Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [January 29, 2013, 8:53pm UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/3 "2013-01-29T20:53:17Z")

</div>

Can this be solved by not analyzing this specific field, by changing my  
mapping to ..

"name" : {  
"type" : "string",  
"index" : "not\_analyzed"  
},

or some other means. This is a string field that can have alpha-numeric  
characters, "-". I need to make this field searchable as-is. It should not  
be tokenized.

On Monday, January 28, 2013 7:58:01 PM UTC-8, egaumer wrote:

> The string A-0160-0163-1 gets tokenized by the standard analyzer as...
> 
> t = [a, 0160, 0163, 1]
> 
> At which point, 'a' is an english stopword so it's removed by the 'stop  
> token filter'.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html)
> 
> On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:
> 
> > I have the following document in my index -
> > 
> > {  
> > "\_index" : "supplier",  
> > "\_type" : "0000016920",  
> > "\_id" : "37053.5138.32768.19768",  
> > "\_version" : 1,  
> > "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
> > }
> > 
> > When I search for documents that starts with a\*, I am not finding this  
> > document in my search results.
> > 
> > [http://localhost:9200/supplier/0000016920/\_search?q=name:a\*&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:a*&pretty=true)
> > 
> > {  
> > "took" : 3,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 5,  
> > "successful" : 5,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 1,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "supplier",  
> > "\_type" : "0000016920",  
> > "\_id" : "37053.5138.23591.11163",  
> > "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800","revision":"","description":"ADAPTER,MPTEE","current":"History","kindof":"Part"}  
> > } ]  
> > }  
> > }
> > 
> > Instead of the above query, if I try  
> > [http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> > 
> > I get the document in my result..
> > 
> > {  
> > "took" : 18,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 5,  
> > "successful" : 5,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 1,  
> > "max\_score" : 4.091176,  
> > "hits" : [ {  
> > "\_index" : "supplier",  
> > "\_type" : "0000016920",  
> > "\_id" : "37053.5138.32768.19768",  
> > "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-0163-1","revision":"B","description":"Migrated from HPP PDM","current":"Approved","kindof":"DOCUMENTS"}  
> > } ]  
> > }  
> > }
> > 
> > I must be doing something stupid.. please tell me how to get this  
> > document ["name":"A-0160-0163-1"] in my result set.
> > 
> > Here is my mapping:
> > 
> > ```
> > "0000016920" : {
> > "properties" : {
> > "current" : {
> > "type" : "string"
> > },
> > "description" : {
> > "type" : "string"
> > },
> > "kindof" : {
> > "type" : "string"
> > },
> > "name" : {
> > "type" : "string",
> > "store" : "yes"
> > },
> > "revision" : {
> > "type" : "string"
> > },
> > "type" : {
> > "type" : "string"
> > }
> > }
> > }
> > 
> > ```
> > 
> > Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mattweber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattweber/32/44940_2.png) [@mattweber](https://discuss.elastic.co/u/mattweber)\
**Post date:** [January 29, 2013, 9:01pm UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/4 "2013-01-29T21:01:16Z")

</div>

Yes, you should set it to not\_analyzed.

On Tue, Jan 29, 2013 at 12:53 PM, Mxims [renjith.ck@gmail.com](mailto:renjith.ck@gmail.com) wrote:

> Can this be solved by not analyzing this specific field, by changing my  
> mapping to ..
> 
> "name" : {  
> "type" : "string",  
> "index" : "not\_analyzed"  
> },
> 
> or some other means. This is a string field that can have alpha-numeric  
> characters, "-". I need to make this field searchable as-is. It should not  
> be tokenized.
> 
> On Monday, January 28, 2013 7:58:01 PM UTC-8, egaumer wrote:
> 
> > The string A-0160-0163-1 gets tokenized by the standard analyzer as...
> > 
> > t = [a, 0160, 0163, 1]
> > 
> > At which point, 'a' is an english stopword so it's removed by the 'stop  
> > token filter'.
> > 
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/**guide/reference/index-modules/)\*\*  
> > analysis/stop-tokenfilter.html[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html)
> > 
> > On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:
> > 
> > > I have the following document in my index -
> > > 
> > > {  
> > > "\_index" : "supplier",  
> > > "\_type" : "0000016920",  
> > > "\_id" : "37053.5138.32768.19768",  
> > > "\_version" : 1,  
> > > "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*0163-1","revision":"B","\*\*description":"Migrated from HPP PDM","current":"Approved","\*\*kindof":"DOCUMENTS"}  
> > > }
> > > 
> > > When I search for documents that starts with a\*, I am not finding this  
> > > document in my search results.
> > > 
> > > [http://localhost:9200/\*\*supplier/0000016920/\_search?q=\*\*name](http://localhost:9200/ **supplier/0000016920/_search?q=** name)[http://localhost:9200/supplier/0000016920/\_search?q=name](http://localhost:9200/supplier/0000016920/_search?q=name)  
> > > :a\*&pretty=true
> > > 
> > > {  
> > > "took" : 3,  
> > > "timed\_out" : false,  
> > > "\_shards" : {  
> > > "total" : 5,  
> > > "successful" : 5,  
> > > "failed" : 0  
> > > },  
> > > "hits" : {  
> > > "total" : 1,  
> > > "max\_score" : 1.0,  
> > > "hits" : [ {  
> > > "\_index" : "supplier",  
> > > "\_type" : "0000016920",  
> > > "\_id" : "37053.5138.23591.11163",  
> > > "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800","\*\*revision":"","description":"\*\*ADAPTER,MPTEE","current":"\*\*History","kindof":"Part"}  
> > > } ]  
> > > }  
> > > }
> > > 
> > > Instead of the above query, if I try [http://localhost:9200/](http://localhost:9200/)\*\*  
> > > supplier/0000016920/\_search?q=\*\*name:0160&pretty=true[http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> > > 
> > > I get the document in my result..
> > > 
> > > {  
> > > "took" : 18,  
> > > "timed\_out" : false,  
> > > "\_shards" : {  
> > > "total" : 5,  
> > > "successful" : 5,  
> > > "failed" : 0  
> > > },  
> > > "hits" : {  
> > > "total" : 1,  
> > > "max\_score" : 4.091176,  
> > > "hits" : [ {  
> > > "\_index" : "supplier",  
> > > "\_type" : "0000016920",  
> > > "\_id" : "37053.5138.32768.19768",  
> > > "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*0163-1","revision":"B","\*\*description":"Migrated from HPP PDM","current":"Approved","\*\*kindof":"DOCUMENTS"}  
> > > } ]  
> > > }  
> > > }
> > > 
> > > I must be doing something stupid.. please tell me how to get this  
> > > document ["name":"A-0160-0163-1"] in my result set.
> > > 
> > > Here is my mapping:
> > > 
> > > ```
> > > "0000016920" : {
> > > "properties" : {
> > > "current" : {
> > > "type" : "string"
> > > },
> > > "description" : {
> > > "type" : "string"
> > > },
> > > "kindof" : {
> > > "type" : "string"
> > > },
> > > "name" : {
> > > "type" : "string",
> > > "store" : "yes"
> > > },
> > > "revision" : {
> > > "type" : "string"
> > > },
> > > "type" : {
> > > "type" : "string"
> > > }
> > > }
> > > }
> > > 
> > > ```
> > > 
> > > Thanks
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [January 29, 2013, 9:09pm UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/5 "2013-01-29T21:09:50Z")

</div>

Thank you Matt & Eric for your kind help.

If I make a field not\_analyzed, would it cause any performance issues to  
the overall search?

Thanks

On Tuesday, January 29, 2013 1:01:16 PM UTC-8, Matt Weber wrote:

> Yes, you should set it to not\_analyzed.
> 
> On Tue, Jan 29, 2013 at 12:53 PM, Mxims \<[renji...@gmail.com](mailto:renji...@gmail.com) \<javascript:\>\>wrote:
> 
> > Can this be solved by not analyzing this specific field, by changing my  
> > mapping to ..
> > 
> > "name" : {  
> > "type" : "string",  
> > "index" : "not\_analyzed"  
> > },
> > 
> > or some other means. This is a string field that can have alpha-numeric  
> > characters, "-". I need to make this field searchable as-is. It should not  
> > be tokenized.
> > 
> > On Monday, January 28, 2013 7:58:01 PM UTC-8, egaumer wrote:
> > 
> > > The string A-0160-0163-1 gets tokenized by the standard analyzer as...
> > > 
> > > t = [a, 0160, 0163, 1]
> > > 
> > > At which point, 'a' is an english stopword so it's removed by the 'stop  
> > > token filter'.
> > > 
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/**guide/reference/index-modules/)\*\*  
> > > analysis/stop-tokenfilter.html[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html)
> > > 
> > > On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:
> > > 
> > > > I have the following document in my index -
> > > > 
> > > > {  
> > > > "\_index" : "supplier",  
> > > > "\_type" : "0000016920",  
> > > > "\_id" : "37053.5138.32768.19768",  
> > > > "\_version" : 1,  
> > > > "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*0163-1","revision":"B","\*\*description":"Migrated from HPP PDM","current":"Approved","\*\*kindof":"DOCUMENTS"}  
> > > > }
> > > > 
> > > > When I search for documents that starts with a\*, I am not finding this  
> > > > document in my search results.
> > > > 
> > > > [http://localhost:9200/\*\*supplier/0000016920/\_search?q=\*\*name](http://localhost:9200/ **supplier/0000016920/_search?q=** name)[http://localhost:9200/supplier/0000016920/\_search?q=name](http://localhost:9200/supplier/0000016920/_search?q=name)  
> > > > :a\*&pretty=true
> > > > 
> > > > {  
> > > > "took" : 3,  
> > > > "timed\_out" : false,  
> > > > "\_shards" : {  
> > > > "total" : 5,  
> > > > "successful" : 5,  
> > > > "failed" : 0  
> > > > },  
> > > > "hits" : {  
> > > > "total" : 1,  
> > > > "max\_score" : 1.0,  
> > > > "hits" : [ {  
> > > > "\_index" : "supplier",  
> > > > "\_type" : "0000016920",  
> > > > "\_id" : "37053.5138.23591.11163",  
> > > > "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800","\*\*revision":"","description":"\*\*ADAPTER,MPTEE","current":"\*\*History","kindof":"Part"}  
> > > > } ]  
> > > > }  
> > > > }
> > > > 
> > > > Instead of the above query, if I try [http://localhost:9200/](http://localhost:9200/)\*\*  
> > > > supplier/0000016920/\_search?q=\*\*name:0160&pretty=true[http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> > > > 
> > > > I get the document in my result..
> > > > 
> > > > {  
> > > > "took" : 18,  
> > > > "timed\_out" : false,  
> > > > "\_shards" : {  
> > > > "total" : 5,  
> > > > "successful" : 5,  
> > > > "failed" : 0  
> > > > },  
> > > > "hits" : {  
> > > > "total" : 1,  
> > > > "max\_score" : 4.091176,  
> > > > "hits" : [ {  
> > > > "\_index" : "supplier",  
> > > > "\_type" : "0000016920",  
> > > > "\_id" : "37053.5138.32768.19768",  
> > > > "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*0163-1","revision":"B","\*\*description":"Migrated from HPP PDM","current":"Approved","\*\*kindof":"DOCUMENTS"}  
> > > > } ]  
> > > > }  
> > > > }
> > > > 
> > > > I must be doing something stupid.. please tell me how to get this  
> > > > document ["name":"A-0160-0163-1"] in my result set.
> > > > 
> > > > Here is my mapping:
> > > > 
> > > > ```
> > > > "0000016920" : {
> > > > "properties" : {
> > > > "current" : {
> > > > "type" : "string"
> > > > },
> > > > "description" : {
> > > > "type" : "string"
> > > > },
> > > > "kindof" : {
> > > > "type" : "string"
> > > > },
> > > > "name" : {
> > > > "type" : "string",
> > > > "store" : "yes"
> > > > },
> > > > "revision" : {
> > > > "type" : "string"
> > > > },
> > > > "type" : {
> > > > "type" : "string"
> > > > }
> > > > }
> > > > }
> > > > 
> > > > ```
> > > > 
> > > > Thanks
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google Groups  
> > > > "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![mattweber](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattweber/32/44940_2.png) [@mattweber](https://discuss.elastic.co/u/mattweber)\
**Post date:** [January 29, 2013, 9:20pm UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/6 "2013-01-29T21:20:53Z")

</div>

No, performance will not be affected.

On Tue, Jan 29, 2013 at 1:09 PM, Mxims [renjith.ck@gmail.com](mailto:renjith.ck@gmail.com) wrote:

> Thank you Matt & Eric for your kind help.
> 
> If I make a field not\_analyzed, would it cause any performance issues to  
> the overall search?
> 
> Thanks
> 
> On Tuesday, January 29, 2013 1:01:16 PM UTC-8, Matt Weber wrote:
> 
> > Yes, you should set it to not\_analyzed.
> > 
> > On Tue, Jan 29, 2013 at 12:53 PM, Mxims [renji...@gmail.com](mailto:renji...@gmail.com) wrote:
> > 
> > > Can this be solved by not analyzing this specific field, by changing my  
> > > mapping to ..
> > > 
> > > "name" : {  
> > > "type" : "string",  
> > > "index" : "not\_analyzed"  
> > > },
> > > 
> > > or some other means. This is a string field that can have alpha-numeric  
> > > characters, "-". I need to make this field searchable as-is. It should not  
> > > be tokenized.
> > > 
> > > On Monday, January 28, 2013 7:58:01 PM UTC-8, egaumer wrote:
> > > 
> > > > The string A-0160-0163-1 gets tokenized by the standard analyzer as...
> > > > 
> > > > t = [a, 0160, 0163, 1]
> > > > 
> > > > At which point, 'a' is an english stopword so it's removed by the  
> > > > 'stop token filter'.
> > > > 
> > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/ **g** uide/reference/index-modules/**a)\*\*  
> > > > nalysis/stop-tokenfilter.html[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html)
> > > > 
> > > > On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:
> > > > 
> > > > > I have the following document in my index -
> > > > > 
> > > > > {  
> > > > > "\_index" : "supplier",  
> > > > > "\_type" : "0000016920",  
> > > > > "\_id" : "37053.5138.32768.19768",  
> > > > > "\_version" : 1,  
> > > > > "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*\*\*0163-1","revision":"B"," **descri** ption":"Migrated from HPP PDM","current":"Approved"," **kin** dof":"DOCUMENTS"}  
> > > > > }
> > > > > 
> > > > > When I search for documents that starts with a\*, I am not finding  
> > > > > this document in my search results.
> > > > > 
> > > > > [http://localhost:9200/\*\*supplier\*\*/0000016920/\_search?q=\*\*name](http://localhost:9200/ **supplier** /0000016920/_search?q=**name)[http://localhost:9200/supplier/0000016920/\_search?q=name](http://localhost:9200/supplier/0000016920/_search?q=name)  
> > > > > :a\*&\*\*pretty=true
> > > > > 
> > > > > {  
> > > > > "took" : 3,  
> > > > > "timed\_out" : false,  
> > > > > "\_shards" : {  
> > > > > "total" : 5,  
> > > > > "successful" : 5,  
> > > > > "failed" : 0  
> > > > > },  
> > > > > "hits" : {  
> > > > > "total" : 1,  
> > > > > "max\_score" : 1.0,  
> > > > > "hits" : [ {  
> > > > > "\_index" : "supplier",  
> > > > > "\_type" : "0000016920",  
> > > > > "\_id" : "37053.5138.23591.11163",  
> > > > > "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800"," **r** evision":"","description":" **ADA** PTER,MPTEE","current":" **History**","kindof":"Part"}  
> > > > > } ]  
> > > > > }  
> > > > > }
> > > > > 
> > > > > Instead of the above query, if I try [http://localhost:9200/\*\*supp](http://localhost:9200/**supp)\*\*  
> > > > > lier/0000016920/\_search?q= **name** :0160&pretty=true[http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> > > > > 
> > > > > I get the document in my result..
> > > > > 
> > > > > {  
> > > > > "took" : 18,  
> > > > > "timed\_out" : false,  
> > > > > "\_shards" : {  
> > > > > "total" : 5,  
> > > > > "successful" : 5,  
> > > > > "failed" : 0  
> > > > > },  
> > > > > "hits" : {  
> > > > > "total" : 1,  
> > > > > "max\_score" : 4.091176,  
> > > > > "hits" : [ {  
> > > > > "\_index" : "supplier",  
> > > > > "\_type" : "0000016920",  
> > > > > "\_id" : "37053.5138.32768.19768",  
> > > > > "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*\*\*0163-1","revision":"B"," **descri** ption":"Migrated from HPP PDM","current":"Approved"," **kin** dof":"DOCUMENTS"}  
> > > > > } ]  
> > > > > }  
> > > > > }
> > > > > 
> > > > > I must be doing something stupid.. please tell me how to get this  
> > > > > document ["name":"A-0160-0163-1"] in my result set.
> > > > > 
> > > > > Here is my mapping:
> > > > > 
> > > > > ```
> > > > > "0000016920" : {
> > > > > "properties" : {
> > > > > "current" : {
> > > > > "type" : "string"
> > > > > },
> > > > > "description" : {
> > > > > "type" : "string"
> > > > > },
> > > > > "kindof" : {
> > > > > "type" : "string"
> > > > > },
> > > > > "name" : {
> > > > > "type" : "string",
> > > > > "store" : "yes"
> > > > > },
> > > > > "revision" : {
> > > > > "type" : "string"
> > > > > },
> > > > > "type" : {
> > > > > "type" : "string"
> > > > > }
> > > > > }
> > > > > }
> > > > > 
> > > > > ```
> > > > > 
> > > > > Thanks
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to the Google  
> > > > > Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > .
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mxims\_2](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mxims\_2](https://discuss.elastic.co/u/Mxims_2)\
**Post date:** [January 29, 2013, 9:30pm UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/7 "2013-01-29T21:30:16Z")

</div>

Thank you!

On Tuesday, January 29, 2013 1:20:53 PM UTC-8, Matt Weber wrote:

> No, performance will not be affected.
> 
> On Tue, Jan 29, 2013 at 1:09 PM, Mxims \<[renji...@gmail.com](mailto:renji...@gmail.com) \<javascript:\>\>wrote:
> 
> > Thank you Matt & Eric for your kind help.
> > 
> > If I make a field not\_analyzed, would it cause any performance issues to  
> > the overall search?
> > 
> > Thanks
> > 
> > On Tuesday, January 29, 2013 1:01:16 PM UTC-8, Matt Weber wrote:
> > 
> > > Yes, you should set it to not\_analyzed.
> > > 
> > > On Tue, Jan 29, 2013 at 12:53 PM, Mxims [renji...@gmail.com](mailto:renji...@gmail.com) wrote:
> > > 
> > > > Can this be solved by not analyzing this specific field, by changing my  
> > > > mapping to ..
> > > > 
> > > > "name" : {  
> > > > "type" : "string",  
> > > > "index" : "not\_analyzed"  
> > > > },
> > > > 
> > > > or some other means. This is a string field that can have alpha-numeric  
> > > > characters, "-". I need to make this field searchable as-is. It should not  
> > > > be tokenized.
> > > > 
> > > > On Monday, January 28, 2013 7:58:01 PM UTC-8, egaumer wrote:
> > > > 
> > > > > The string A-0160-0163-1 gets tokenized by the standard analyzer as...
> > > > > 
> > > > > t = [a, 0160, 0163, 1]
> > > > > 
> > > > > At which point, 'a' is an english stopword so it's removed by the  
> > > > > 'stop token filter'.
> > > > > 
> > > > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/ **g** uide/reference/index-modules/**a)\*\*  
> > > > > nalysis/stop-tokenfilter.html[http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html](http://www.elasticsearch.org/guide/reference/index-modules/analysis/stop-tokenfilter.html)
> > > > > 
> > > > > On Monday, January 28, 2013 8:16:15 PM UTC-5, Mxims wrote:
> > > > > 
> > > > > > I have the following document in my index -
> > > > > > 
> > > > > > {  
> > > > > > "\_index" : "supplier",  
> > > > > > "\_type" : "0000016920",  
> > > > > > "\_id" : "37053.5138.32768.19768",  
> > > > > > "\_version" : 1,  
> > > > > > "exists" : true, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*\*\*0163-1","revision":"B"," **descri** ption":"Migrated from HPP PDM","current":"Approved"," **kin** dof":"DOCUMENTS"}  
> > > > > > }
> > > > > > 
> > > > > > When I search for documents that starts with a\*, I am not finding  
> > > > > > this document in my search results.
> > > > > > 
> > > > > > [http://localhost:9200/\*\*supplier\*\*/0000016920/\_search?q=\*\*name](http://localhost:9200/ **supplier** /0000016920/_search?q=**name)[http://localhost:9200/supplier/0000016920/\_search?q=name](http://localhost:9200/supplier/0000016920/_search?q=name)  
> > > > > > :a\*&\*\*pretty=true
> > > > > > 
> > > > > > {  
> > > > > > "took" : 3,  
> > > > > > "timed\_out" : false,  
> > > > > > "\_shards" : {  
> > > > > > "total" : 5,  
> > > > > > "successful" : 5,  
> > > > > > "failed" : 0  
> > > > > > },  
> > > > > > "hits" : {  
> > > > > > "total" : 1,  
> > > > > > "max\_score" : 1.0,  
> > > > > > "hits" : [ {  
> > > > > > "\_index" : "supplier",  
> > > > > > "\_type" : "0000016920",  
> > > > > > "\_id" : "37053.5138.23591.11163",  
> > > > > > "\_score" : 1.0, "\_source" : {"type":"Historical ATL Part","name":"A70-04-23800"," **r** evision":"","description":" **ADA** PTER,MPTEE","current":" **History**","kindof":"Part"}  
> > > > > > } ]  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > Instead of the above query, if I try [http://localhost:9200/\*\*supp](http://localhost:9200/**supp)\*\*  
> > > > > > lier/0000016920/\_search?q= **name** :0160&pretty=true[http://localhost:9200/supplier/0000016920/\_search?q=name:0160&pretty=true](http://localhost:9200/supplier/0000016920/_search?q=name:0160&pretty=true)
> > > > > > 
> > > > > > I get the document in my result..
> > > > > > 
> > > > > > {  
> > > > > > "took" : 18,  
> > > > > > "timed\_out" : false,  
> > > > > > "\_shards" : {  
> > > > > > "total" : 5,  
> > > > > > "successful" : 5,  
> > > > > > "failed" : 0  
> > > > > > },  
> > > > > > "hits" : {  
> > > > > > "total" : 1,  
> > > > > > "max\_score" : 4.091176,  
> > > > > > "hits" : [ {  
> > > > > > "\_index" : "supplier",  
> > > > > > "\_type" : "0000016920",  
> > > > > > "\_id" : "37053.5138.32768.19768",  
> > > > > > "\_score" : 4.091176, "\_source" : {"type":"Characteristic Specification","name":"A-0160-\*\*\*\*0163-1","revision":"B"," **descri** ption":"Migrated from HPP PDM","current":"Approved"," **kin** dof":"DOCUMENTS"}  
> > > > > > } ]  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > I must be doing something stupid.. please tell me how to get this  
> > > > > > document ["name":"A-0160-0163-1"] in my result set.
> > > > > > 
> > > > > > Here is my mapping:
> > > > > > 
> > > > > > ```
> > > > > > "0000016920" : {
> > > > > > "properties" : {
> > > > > > "current" : {
> > > > > > "type" : "string"
> > > > > > },
> > > > > > "description" : {
> > > > > > "type" : "string"
> > > > > > },
> > > > > > "kindof" : {
> > > > > > "type" : "string"
> > > > > > },
> > > > > > "name" : {
> > > > > > "type" : "string",
> > > > > > "store" : "yes"
> > > > > > },
> > > > > > "revision" : {
> > > > > > "type" : "string"
> > > > > > },
> > > > > > "type" : {
> > > > > > "type" : "string"
> > > > > > }
> > > > > > }
> > > > > > }
> > > > > > 
> > > > > > ```
> > > > > > 
> > > > > > Thanks
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to the Google  
> > > > > > Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > > > an email to elasticsearc...@\*\*[googlegroups.com](http://googlegroups.com).
> > > > 
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:54am UTC](https://discuss.elastic.co/t/my-search-results-doesnt-contain-some-of-the-documents-that-are-present-in-the-index/10533/8 "2017-07-06T02:54:07Z")

</div>


