Skip to content

Commit

Permalink
Flat object field should delegate to keyword field for most query types
Browse files Browse the repository at this point in the history
Signed-off-by: kkewwei <[email protected]>
  • Loading branch information
kkewwei committed Jun 16, 2024
1 parent 0d38d14 commit 9da1d18
Show file tree
Hide file tree
Showing 5 changed files with 1,033 additions and 153 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
import java.nio.CharBuffer;
import java.util.ArrayList;

import static org.opensearch.index.mapper.FlatObjectFieldMapper.DOT_SYMBOL;
import static org.opensearch.index.mapper.FlatObjectFieldMapper.EQUAL_SYMBOL;
import static org.opensearch.index.mapper.FlatObjectFieldMapper.VALUE_AND_PATH_SUFFIX;
import static org.opensearch.index.mapper.FlatObjectFieldMapper.VALUE_SUFFIX;

/**
* JsonToStringParser is the main parser class to transform JSON into stringFields in a XContentParser
* returns XContentParser with one parent field and subfields
Expand All @@ -44,11 +49,6 @@ public class JsonToStringXContentParser extends AbstractXContentParser {

private DeprecationHandler deprecationHandler;

private static final String VALUE_AND_PATH_SUFFIX = "._valueAndPath";
private static final String VALUE_SUFFIX = "._value";
private static final String DOT_SYMBOL = ".";
private static final String EQUAL_SYMBOL = "=";

public JsonToStringXContentParser(
NamedXContentRegistry xContentRegistry,
DeprecationHandler deprecationHandler,
Expand Down
Loading

0 comments on commit 9da1d18

Please sign in to comment.