oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.35k stars 744 forks source link

Junit error in Suggester Controller Test #4427

Closed ginoaugustine closed 12 months ago

ginoaugustine commented 12 months ago

Junit error was coming up when suggester results are from second Lucene segment(docbase>0). Document ID map inside Complex data was populated with key as docbase +docID , but documentToPositionsMap inside phrase scorer is considering only doc id. Junit was passing mostly since the data will be in one segment and docbase will be zero for this usecase.

Complex data document map Scorer document to positionmap

Closes #4108

vladak commented 12 months ago

Nice !