|
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:}
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
|