SuWeiHan / luke

Automatically exported from code.google.com/p/luke
0 stars 0 forks source link

Term Positions increment incorrect #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Search within Luke for a word within your index
2. Show the document, where you got a hit (tab 'Documents')
3. Klick 'Show Poritions' button, to show, what ist the term position within 
the document (here Luke shows the right term position)
4. Close the 'Term Positions' window and klick again the 'Show Positions' 
button - the position has increase. If you do it often, the positions values 
still increases  with each request.

What is the expected output? What do you see instead?
Always the same, correct term positions values.

What version of the product are you using? On what operating system?
lukeall-1.0.1.jar on Windows XP

Please provide any additional information below.
When I choose the 'First Doc' and after that show the positions with 'Show 
Positions' button, the position number is correct. But the second try gives an 
incorrect (incremented) prosition number.

Original issue reported on code.google.com by karolina...@googlemail.com on 21 Jan 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Indeed, the same enumeration is reused on subsequent button presses, and it 
keeps the state of the latest position... Unfortunately, in Lucene 3x these 
enumerations move only forward, so I had to reset it by seek-ing again to the 
same term and the same document - ugly, but it works. The fix for branch-3x has 
been committed in rev. 62. This problem doesn't exist in trunk.

Original comment by sig...@gmail.com on 27 Apr 2011 at 11:59