[
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 adds support for indexes with deleted documents too. While doing that, I
noticed that the implementation was slightly buggy -- it only used an old2new
mapping, which is important for mapping the posting lists, but it also had to
use a new2old mapping, for "random access" methods such as document(),
termVectors() etc...
I enhanced the tests to cover these cases and now there's a:
* SorterTestBase which creates an index in BeforeClass with all needed
information in the documents
** It also contains all the test methods.
* SortingAtomicReaderTest opens a SortingAtomicReader in its BeforeClass,
setting it as the tests' reader.
** It also now successfully passes CheckIndex(reader). (so I was wrong in my
previous analysis, which was misled by the buggy code before)
* SorterUtilTest sorts the source index by calling IW.addIndexes, and then
tests run on the sorted index (via a regular reader).
** It also CheckIndex(directory) to make sure the sorted index is valid as well.
I put a comment on Sorter.old2new that implementations must return a mapping
for deleted documents too. it is important for SortingAtomicReader to operate
correctly, however these documents are dropped when the index is actually
sorted.
I would like to give the tests some more runs (seems that everytime I thought
I'm done, a new seed uncovered another bug).
I already know that the tests cannot work w/ Lucene40 and Lucene41 codecs
(because of SortedDV), but also with SepPostingsWriter (since it doesn't
support indexing offsets, and I test that too). How can I disable it for the
tests? I didn't see a SepCodec or something that I can add to SuppressCodecs...
> 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-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]