#76 Broken search for newly entered cards


### 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.

Load Currencies.xml.gz
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.


  • Sebastian R.

    Sebastian R. - 2010-04-30
    • summary: Newly entered cards are correctly shown under similar cards --> Broken search for newly entered cards
  • Nobody/Anonymous

    Seems to be linked to bug 2858292. When entering new cards as above, Pauker does "find" them, but it displays some other card at the bottom of the screen. (in my case it was the top card of the unlearned cards, the card I failed to recall last). When there are multiple "hits", the same card is shown multiple times. (in my case it was obvious because I introduced a new pattern to the lesson). However, I think this is linked to the other bug, since after a (considerable) time, the newly entered cards to start to show up under "similar cards".

    It seems that there is an issue with writing new cards to the lesson...

  • Ronny Standtke

    Ronny Standtke - 2010-07-13

    Thank you for the bug report. Yes, this seems to be a lucene bug. I worked around it in svn by optimizing the lucene index everytime we add a new card.

  • Ronny Standtke

    Ronny Standtke - 2010-07-13
    • status: open --> closed-fixed

Log in to post a comment.