mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 21:48:39 +00:00
lucene 4: Fixed compile error
This commit is contained in:
parent
fcc4fe263e
commit
3269e0c88e
@ -34,6 +34,7 @@ import org.elasticsearch.index.AbstractIndexComponent;
|
||||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.cache.id.IdCache;
|
||||
import org.elasticsearch.index.cache.id.IdReaderCache;
|
||||
import org.elasticsearch.index.mapper.Uid;
|
||||
import org.elasticsearch.index.mapper.internal.ParentFieldMapper;
|
||||
import org.elasticsearch.index.mapper.internal.UidFieldMapper;
|
||||
import org.elasticsearch.index.settings.IndexSettings;
|
||||
@ -121,7 +122,7 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache, Se
|
||||
TermsEnum termsEnum = terms.iterator(null);
|
||||
DocsEnum docsEnum = null;
|
||||
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.term()) {
|
||||
HashedBytesArray[] typeAndId = splitUidIntoTypeAndId(term);
|
||||
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
||||
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
||||
if (typeBuilder == null) {
|
||||
typeBuilder = new TypeBuilder(reader);
|
||||
@ -156,7 +157,7 @@ public class SimpleIdCache extends AbstractIndexComponent implements IdCache, Se
|
||||
TermsEnum termsEnum = terms.iterator(null);
|
||||
DocsEnum docsEnum = null;
|
||||
for (BytesRef term = termsEnum.next(); term != null; term = termsEnum.term()) {
|
||||
HashedBytesArray[] typeAndId = splitUidIntoTypeAndId(term);
|
||||
HashedBytesArray[] typeAndId = Uid.splitUidIntoTypeAndId(term);
|
||||
|
||||
TypeBuilder typeBuilder = readerBuilder.get(typeAndId[0].toUtf8());
|
||||
if (typeBuilder == null) {
|
||||
|
@ -107,7 +107,7 @@ public final class Uid {
|
||||
}
|
||||
|
||||
// LUCENE 4 UPGRADE: HashedBytesArray or BytesRef as return type?
|
||||
private static HashedBytesArray[] splitUidIntoTypeAndId(BytesRef uid) {
|
||||
public static HashedBytesArray[] splitUidIntoTypeAndId(BytesRef uid) {
|
||||
int loc = -1;
|
||||
for (int i = uid.offset; i < uid.length; i++) {
|
||||
if (uid.bytes[i] == 0x23) { // 0x23 is equal to '#'
|
||||
|
Loading…
x
Reference in New Issue
Block a user