Correct name of IndexFieldData#loadGlobalDirect. (#60492)
It seems 'localGlobalDirect' was just a typo.
This commit is contained in:
parent
771e9f142a
commit
f1d4fd8c3e
|
@ -253,7 +253,7 @@ public interface IndexFieldData<FD extends LeafFieldData> {
|
|||
|
||||
IndexFieldData<FD> loadGlobal(DirectoryReader indexReader);
|
||||
|
||||
IndexFieldData<FD> localGlobalDirect(DirectoryReader indexReader) throws Exception;
|
||||
IndexFieldData<FD> loadGlobalDirect(DirectoryReader indexReader) throws Exception;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public interface IndexFieldDataCache {
|
|||
@SuppressWarnings("unchecked")
|
||||
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
|
||||
IFD indexFieldData) throws Exception {
|
||||
return (IFD) indexFieldData.localGlobalDirect(indexReader);
|
||||
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,7 +40,7 @@ public interface IndexOrdinalsFieldData extends IndexFieldData.Global<LeafOrdina
|
|||
* Load a global view of the ordinals for the given {@link IndexReader}.
|
||||
*/
|
||||
@Override
|
||||
IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception;
|
||||
IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception;
|
||||
|
||||
/**
|
||||
* Returns the underlying {@link OrdinalMap} for this fielddata
|
||||
|
|
|
@ -92,7 +92,7 @@ public final class GlobalOrdinalsIndexFieldData implements IndexOrdinalsFieldDat
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ public final class GlobalOrdinalsIndexFieldData implements IndexOrdinalsFieldDat
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public abstract class AbstractIndexOrdinalsFieldData extends AbstractIndexFieldD
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
return GlobalOrdinalsBuilder.build(
|
||||
indexReader,
|
||||
this,
|
||||
|
|
|
@ -176,7 +176,7 @@ public class ConstantIndexFieldData extends AbstractIndexOrdinalsFieldData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
return loadGlobal(indexReader);
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ public class SortedSetOrdinalsIndexFieldData implements IndexOrdinalsFieldData {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
return GlobalOrdinalsBuilder.build(indexReader, this, breakerService, logger, scriptFunction);
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ public class IndicesFieldDataCache implements RemovalListener<IndicesFieldDataCa
|
|||
final Accountable accountable = cache.computeIfAbsent(key, k -> {
|
||||
ElasticsearchDirectoryReader.addReaderCloseListener(indexReader, IndexFieldCache.this);
|
||||
Collections.addAll(k.listeners, this.listeners);
|
||||
final Accountable ifd = (Accountable) indexFieldData.localGlobalDirect(indexReader);
|
||||
final Accountable ifd = (Accountable) indexFieldData.loadGlobalDirect(indexReader);
|
||||
for (Listener listener : k.listeners) {
|
||||
try {
|
||||
listener.onCache(shardId, fieldName, ifd);
|
||||
|
|
|
@ -115,7 +115,7 @@ public class FieldDataCacheTests extends ESTestCase {
|
|||
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
|
||||
IFD indexFieldData) throws Exception {
|
||||
cachedGlobally++;
|
||||
return (IFD) indexFieldData.localGlobalDirect(indexReader);
|
||||
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -393,8 +393,8 @@ public final class FlatObjectFieldMapper extends DynamicKeyFieldMapper {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IndexOrdinalsFieldData localGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
IndexOrdinalsFieldData fieldData = delegate.localGlobalDirect(indexReader);
|
||||
public IndexOrdinalsFieldData loadGlobalDirect(DirectoryReader indexReader) throws Exception {
|
||||
IndexOrdinalsFieldData fieldData = delegate.loadGlobalDirect(indexReader);
|
||||
return new KeyedFlatObjectFieldData(key, fieldData);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ public class FieldDataCacheWithFieldSubsetReaderTests extends ESTestCase {
|
|||
public <FD extends LeafFieldData, IFD extends IndexFieldData.Global<FD>> IFD load(DirectoryReader indexReader,
|
||||
IFD indexFieldData) throws Exception {
|
||||
topLevelBuilds++;
|
||||
return (IFD) indexFieldData.localGlobalDirect(indexReader);
|
||||
return (IFD) indexFieldData.loadGlobalDirect(indexReader);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue