I think this feature has always been available and doesn't depend on index sorting? You just need to take the bucket key of a terms aggregation and add it as a term query in a filter clause of a boolean query to refine top hits? What do I miss? Can you give a concrete example?
Please look at the example again: https://blog.algolia.com/search-for-facet-values/ , this is not even that good as the results are very limited. As they type "st" within the aggregation you see that the aggregation keys update to the ones containing "st" and display keys that were not shown before because they only had few results.
Or scroll down to the Nikon example, this might make it more obvious.
Just think of an IMDB search for Action movies , it will return an aggregation of hundreds of thousands of actors.
How with Elasticsearch would I now display only the actors containing "Michael" in their name while typing into a refine text box? , Besides the non-analyzed version of the names for the filtering, we would need to have the names also indexed as analyzed with ngrams. And then start the full query again without updating the results and just extracting the actors aggregation.
Or querying a pivot index like they describe on the page:
"For each faceted attribute, you had to build (and maintain) a dedicated index with the occurrences of the elements. This index had to be kept up to date, as records were added, deleted or updated."
Or is there an easier way? I remember seeing an open issue before we switched away from Elasticsearch but I can not find it right now.
How with Elasticsearch would I now display only the actors containing "Michael" in their name while typing into a refine text box? , Besides the non-analyzed version of the names for the filtering, we would need to have the names also indexed as analyzed with ngrams. And then start the full query again without updating the results and just extracting the actors aggregation.
And pretty sure what they do too. Or you can use Prefix Query instead of ngrams.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.