[
https://issues.apache.org/jira/browse/LUCENE-3918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-3918:
-------------------------------
Attachment: LUCENE-3918.patch
Patch:
* Consolidates tests into less classes, also creates the test index in
BeforeClass
* Randomizing tests: #docs, sort permutations
* Added _TestUtil.checkIndex and checkReader (see below) - this uncovered few
bugs
* Moved relevant classes to inherit from their FilterXYZ counterpart - reduced
code
In SortingAtomicReaderTest I had to call _TestUtil.checkReader with
crossCheckTermVectors=false. I put a comment why, but I'll repeat it here.
Let's say that your permutation is [2,0,1] which means doc 0 goes to 2, 1 goes
to 0 and 2 goes to 1. You then ask for termVectors(0), and receive, correctly,
those of document 2. Now, when crossCheck validation occurs, it iterates on the
terms of the TV, expecting to find each term associated with document 0 (since
CheckIndex doesn't know about sorting reader, and that in fact it works now w/
doc #2). However, the terms of doc #2 are mapped, again - correctly, to
document #1 (as the permutation specifies). Therefore CheckIndex fails since it
expects doc 0 but receives doc 1.
Unless I misunderstand how this cross-checking should work, I think that it's
ok to disable cross-checking on the reader, in this case. In SorterUtilTest,
where I addIndexes, I do checkIndex with cross-checking, and there it passes
(as it should).
All that's missing is CHANGES, but I'll let others review ...
> Port index sorter to trunk APIs
> -------------------------------
>
> Key: LUCENE-3918
> URL: https://issues.apache.org/jira/browse/LUCENE-3918
> Project: Lucene - Core
> Issue Type: Task
> Components: modules/other
> Affects Versions: 4.0-ALPHA
> Reporter: Robert Muir
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch,
> LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch, LUCENE-3918.patch,
> LUCENE-3918.patch
>
>
> LUCENE-2482 added an IndexSorter to 3.x, but we need to port this
> functionality to 4.0 apis.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]