Aliasing a faceted search?

Hi

We're currently using aliases as a filter on our main index. This works a
treat.
Through our api we provide our end users with a list of available facets by
doing a faceted search with a match_all.
Is there a nicer way of doing this?

Essentially what I'd like to do is alias a type.
For example aliasing the following:

curl -X POST "http://localhost:9200/articles/_search?pretty=true" -d '

{

"size" : 0,
"query" : { "query_string" : {"query" : "match_all"} },
"facets" : {
  "tags" : { "terms" : {"field" : "tags"} }
}

}
'

with something like

curl "http://localhost:9200/articles/tags

Would be great if this kind of thing is available. If not any tips on doing
things better are much appreciated.

Thanks

Antony

p.s keep up the great work Shay

--

Antony Denyer wrote:

We're currently using aliases as a filter on our main index. This
works a treat. Through our api we provide our end users with a
list of available facets by doing a faceted search with a
match_all. Is there a nicer way of doing this?

Essentially what I'd like to do is alias a type. For example
aliasing the following:

curl -X POST "http://localhost:9200/articles/_search?pretty=true" -d '

{

"size" : 0,
"query" : { "query_string" : {"query" : "match_all"} },
"facets" : {
  "tags" : { "terms" : {"field" : "tags"} }
}

}
'

with something like

curl "http://localhost:9200/articles/tags

Aliases only operate at the index position of the URI. You could
write a plugin to register a GET handler for /:index/:type, which is
currently unused, to accomplish this.

-Drew

--