# Aliases and percolators

**URL:** <https://discuss.elastic.co/t/aliases-and-percolators/17616>\
**Category:** Elasticsearch\
**Created:** [May 20, 2014, 9:13am UTC](https://discuss.elastic.co/t/aliases-and-percolators/17616 "2014-05-20T09:13:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Dodwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_dodwell/32/1446_2.png) [@Mark\_Dodwell](https://discuss.elastic.co/u/Mark_Dodwell)\
**Post date:** [May 20, 2014, 9:13am UTC](https://discuss.elastic.co/t/aliases-and-percolators/17616/1 "2014-05-20T09:13:32Z")

</div>

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:

```auto
$ 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?

```auto
# 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}'

```

1. 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?

```auto
# 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/564166cd-dd22-45d3-a51d-f810f5258c58%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/564166cd-dd22-45d3-a51d-f810f5258c58%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:28am UTC](https://discuss.elastic.co/t/aliases-and-percolators/17616/2 "2017-07-06T01:28:15Z")

</div>


