I think since version 2.2 the FacetedSolrSearchProvider does some sort of (in memory) caching of the last performed search query. It does not perform a new search when the search query string is the same as the previous one.
This of course can never work since the Solr index might very well have changed in between the two queries! We now see this issue on our servers in the following scenario:
- Remove all documents from the index
- Perform a search on search string 'test'
- The search correctly returns no results
- (re)create the Solr index. In our case by starting the crawler from the content-indexer module
- Perform the same search again.
- The search still returns no results even though there are many hits in the new Solr index..
The solution is very simple: please remove this caching feature altogether. Unless I don't understand it I think this is a mistake. If any caching is done it should be done by the Solr server itself. That is what Solr is for.