Skip to content

Commit

Permalink
fix: rename method and make constant private
Browse files Browse the repository at this point in the history
  • Loading branch information
salvatore-campagna committed Jan 23, 2025
1 parent 6476c15 commit 47039a9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public final class KeywordFieldMapper extends FieldMapper {
private static final Logger logger = LogManager.getLogger(KeywordFieldMapper.class);

public static final String CONTENT_TYPE = "keyword";
public static final String HOST_NAME = "host.name";
private static final String HOST_NAME = "host.name";

public static class Defaults {
public static final FieldType FIELD_TYPE;
Expand Down Expand Up @@ -417,7 +417,7 @@ private boolean shouldUseDocValuesSparseIndex(
final IndexMode indexMode,
final String fullFieldName
) {
return (areDefaultSettingsUsed() || isNotIndexedAndHasDocValues())
return (defaultIndexedAndDocValues() || isNotIndexedAndHasDocValues())
&& isLogsDbMode(indexMode)
&& isHostNameField(fullFieldName)
&& isPrimarySortField(indexSortConfig);
Expand All @@ -431,7 +431,7 @@ private boolean isPrimarySortField(final IndexSortConfig indexSortConfig) {
return indexSortConfig != null && indexSortConfig.hasPrimarySortOnField(HOST_NAME);
}

private boolean areDefaultSettingsUsed() {
private boolean defaultIndexedAndDocValues() {
return indexed.isConfigured() == false && hasDocValues.isConfigured() == false;
}

Expand Down

0 comments on commit 47039a9

Please sign in to comment.