Many thanks, that is a super clear answer.

So, until that issue is addressed, am I correct in thinking I should do 
this when percolating an existing document:

```
curl http://0.0.0.0:9200/idx-1/docs/123/_percolate -d '{
  "filter": {
    "term": {
      "account_id": 1
    }
  }
}'
```

Thanks again.

On Tuesday, May 20, 2014 2:18:02 AM UTC-7, Martijn v Groningen wrote:
>
> 1. Yes, the routing will be taken into during adding the percolator query.
> 2. At the moment only the routing will be taken into account, the filter 
> will not be taken into account.
>
> I opened issue percolator against an alias with a filter: 
> https://github.com/elasticsearch/elasticsearch/issues/6241
>
>
> On 17 May 2014 03:54, Mark Dodwell <ma...@mkdynamic.co.uk <javascript:>>wrote:
>
>> Consider an index `idx`, with a mapping for a single type `docs`. 
>> Consider aliases of the format `idx-{ACCOUNT-ID}`, with a term filter and a 
>> routing value set to the account id, like so:
>>
>> ```
>> $ curl http://0.0.0.0:9200/idx/_aliases?pretty=1
>> {
>>   "idx" : {
>>     "aliases" : {
>>       "idx-1" : {
>>         "filter" : {
>>           "term" : {
>>             "account_id" : 1
>>           }
>>         },
>>         "index_routing" : 1,
>>         "search_routing" : 1
>>       },
>>       ...
>>     }
>>   }
>> }
>> ```
>>
>> ### Questions
>>
>> 1. When indexing a percolator query, if you do that via an alias, will it 
>> respect the routing? 
>>
>> ```
>> # will the alias routing from idx-1 apply to this operation?
>> curl -XPUT http://0.0.0.0:9200/idx-1/.percolator/1 -d '{query:..., 
>> account_id:1}'
>> ```
>>
>> 2. When percolating an existing document from one of those aliases, will 
>> the routing and term filter from the alias be used when retrieving/checking 
>> the matching percolator documents?
>>
>> ```
>> # will the alias routing and term filter from idx-1 apply to the 
>> percolators?
>> curl http://0.0.0.0:9200/idx-1/docs/123/_percolate
>>
>> ```
>>
>> Any insight much appreciated.
>>
>> -- 
>> 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:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/d2eb11ca-4ef2-467c-90c3-1d98e56c2ae0%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/d2eb11ca-4ef2-467c-90c3-1d98e56c2ae0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Met vriendelijke groet,
>
> Martijn van Groningen 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/cfe66aa8-1af7-4aac-b5f0-e5c897b2f5b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to