Skip to content

Commit

Permalink
fix filter fields, adding geo point and date_nanos (opensearch-projec…
Browse files Browse the repository at this point in the history
…t#285)

* fix filter fields, adding geo point and date_nanos

Signed-off-by: xinyual <[email protected]>

* apply spotless

Signed-off-by: xinyual <[email protected]>

---------

Signed-off-by: xinyual <[email protected]>
  • Loading branch information
xinyual authored Apr 18, 2024
1 parent 02a3209 commit b55adde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/opensearch/agent/tools/PPLTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public class PPLTool implements Tool {
static {
ALLOWED_FIELDS_TYPE = new HashSet<>(); // from
// https://github.com/opensearch-project/sql/blob/2.x/docs/user/ppl/general/datatypes.rst#data-types-mapping
// and https://opensearch.org/docs/latest/field-types/supported-field-types/index/
ALLOWED_FIELDS_TYPE.add("boolean");
ALLOWED_FIELDS_TYPE.add("byte");
ALLOWED_FIELDS_TYPE.add("short");
Expand All @@ -119,10 +120,12 @@ public class PPLTool implements Tool {
ALLOWED_FIELDS_TYPE.add("keyword");
ALLOWED_FIELDS_TYPE.add("text");
ALLOWED_FIELDS_TYPE.add("date");
ALLOWED_FIELDS_TYPE.add("date_nanos");
ALLOWED_FIELDS_TYPE.add("ip");
ALLOWED_FIELDS_TYPE.add("binary");
ALLOWED_FIELDS_TYPE.add("object");
ALLOWED_FIELDS_TYPE.add("nested");
ALLOWED_FIELDS_TYPE.add("geo_point");

try {
DEFAULT_PROMPT_DICT = loadDefaultPromptDict();
Expand Down

0 comments on commit b55adde

Please sign in to comment.