Newbie question about _terms and filters


(Dominique Rose-Rosette) #1

Hi,

I'm having a hard time figuring how I could retrieve the terms
belonging to a subset of the indexed documents.

For instance, given a call as such:

curl -XGET "http://localhost:9200/_terms?fields=posts.tags"

How can I narrow it down to terms corresponding to posts with a
"status" of "published"? I tried providing a Filtered Query in the
request body, to no avail. I am doing it wrong (most probably) or is
it just not possible (yet)?

Dominique Rose-Rosette


(Shay Banon) #2

What you are talking about are facets (dynamic) ones. There is support for
query based facets that return a total count, but not automatically return a
count per term value based on a search request. This is a planned feature.

On Tue, Jun 1, 2010 at 4:18 PM, Dominique Rose-Rosette <
droserosette@gmail.com> wrote:

Hi,

I'm having a hard time figuring how I could retrieve the terms
belonging to a subset of the indexed documents.

For instance, given a call as such:

curl -XGET "http://localhost:9200/_terms?fields=posts.tags"

How can I narrow it down to terms corresponding to posts with a
"status" of "published"? I tried providing a Filtered Query in the
request body, to no avail. I am doing it wrong (most probably) or is
it just not possible (yet)?

Dominique Rose-Rosette


(Dominique Rose-Rosette) #3

Le 01/06/2010 22:19, Shay Banon a écrit :

What you are talking about are facets (dynamic) ones. There is support
for query based facets that return a total count, but not
automatically return a count per term value based on a search request.
This is a planned feature.

On Tue, Jun 1, 2010 at 4:18 PM, Dominique Rose-Rosette
<droserosette@gmail.com mailto:droserosette@gmail.com> wrote:

Hi,

I'm having a hard time figuring how I could retrieve the terms
belonging to a subset of the indexed documents.

For instance, given a call as such:

curl -XGET "http://localhost:9200/_terms?fields=posts.tags"

How can I narrow it down to terms corresponding to posts with a
"status" of  "published"? I tried providing a Filtered Query in the
request body, to no avail. I am doing it wrong (most probably) or is
it just not possible (yet)?


Dominique Rose-Rosette

OK. Thanks!


(system) #4