[
https://issues.apache.org/jira/browse/LUCENE-3526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-3526:
--------------------------------
Attachment: LUCENE-3526_test.patch
Updated set of tests, I changed TestRegexpRandom2 to sometimes use an empty field name for better testing.
this seems to trigger its own problems:
{noformat}
[junit] Testcase: testRegexps(org.apache.lucene.search.TestRegexpRandom2): FAILED
[junit] Terms are out of order: field= (number 0) lastField= (number -1) text= lastText=
[junit] junit.framework.AssertionFailedError: Terms are out of order: field= (number 0) lastField= (number -1) text= lastText=
[junit] at org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:149)
[junit] at org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:51)
[junit] at org.apache.lucene.index.codecs.preflexrw.TermInfosWriter.add(TermInfosWriter.java:213)
[junit] at org.apache.lucene.index.codecs.preflexrw.PreFlexFieldsWriter$PreFlexTermsWriter.finishTerm(PreFlexFieldsWriter.java:192)
[junit] at org.apache.lucene.index.FreqProxTermsWriterPerField.flush(FreqProxTermsWriterPerField.java:409)
[junit] at org.apache.lucene.index.FreqProxTermsWriter.flush(FreqProxTermsWriter.java:92)
{noformat}
I had thought to workaround this original issue with this hack-patch, but i still get that fail... perhaps its a bad assert/something unrelated?
{noformat}
Index: src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java
===================================================================
--- src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java (revision 1188010)
+++ src/java/org/apache/lucene/index/codecs/preflex/PreFlexFields.java (working copy)
@@ -711,7 +711,12 @@
} else {
getTermsDict().seekEnum(termEnum, term, true);
}
- skipNext = true;
+ if (internedFieldName == "") {
+ // hackedy-hack: we aren't actually positioned yet
+ skipNext = false;
+ } else {
+ skipNext = true;
+ }
unicodeSortOrder = sortTermsByUnicode();
{noformat}
preflex codec returns wrong terms if you use an empty field name
----------------------------------------------------------------
Key: LUCENE-3526
URL:
https://issues.apache.org/jira/browse/LUCENE-3526Project: Lucene - Java
Issue Type: Bug
Affects Versions: 4.0
Reporter: Robert Muir
Attachments: LUCENE-3526_test.patch, LUCENE-3526_test.patch, LUCENE-3526_test.patch
spinoff from LUCENE-3473.
I have a standalone test for this... the termsenum is returning a bogus extra empty-term (I assume it has no postings, i didnt try).
This causes the checkindex test in LUCENE-3473 to fail, because there are 4 terms instead of 3.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira---------------------------------------------------------------------
To unsubscribe, e-mail:
[email protected]For additional commands, e-mail:
[email protected]