picturesafe-search supports aggregations, that can be used for facet searches.
The SearchAggregation instances for the requested fields are passed to the ElasticsearchService via SearchParameter and a list of
corresponding ResultFacet instances is returned as part of the SearchResult:
If you are not familiar with aggregations yet and don’t know which one to choose, or you simply want to rely on the predefined aggregation behavior of
picturesafe-search, you can use the DefaultAggregation class:
The facets returned in the SearchResult can be used to refine the search.
Based on the example above, the following search limits the SearchResult for a specific city:
The original search Expression is combined with AND with the value of a ResultFacetItem and then searched again.
In this example, the original SearchResult is refined to all documents containing the city ‘Hamburg’.