Hi,
I'm building a search/filter interface based on elasticsearch 0.20.X.
I've got books with following schema :
- title
- author
- publisher
I sometimes need to remove all books of given publisher for various
reasons.
Another business requirement is that all available publishers should be
listed under the publisher filter, even when other filter criteria excludes
all books.
I use all_terms facets and everything went fine until I removed a
publisher : it is still listed in the facet result.
Is there any way to reset facet list ?
Julien.
Some sample data:
{author: "Terry Pratchet", title: "Discworld 1", publisher: "Harper Collins"
}
{author: "Terry Pratchet", title: "Discworld 2", publisher: "Harper Collins"
}
{author: "Terry Pratchet", title: "Discworld 3", publisher: "Harper Collins"
}
{author: "Terry Pratchet", title: "Discworld 4", publisher: "Harper Collins"
}
{author: "Douglas Adams", title: "H2G2", publisher: "Geoffrey Perkins"}
The following request list all publisher, event the deleted ones.
$ curl -XPOST 'http://localhost:9200/books/_search' -d '{
"from":0,
"size":50,
"query": { "match_all":{} },
"facets": {
"publisher": {
"terms": {
"field": "publisher",
"size": 70,
"all_terms": true,
"order": "term"
}
}
}'
--
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.
For more options, visit https://groups.google.com/groups/opt_out.