How to get facets without facet filter aplied


(Patrik Votoček) #1

Hi,

how do I select facets without aplied selected "facet filter"?
Original query https://gist.github.com/9bd1e1bc4bf289a576cc query with
aplied "facet filter" https://gist.github.com/a1eeda6e47f8e972e5df.

Diff with this two queries is add must term for user (from facets).
Hits is OK but I need same data in facets as first query. How to do it?


(David Pilato) #2

I think that you have to send two different request to ES.

HTH
David :wink:
@dadoonet

Le 10 déc. 2011 à 06:16, Patrik Votoček patrik@votocek.cz a écrit :

Hi,

how do I select facets without aplied selected "facet filter"?
Original query https://gist.github.com/9bd1e1bc4bf289a576cc query with
aplied "facet filter" https://gist.github.com/a1eeda6e47f8e972e5df.

Diff with this two queries is add must term for user (from facets).
Hits is OK but I need same data in facets as first query. How to do it?


(Karussell) #3

I think that you have to send two different request to ES.

No, I think its possible to avoid binding the facet to the query. You
can change the scope of the facet via

"global" : true

http://www.elasticsearch.org/guide/reference/api/search/facets/index.html

Also this search only filter could be of some use:

Peter.

On 10 Dez., 08:42, David Pilato da...@pilato.fr wrote:

I think that you have to send two different request to ES.

HTH
David :wink:
@dadoonet

Le 10 déc. 2011 à 06:16, Patrik Votoček pat...@votocek.cz a écrit :

Hi,

how do I select facets without aplied selected "facet filter"?
Original queryhttps://gist.github.com/9bd1e1bc4bf289a576ccquery with
aplied "facet filter"https://gist.github.com/a1eeda6e47f8e972e5df.

Diff with this two queries is add must term for user (from facets).
Hits is OK but I need same data in facets as first query. How to do it?


(David Pilato) #4

That means that I have to learn more and more about ES !

David :wink:
@dadoonet

Le 10 déc. 2011 à 18:59, Karussell tableyourtime@googlemail.com a écrit :

I think that you have to send two different request to ES.

No, I think its possible to avoid binding the facet to the query. You
can change the scope of the facet via

"global" : true

http://www.elasticsearch.org/guide/reference/api/search/facets/index.html

Also this search only filter could be of some use:

https://github.com/elasticsearch/elasticsearch/issues/650

Peter.

On 10 Dez., 08:42, David Pilato da...@pilato.fr wrote:

I think that you have to send two different request to ES.

HTH
David :wink:
@dadoonet

Le 10 déc. 2011 à 06:16, Patrik Votoček pat...@votocek.cz a écrit :

Hi,

how do I select facets without aplied selected "facet filter"?
Original queryhttps://gist.github.com/9bd1e1bc4bf289a576ccquery with
aplied "facet filter"https://gist.github.com/a1eeda6e47f8e972e5df.

Diff with this two queries is add must term for user (from facets).
Hits is OK but I need same data in facets as first query. How to do it?


(system) #5