Make use of the new faceting API offered by Lucene

Description

Instead of relying on the custom FieldCache approach for faceting, we should make use of the API Lucene itself offers now. Or at least investigate how it is implemented in Lucene. Hopefully this will also address the problem that the FieldCache approach. See also https://issues.apache.org/jira/browse/LUCENE-3079

Activity

Show:

GeorgeApril 16, 2015 at 9:13 PM

If I get some free time this weekend, I'd like to try what you have and go
from there. What would I need to do to try it? It's been some time since I
built my facet menu, so off hand I don't recall every use case.

What I do recall was the need to limit the results returned. So what you
see on the live site is maybe 5 results out of say 100. To get to those 5 I
was picking them based on the highest count and then ordering them
alphabetically. This very well may not be the job of the faceting engine
but rather my responsibility.

Another thing that comes to mind is if a user has two items in a facet
selected out of say 5. Lets use the example two vehicle makes, Ford and
Chevy while 3 others, Honda, Nissan Toyota are left unelected. I would
expect all 5 makes to some be returned with proper counts, but other facets
such as model be filted by the Ford Chevy.

If the Ford and Chevy make is selected as the active filters I would expect
to see only Ford and Chevy models. If u select for example corvette I don't
think I'd want to see the Ford make removed from the make facet nor would I
want to see all the other models such as Tahoe, mustang removed from the
model list.

Perhaps my thinking is incorrect, but it almost seems as if we need to be
able to chain The facets together in some sort of order.

Again, I'm not sure where the cut off is for the faceting library and where
I need to do the rest on my own.

Hope some of this feedback helps, feel free to play with the site to get a
visual representation of what im suggesting.
On Apr 16, 2015 4:21 PM, "Hardy Ferentschik (JIRA)" <

Hardy FerentschikApril 16, 2015 at 8:20 PM

, in its new form the faceting counts will actually work for *ToMany relations. This was a longstanding issue and afaict one of your issues. What else would you need to make an upgrade? It would be nice if you could provide an example or make some concrete API change suggestions.

GeorgeApril 15, 2015 at 7:47 PM
Edited

Your welcome!

I'm caught in the middle of a scaling issue where I need my indexes to be
up to date across multiple servers. I'm still using hibernate-search 4
which uses Lucene v3, but moving to hibernate-search 5, Lucene has been
upgraded to v4 which has a new api and intern breaks the
BitSetFacetHitCounter.java class shown in Sannes link . I use that class to
handle multiple facet counts. Now the fix for infinispan 7.1 which resolves
the AWS s3 buckets issue only works in hibernate-search 5. I need to
upgrade to 5, but I can't until the facets are working properly.

Hardy FerentschikApril 15, 2015 at 7:33 PM

Hi , thanks for your feedback and thanks also for the link. Nice to see the faceting functionality in action.

Unfortunately with the API changes in version 5, I'm unable to make the upgrade without breaking all my faceting code.

What are your problems exactly?

Regarding the faceting rewrite. I am pretty much finished with switching from our custom FieldCache based solution, to Lucene's dynamic faceting using DocValues. In fact there is even a first pull request - https://github.com/hibernate/hibernate-search/pull/819. The faceting API is pretty much the same. The biggest difference is that now you have to explicitly configure the fields you are using for faceting using @Facet. Also values with zero counts are now per default not included and need to be explicitly enabled.

GeorgeApril 14, 2015 at 3:02 PM

Hi Hardy, Sanne says you are redesigning the Faceting engine. The post he just provided you with is something I'm currently using in production. Unfortunately with the API changes in version 5, I'm unable to make the upgrade without breaking all my faceting code. He suggested I provide some feedback while it's being built so that hopefully all use cases are covered. I highly suggest that example. I'd also like to provide you with a live production example where you can play with the faceting. https://www.cardaddy.com/vehicles

In the short-term, do you have any suggestions on how to go about upgrading to 5.1 while still maintaining multi value facet counts?

Thanks

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Priority

Created July 11, 2011 at 6:03 PM
Updated May 5, 2015 at 10:23 PM
Resolved May 5, 2015 at 10:13 PM