# Exempt index from \_search endpoint

**URL:** <https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375>\
**Category:** Elasticsearch\
**Created:** [June 12, 2013, 9:10am UTC](https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375 "2013-06-12T09:10:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Kinsalb](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Chris\_Kinsalb](https://discuss.elastic.co/u/Chris_Kinsalb)\
**Post date:** [June 12, 2013, 9:10am UTC](https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375/1 "2013-06-12T09:10:47Z")

</div>

Hello Group,

Is there a way to exempt an index from the \_search endpoint when posting  
requests to

[http://localhost:9200/\_search](http://localhost:9200/_search)

?

Reason: elasticsearch reports errors on the \_percolator index when  
performing facet searches. Example:

curl -XPOST [http://localhost:9200/\_search](http://localhost:9200/_search) -d '  
{  
"query": {  
"filtered": {  
"filter": {  
"and": [  
{  
"term": {  
"@ns": "testicus"  
}  
},  
{  
"term": {  
"@ac": "yute"  
}  
}  
]  
}  
}  
},  
"facets": {  
"terms:@fields.tag": {  
"terms": {  
"field": "@fields.tag"  
}  
}  
},  
"size": 0  
}'

Result:

{  
"took": 6,  
"timed\_out": false,  
"\_shards": {  
"total": 2,  
"successful": 1,  
"failed": 1,  
"failures": [  
{  
"index": "\_percolator",  
"shard": 0,  
"status": 400,  
"reason": "SearchParseException[[\_percolator][0]:  
query[ConstantScore(+cache(@ns:testicus)  
+cache(@ac:yute))],from[-1],size[-1]: Parse Failure [Failed to parse source  
[{\n "query": {\n "filtered": {\n "filter": {\n  
"and": [\n {\n "term": {\n "@ns":  
"testicus"\n }\n },\n {\n  
"term": {\n "@ac": "yute"\n }\n  
}\n ]\n }\n }\n },\n "facets": {\n  
"terms:@fields.tag": {\n "terms": {\n "field":  
"@fields.tag"\n }\n }\n },\n "size": 0\n}\n]]]; nested:  
FacetPhaseExecutionException[Facet [terms:@fields.tag]: failed to find  
mapping for [@fields.tag]]; "  
}  
]  
},  
"hits": {  
"total": 74074,  
"max\_score": 1.0,  
"hits": []  
},  
"facets": {  
"terms:@fields.tag": {  
"\_type": "terms",  
"missing": 0,  
"total": 74074,  
"other": 0,  
"terms": [  
{  
"term": "tag\_1",  
"count": 12428  
},  
{  
"term": "tag\_2",  
"count": 12414  
},  
...  
..  
]  
}  
}  
}

So what I'd like to do is something like this:

curl -XPOST '[http://localhost:9200/all](http://localhost:9200/all), !\_percolator)/\_search' -d '{.....}'

How can this be achieved?

Cheers,

- Chris

--  
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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 16, 2013, 5:54pm UTC](https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375/2 "2013-06-16T17:54:55Z")

</div>

Hey,

have you seen [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/multi-index/which)  
includes the possibility to exclude indices.  
localhost:9200/-percolator/\_search

should do what you want.

--Alex

On Wed, Jun 12, 2013 at 11:10 AM, Chris Kinsalb [hc.kinsalb@gmail.com](mailto:hc.kinsalb@gmail.com)wrote:

> Hello Group,
> 
> Is there a way to exempt an index from the \_search endpoint when posting  
> requests to
> 
> [http://localhost:9200/\_search](http://localhost:9200/_search)
> 
> ?
> 
> Reason: elasticsearch reports errors on the \_percolator index when  
> performing facet searches. Example:
> 
> curl -XPOST [http://localhost:9200/\_search](http://localhost:9200/_search) -d '  
> {  
> "query": {  
> "filtered": {  
> "filter": {  
> "and": [  
> {  
> "term": {  
> "@ns": "testicus"  
> }  
> },  
> {  
> "term": {  
> "@ac": "yute"  
> }  
> }  
> ]  
> }  
> }  
> },  
> "facets": {  
> "terms:@fields.tag": {  
> "terms": {  
> "field": "@fields.tag"  
> }  
> }  
> },  
> "size": 0  
> }'
> 
> Result:
> 
> {  
> "took": 6,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 2,  
> "successful": 1,  
> "failed": 1,  
> "failures": [  
> {  
> "index": "\_percolator",  
> "shard": 0,  
> "status": 400,  
> "reason": "SearchParseException[[\_percolator][0]:  
> query[ConstantScore(+cache(@ns:testicus)  
> +cache(@ac:yute))],from[-1],size[-1]: Parse Failure [Failed to parse source  
> [{\n "query": {\n "filtered": {\n "filter": {\n  
> "and": [\n {\n "term": {\n "@ns":  
> "testicus"\n }\n },\n {\n  
> "term": {\n "@ac": "yute"\n }\n  
> }\n ]\n }\n }\n },\n "facets": {\n "terms:@fields.tag":  
> {\n "terms": {\n "field": "@fields.tag"\n }\n  
> }\n },\n "size": 0\n}\n]]]; nested: FacetPhaseExecutionException[Facet  
> [terms:@fields.tag]: failed to find mapping for [@fields.tag]]; "  
> }  
> ]  
> },  
> "hits": {  
> "total": 74074,  
> "max\_score": 1.0,  
> "hits":   
> },  
> "facets": {  
> "terms:@fields.tag": {  
> "\_type": "terms",  
> "missing": 0,  
> "total": 74074,  
> "other": 0,  
> "terms": [  
> {  
> "term": "tag\_1",  
> "count": 12428  
> },  
> {  
> "term": "tag\_2",  
> "count": 12414  
> },  
> ...  
> ..  
> ]  
> }  
> }  
> }
> 
> So what I'd like to do is something like this:
> 
> curl -XPOST '[http://localhost:9200/all](http://localhost:9200/all), !\_percolator)/\_search' -d  
> '{.....}'
> 
> How can this be achieved?
> 
> Cheers,
> 
> - Chris
> 
> --  
> 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:** ![Chris\_Kinsalb](https://avatars.discourse-cdn.com/v4/letter/c/e99b99/32.png) [@Chris\_Kinsalb](https://discuss.elastic.co/u/Chris_Kinsalb)\
**Post date:** [June 17, 2013, 6:11am UTC](https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375/3 "2013-06-17T06:11:33Z")

</div>

Ah thank you very much, this is exactly what I need. Somehow or other I  
overlooked this.

Cheers,

- Chris

On Sunday, June 16, 2013 7:54:55 PM UTC+2, Alexander Reelsen wrote:

> Hey,
> 
> have you seen  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/multi-index/) which  
> includes the possibility to exclude indices.  
> localhost:9200/-percolator/\_search
> 
> should do what you want.
> 
> --Alex
> 
> On Wed, Jun 12, 2013 at 11:10 AM, Chris Kinsalb \<[hc.ki...@gmail.com](mailto:hc.ki...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hello Group,
> > 
> > Is there a way to exempt an index from the \_search endpoint when posting  
> > requests to
> > 
> > [http://localhost:9200/\_search](http://localhost:9200/_search)
> > 
> > ?
> > 
> > Reason: elasticsearch reports errors on the \_percolator index when  
> > performing facet searches. Example:
> > 
> > curl -XPOST [http://localhost:9200/\_search](http://localhost:9200/_search) -d '  
> > {  
> > "query": {  
> > "filtered": {  
> > "filter": {  
> > "and": [  
> > {  
> > "term": {  
> > "@ns": "testicus"  
> > }  
> > },  
> > {  
> > "term": {  
> > "@ac": "yute"  
> > }  
> > }  
> > ]  
> > }  
> > }  
> > },  
> > "facets": {  
> > "terms:@fields.tag": {  
> > "terms": {  
> > "field": "@fields.tag"  
> > }  
> > }  
> > },  
> > "size": 0  
> > }'
> > 
> > Result:
> > 
> > {  
> > "took": 6,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 2,  
> > "successful": 1,  
> > "failed": 1,  
> > "failures": [  
> > {  
> > "index": "\_percolator",  
> > "shard": 0,  
> > "status": 400,  
> > "reason": "SearchParseException[[\_percolator][0]:  
> > query[ConstantScore(+cache(@ns:testicus)  
> > +cache(@ac:yute))],from[-1],size[-1]: Parse Failure [Failed to parse source  
> > [{\n "query": {\n "filtered": {\n "filter": {\n  
> > "and": [\n {\n "term": {\n "@ns":  
> > "testicus"\n }\n },\n {\n  
> > "term": {\n "@ac": "yute"\n }\n  
> > }\n ]\n }\n }\n },\n "facets": {\n  
> > "terms:@fields.tag": {\n "terms": {\n "field":  
> > "@fields.tag"\n }\n }\n },\n "size": 0\n}\n]]]; nested:  
> > FacetPhaseExecutionException[Facet [terms:@fields.tag]: failed to find  
> > mapping for [@fields.tag]]; "  
> > }  
> > ]  
> > },  
> > "hits": {  
> > "total": 74074,  
> > "max\_score": 1.0,  
> > "hits":   
> > },  
> > "facets": {  
> > "terms:@fields.tag": {  
> > "\_type": "terms",  
> > "missing": 0,  
> > "total": 74074,  
> > "other": 0,  
> > "terms": [  
> > {  
> > "term": "tag\_1",  
> > "count": 12428  
> > },  
> > {  
> > "term": "tag\_2",  
> > "count": 12414  
> > },  
> > ...  
> > ..  
> > ]  
> > }  
> > }  
> > }
> > 
> > So what I'd like to do is something like this:
> > 
> > curl -XPOST '[http://localhost:9200/all](http://localhost:9200/all), !\_percolator)/\_search' -d  
> > '{.....}'
> > 
> > How can this be achieved?
> > 
> > Cheers,
> > 
> > - Chris
> > 
> > --  
> > 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:30am UTC](https://discuss.elastic.co/t/exempt-index-from--search-endpoint/12375/4 "2017-07-06T02:30:54Z")

</div>


