Skip to content

Commit 27c3a3b

Browse files
committed
apply review comments
1 parent 6554aee commit 27c3a3b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

server/src/main/java/org/elasticsearch/index/IndexSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,6 @@ private static String getIgnoreAboveDefaultValue(final Settings settings) {
898898
private final boolean logsdbRouteOnSortFields;
899899
private final boolean logsdbSortOnHostName;
900900
private final boolean logsdbAddHostNameField;
901-
private volatile boolean searchExcludeVectors;
902901
private volatile long retentionLeaseMillis;
903902

904903
/**

server/src/main/java/org/elasticsearch/index/mapper/SourceFieldMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ public void preParse(DocumentParserContext context) throws IOException {
437437
XContentType contentType = context.sourceToParse().getXContentType();
438438

439439
final var originalSource = context.sourceToParse().source();
440-
final var storedSource = stored() ? removeSyntheticSourceFields(context.mappingLookup(), originalSource, contentType) : null;
440+
final var storedSource = stored() ? removeSyntheticVectorFields(context.mappingLookup(), originalSource, contentType) : null;
441441
final var adaptedStoredSource = applyFilters(context.mappingLookup(), storedSource, contentType, false);
442442

443443
if (adaptedStoredSource != null) {
@@ -458,7 +458,7 @@ public void preParse(DocumentParserContext context) throws IOException {
458458
context.doc().add(new NumericDocValuesField(RECOVERY_SOURCE_SIZE_NAME, originalSource.length()));
459459
} else {
460460
// if we omitted source or modified it we add the _recovery_source to ensure we have it for ops based recovery
461-
var recoverySource = removeSyntheticSourceFields(context.mappingLookup(), originalSource, contentType).toBytesRef();
461+
var recoverySource = removeSyntheticVectorFields(context.mappingLookup(), originalSource, contentType).toBytesRef();
462462
context.doc()
463463
.add(new StoredField(RECOVERY_SOURCE_NAME, recoverySource.bytes, recoverySource.offset, recoverySource.length));
464464
context.doc().add(new NumericDocValuesField(RECOVERY_SOURCE_NAME, 1));
@@ -467,7 +467,7 @@ public void preParse(DocumentParserContext context) throws IOException {
467467
}
468468

469469
/**
470-
* Removes the synthetic source fields (_inference and synthetic vector fields) from the {@code _source} if it is present.
470+
* Removes the synthetic vector fields (_inference and synthetic vector fields) from the {@code _source} if it is present.
471471
* These fields are regenerated at query or snapshot recovery time using stored fields and doc values.
472472
*
473473
* <p>For details on how the metadata is re-added, see:</p>
@@ -476,7 +476,7 @@ public void preParse(DocumentParserContext context) throws IOException {
476476
* <li>{@link FetchSourcePhase#getProcessor(FetchContext)}</li>
477477
* </ul>
478478
*/
479-
private BytesReference removeSyntheticSourceFields(
479+
private BytesReference removeSyntheticVectorFields(
480480
MappingLookup mappingLookup,
481481
@Nullable BytesReference originalSource,
482482
@Nullable XContentType contentType

0 commit comments

Comments
 (0)