lucene4: fixed FloatFieldDataTests
This commit is contained in:
parent
bf13f3f81e
commit
8a34ea1223
|
@ -50,7 +50,7 @@ public class StopTokenFilterFactory extends AbstractTokenFilterFactory {
|
||||||
this.ignoreCase = settings.getAsBoolean("ignore_case", false);
|
this.ignoreCase = settings.getAsBoolean("ignore_case", false);
|
||||||
this.stopWords = Analysis.parseStopWords(env, settings, StopAnalyzer.ENGLISH_STOP_WORDS_SET, version, ignoreCase);
|
this.stopWords = Analysis.parseStopWords(env, settings, StopAnalyzer.ENGLISH_STOP_WORDS_SET, version, ignoreCase);
|
||||||
// LUCENE 4 UPGRADE: LUCENE_29 constant is no longer defined
|
// LUCENE 4 UPGRADE: LUCENE_29 constant is no longer defined
|
||||||
this.enablePositionIncrements = settings.getAsBoolean("enable_position_increments", version.onOrAfter(Version.parseLeniently("LUCENE_29")));
|
this.enablePositionIncrements = settings.getAsBoolean("enable_position_increments", version.onOrAfter(Version.LUCENE_30));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache, Se
|
||||||
|
|
||||||
TermsEnum termsEnum = terms.iterator(null);
|
TermsEnum termsEnum = terms.iterator(null);
|
||||||
DocsEnum docsEnum = null;
|
DocsEnum docsEnum = null;
|
||||||
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.term()) {
|
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.next()) {
|
||||||
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
||||||
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
||||||
if (typeBuilder == null) {
|
if (typeBuilder == null) {
|
||||||
|
@ -156,7 +156,7 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache, Se
|
||||||
|
|
||||||
TermsEnum termsEnum = terms.iterator(null);
|
TermsEnum termsEnum = terms.iterator(null);
|
||||||
DocsEnum docsEnum = null;
|
DocsEnum docsEnum = null;
|
||||||
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.term()) {
|
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.next()) {
|
||||||
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
||||||
|
|
||||||
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class FieldDataLoader {
|
||||||
TermsEnum termsEnum = terms.iterator(null);
|
TermsEnum termsEnum = terms.iterator(null);
|
||||||
try {
|
try {
|
||||||
DocsEnum docsEnum = null;
|
DocsEnum docsEnum = null;
|
||||||
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.term()) {
|
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.next()) {
|
||||||
loader.collectTerm(BytesRef.deepCopyOf(term));
|
loader.collectTerm(BytesRef.deepCopyOf(term));
|
||||||
docsEnum = termsEnum.docs(reader.getLiveDocs(), docsEnum, 0);
|
docsEnum = termsEnum.docs(reader.getLiveDocs(), docsEnum, 0);
|
||||||
for (int docId = docsEnum.nextDoc(); docId != DocsEnum.NO_MORE_DOCS; docId = docsEnum.nextDoc()) {
|
for (int docId = docsEnum.nextDoc(); docId != DocsEnum.NO_MORE_DOCS; docId = docsEnum.nextDoc()) {
|
||||||
|
@ -66,6 +66,7 @@ public class FieldDataLoader {
|
||||||
ordinal[docId] = t;
|
ordinal[docId] = t;
|
||||||
idx[docId]++;
|
idx[docId]++;
|
||||||
}
|
}
|
||||||
|
t++;
|
||||||
}
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
if (e.getClass().getName().endsWith("StopFillCacheException")) {
|
if (e.getClass().getName().endsWith("StopFillCacheException")) {
|
||||||
|
|
Loading…
Reference in New Issue