Search for Facet/Aggregation value

The main reasons we switched to Algolia was the speed and ability to search within Facet values (https://blog.algolia.com/search-for-facet-values/)

Now that Elasticsearch supports index time sorting, we might consider coming back to Elasticsearch.

Is it now possible to search bucket keys with Elasticsearch without using pivot tables or additional fields?

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?

Yes, the index sorting has nothing to do with it.

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.

This is the easier way:

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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.