Here's our service code where we're calling the search: https://bitbucket.org/tdar/tdar.src/src/a346dd6d9bb8932c9782192e2cfb00c386ea464e/src/main/java/org/tdar/core/service/SearchService.java?at=default#cl-199
That's a lot of code. Really I would need something reproducible? Have you ever tried to extract a test case? How do you know that the facet return value is the problem and not some other bug, eg in the UI code? You point me to a website and tell me facet counts are wrong because a given page displays different values when I keep reloading it. There could be a millions things going wrong. (just trying to explain where I am coming from).
Also what frameworks are you using a part of Search and in which container are you running your app?
The query object never gets re-used, however, there are often two searches happening simultaneously. When this happens, we often end up with the facets of one search infecting another search.
The facet manager is really scoped per query. Provided you create a new query for each request, there should be no problem. (Not saying there couldn't be a bug somewhere)
A good example of this is hitting the following two URLs: http://core.tdar.org/search/results?query=mimpidd&_tdar.searchType=simple (9,000+ results)
So I did hit the URL a couple of times and indeed I saw once 17000+ instead of the 9000+. However, I hardly created a heavy load.
|