### This problem only affects the the current version in the repository, not 1.9Beta2.
There is a problem if you add new cards to a lesson. Once you have added them and enter further cards which are similar, wrong search results appear. The wrong search result is always the first card in the lesson.
You add: Test --- Test
You type: Test
You get as a search result: Afghanistan --- Afghani
If you save your newly added cards and load the lesson from the disc, the newly added cards are correctly found. So the problem seems to be with cards that are added to the search engine index after the lesson has already been loaded.
I have already digged into the source and found out that SearchEngine::addCard can't be directly responsible, as the Document gets built correctly. However, Collector::collect in SearchEngine::search is always called with doc = 0 when the wrong search results are found.
Maybe this is a problem with Lucene? I speculate that the problem appeared after updating to 3.0.1.
Log in to post a comment.