[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-623?pag...
]
Emmanuel Bernard commented on HSEARCH-623:
------------------------------------------
Yes this feature has been asked a number of times. If you have some spare time, a
prototype would make a lot of sense.
I like the idea of building it atop the core query DSL.
Support for faceting search results
-----------------------------------
Key: HSEARCH-623
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-623
Project: Hibernate Search
Issue Type: New Feature
Components: engine
Reporter: G Fernandes
I've been asked more than once about the possibility to support facet retrieval from
the search results. The idea is to categorize the results of a query into buckets
containing a label plus a number of occurrences. Consider an example: I have a Book entity
containing a language field. When I search for Books, I'd like to obtain not only a
List<Book>, but also a list of languages and how many books from the search results
fit into each of these languages, so that I can render the results as:
Found 17 Books:
English (10)
Italian (5)
Spanish (2)
It'd be also possible to facet on more than a field at the same time, similar to
what's being done with projections.
Facet calculation would be done at query time reading directly from the index, probably
by using a plugable strategy, examples would be LuceneFieldCacheStrategy and
TermEnumStrategy.
Asking for facets would be done at API level, probably with a decorator on top of
QueryBuilder something like
facetQueryBuilder.facetOn("field1").facetOn("field2").results().facets();
WDYT?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira