Exempt index from _search endpoint

Hello Group,

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

http://localhost:9200/_search

?

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

curl -XPOST 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, !_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.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

have you seen Elasticsearch Platform — Find real-time answers at scale | Elastic
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.comwrote:

Hello Group,

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

http://localhost:9200/_search

?

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

curl -XPOST 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, !_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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

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 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<javascript:>

wrote:

Hello Group,

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

http://localhost:9200/_search

?

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

curl -XPOST 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, !_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 <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.