Skip to content

Commit

Permalink
fix and changelog
Browse files Browse the repository at this point in the history
Signed-off-by: panguixin <[email protected]>
  • Loading branch information
bugmakerrrrrr committed Oct 12, 2024
1 parent 5d37267 commit 5dccc88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- New `phone` & `phone-search` analyzer + tokenizer ([#15915](https://github.com/opensearch-project/OpenSearch/pull/15915))
- Add _list/shards API as paginated alternate to _cat/shards ([#14641](https://github.com/opensearch-project/OpenSearch/pull/14641))
- Latency and Memory allocation improvements to Multi Term Aggregation queries ([#14993](https://github.com/opensearch-project/OpenSearch/pull/14993))
- Optimize flat_object type in a BWC way with one phase processing ([#16297](https://github.com/opensearch-project/OpenSearch/pull/16297))

### Dependencies
- Bump `com.azure:azure-identity` from 1.13.0 to 1.13.2 ([#15578](https://github.com/opensearch-project/OpenSearch/pull/15578))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
package org.opensearch.index.mapper;

import org.apache.lucene.index.Term;
import org.apache.lucene.search.DocValuesFieldExistsQuery;
import org.apache.lucene.search.TermQuery;
import org.opensearch.Version;
import org.opensearch.cluster.metadata.IndexMetadata;
Expand Down Expand Up @@ -114,7 +115,7 @@ public void testExistsQuery() {
{
MappedFieldType ft = getFlatParentFieldType("field");
// when checking on the flat_object field name "field", check if exist in the field mapper names
assertEquals(new TermQuery(new Term(FieldNamesFieldMapper.NAME, "field")), ft.existsQuery(null));
assertEquals(new DocValuesFieldExistsQuery("field"), ft.existsQuery(null));

// when checking if a subfield within the flat_object, for example, "field.bar", use term query in the flat_object field
MappedFieldType dynamicMappedFieldType = new FlatObjectFieldMapper.FlatObjectFieldType("field.bar", ft.name());
Expand All @@ -128,7 +129,7 @@ public void testExistsQuery() {
false,
Collections.emptyMap()
);
assertEquals(new TermQuery(new Term(FieldNamesFieldMapper.NAME, "field")), ft.existsQuery(null));
assertEquals(new DocValuesFieldExistsQuery("field"), ft.existsQuery(null));
}
}
}

0 comments on commit 5dccc88

Please sign in to comment.