Skip to content

Commit abb44a1

Browse files
committed
apply comments
Signed-off-by: panguixin <[email protected]>
1 parent dca3469 commit abb44a1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
3030
- Introduce framework for auxiliary transports and an experimental gRPC transport plugin ([#16534](https://github.com/opensearch-project/OpenSearch/pull/16534))
3131
- Changes to support IP field in star tree indexing([#16641](https://github.com/opensearch-project/OpenSearch/pull/16641/))
3232
- Support object fields in star-tree index([#16728](https://github.com/opensearch-project/OpenSearch/pull/16728/))
33-
- Optimize flat_object type in a BWC way with one phase processing ([#16297](https://github.com/opensearch-project/OpenSearch/pull/16297))
33+
- Improve flat_object field parsing performance by reducing two passes to a single pass ([#16297](https://github.com/opensearch-project/OpenSearch/pull/16297))
3434

3535
### Dependencies
3636
- Bump `com.google.cloud:google-cloud-core-http` from 2.23.0 to 2.47.0 ([#16504](https://github.com/opensearch-project/OpenSearch/pull/16504))

server/src/main/java/org/opensearch/index/mapper/FlatObjectFieldMapper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,10 @@ private void createPathFields(ParseContext context, HashSet<String> pathParts) {
604604
if (fieldType.indexOptions() != IndexOptions.NONE || fieldType.stored()) {
605605
context.doc().add(new Field(name(), value, fieldType));
606606
}
607-
if (fieldType().hasDocValues() == false && fieldType.omitNorms()) {
608-
createFieldNamesField(context);
609-
}
610607
if (fieldType().hasDocValues()) {
611608
context.doc().add(new SortedSetDocValuesField(name(), value));
609+
} else {
610+
createFieldNamesField(context);
612611
}
613612
}
614613
}

0 commit comments

Comments
 (0)