adam created Bug HSEARCH-1269
Issue Type: Bug Bug
Affects Versions: 4.2.0.Final, 4.1.1.Final
Assignee: Unassigned
Created: 01/Feb/13 11:40 AM
Description:

We have noticed that under heavy load, our Hibernate Search generated facets no longer pertain to the Lucene query that generated them. Eg. if a user loads:

http://core.tdar.org/search/results

they should see at least 364,000 documents. But, when you have a script like the following running at the same time, the user will often get a result closer to 230 documents:

while ( true) {
  `wget http://core.tdar.org/search/results?q=test`;
}

From what I can surmise from how the code works – and that the facet collection is done in a separate method from the actual query, that it may be possible that the lucene workers or threads are not being retained between the time of building the query, processing it, and collecting the facets.

Under normal load, it is nearly impossible to elicit this situation.

I'm having a hard time figuring out the best way to provide a "Test case" for this, beyond providing the script above and description of how to reproduce. If there's a test case in HibSearch that might be conducive, please point me in that direction.

Code running the query and generating the facets is available here:

[processing search]
https://bitbucket.org/tdar/tdar.src/src/tip/src/main/java/org/tdar/core/service/SearchService.java#cl-329

[facet collection]
https://bitbucket.org/tdar/tdar.src/src/tip/src/main/java/org/tdar/core/service/SearchService.java#cl-369

Environment: Hibernate 4.1.9.Final / 4.1.6.Final respectively with postgres backend
Project: Hibernate Search
Labels: faceting
Priority: Major Major
Reporter: adam
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira