Facetted search on embedded collections takes only first element from collection

Description

From Hibernate Search Forum: Bug or not? Faceted search + embedded fields (*tomany).
Faceted search won't work correctly when used on collections. For the cause I quote Hardy Ferentschik : — The current faceting implementation utilizes the Lucene FieldCache which has a limitation that each document must have a single value for the specified field.

I can think of many use cases in which faceted search on collections is really needed, some examples:
Facetting on authors when searching for publications
Facetting on ingredients when searching for recipes
Facetting on actors when searching for movies
...

Attached is a hibernate search test case. It fails on retrieving the right amount of matched authors.

Currently I don't have the needed insight to suggest an improvement on current implementation to make it compatible with collections. Hopefully it can be achieved with small changes. Good luck slightly smiling face

Attachments

2
  • 20 Apr 2011, 01:02 PM
  • 14 Apr 2011, 10:49 AM

Activity

Sanne GrinoveroFebruary 20, 2014 at 6:48 PM

Hardy FerentschikFebruary 16, 2014 at 12:02 PM

Is this something that can be addressed in HSearch 5.0?

I hope so. In fact I was planning to have a look at it next week winking face ...

Marc SchipperheynFebruary 16, 2014 at 11:27 AM

Is this something that can be addressed in HSearch 5.0?

Sanne GrinoveroDecember 7, 2012 at 8:14 PM

Hi Adrian,
that's not possible with the current dependencies, for the reasons explained by Hardy. To resolve this someone would need to work on HSEARCH-809, I'll ping Hardy but I don't expect him to have much time this month.

Keep in mind that even if https://hibernate.atlassian.net/browse/HSEARCH-809#icft=HSEARCH-809 provides a solution for this, it's significantly less efficient than the current implementation; would you still like it? Possibly a better idea would be to migrate to Lucene 4 first.

Adrian MeredithDecember 7, 2012 at 7:37 PM

Has this even been started? Any plans?

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created April 14, 2011 at 10:49 AM
Updated March 5, 2014 at 11:10 AM
Resolved February 20, 2014 at 6:48 PM

Flag notifications