Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text and Keyword aggregation integration tests #176

Draft
wants to merge 9 commits into
base: Integ-newDataTypeForTextAggregations
Choose a base branch
from

Conversation

MitchellGale
Copy link

Signed-off-by: MitchellGale-BitQuill [email protected]

Description

Adds integration tests for:
type keyword:

      "typeKeyword" : {
        "type" : "keyword"
      }

type text:

      "typeText" : {
        "type" : "text"
      }

type keyword with field data false:

"typeKeywordFieldNoFieldData" : {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 256
          }
        }      
}

type keyword and field data true:

"typeTextFieldData" : {
     "type": "text",
     "fielddata": true,
     "fields": {
       "keyword": {
         "type": "keyword",
         "ignore_above": 256
       }
     }

Integration test failure:

Only aggregateOnText fails

REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.sql.TextTypeIT.aggregateOnText" -Dtests.seed=A48DC4566936223B -Dtests.security.manager=false -Dtests.locale=zh-Hans-CN -Dtests.timezone=Europe/San_Marino -Druntime.java=13

org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:62239], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
java.lang.RuntimeException: org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:62239], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
	at __randomizedtesting.SeedInfo.seed([A48DC4566936223B:93D9AB68DC690E72]:0)
	at org.opensearch.sql.legacy.SQLIntegTestCase.executeQuery(SQLIntegTestCase.java:239)
	at org.opensearch.sql.legacy.SQLIntegTestCase.executeJdbcRequest(SQLIntegTestCase.java:244)
	at org.opensearch.sql.sql.TextTypeIT.aggregateOnText(TextTypeIT.java:35)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:62239], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
	at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:351)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeQuery(SQLIntegTestCase.java:233)
	... 42 more
	Suppressed: org.opensearch.client.ResponseException: method [POST], host [http://[::1]:62238], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
		at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
		at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
		... 44 more

Issues Resolved

Part of investigation for #1038

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #176 (0222df6) into Integ-newDataTypeForTextAggregations (e280866) will decrease coverage by 2.43%.
The diff coverage is n/a.

@@                            Coverage Diff                             @@
##             Integ-newDataTypeForTextAggregations     #176      +/-   ##
==========================================================================
- Coverage                                   98.28%   95.84%   -2.44%     
- Complexity                                   3450     3523      +73     
==========================================================================
  Files                                         345      358      +13     
  Lines                                        8580     9442     +862     
  Branches                                      547      676     +129     
==========================================================================
+ Hits                                         8433     9050     +617     
- Misses                                        142      334     +192     
- Partials                                        5       58      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 98.32% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/main/java/org/opensearch/sql/storage/Table.java 100.00% <0.00%> (ø)
...c/main/java/org/opensearch/sql/expression/DSL.java 100.00% <0.00%> (ø)
...java/org/opensearch/sql/executor/QueryService.java 100.00% <0.00%> (ø)
.../opensearch/sql/planner/physical/PhysicalPlan.java 100.00% <0.00%> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <0.00%> (ø)
...ssion/operator/arthmetic/MathematicalFunction.java 100.00% <0.00%> (ø)
...opensearch/executor/OpenSearchExecutionEngine.java 100.00% <0.00%> (ø)
workbench/public/components/Main/main.tsx 53.00% <0.00%> (ø)
workbench/public/components/Header/Header.tsx 100.00% <0.00%> (ø)
workbench/public/components/app.tsx 0.00% <0.00%> (ø)
... and 10 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

} },
"typeTextFieldData" : {
"type": "text",
"fielddata": true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be interesting to know how it works if we have a text field with "fielddata": true but doesn't have any fields defined. Does this behave just like typeTextFieldData?

Copy link
Author

@MitchellGale MitchellGale Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 2a8fbac. It passes.

import static org.opensearch.sql.util.MatcherUtils.schema;
import static org.opensearch.sql.util.MatcherUtils.verifySchema;

public class TextTypeIT extends SQLIntegTestCase {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other tests that you tried? These only look like aggregation tests, but it would be good to know if some of the following would also work:

  • WHERE field LIKE "keyFD??"
  • WHERE wildcard("field", "keyFD??")
  • SELECT field LIKE "keyFD??"
    and maybe a couple of string-like functions:
  • SELECT LOCATE("FD", field)
  • SELECT SUBSTRING(field, 3, 2)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also try

  • SELECT POSITION(substring IN field) since it seems to fail for text fields (as Margarit demonstrated)

Copy link
Author

@MitchellGale MitchellGale Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SELECT POSITION(substring IN field)

Passed:

  • selectPositionKeyword
  • selectPositionText
  • selectPositionTextKeywordFieldNoFieldData
  • selectPositionTypeTextFieldData
  • selectLocateTextDataFieldNoFields
  • selectPositionTextDataFieldNoFields

Failed:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check selectPositionTextDataFieldNoFields - its giving you a parser error.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, this looks exclusively like an issue with aggregation on text fields.
Strangely, I thought POSITION was going to fail on text fields, since it was failing for Margarit earlier.

@@ -0,0 +1,16 @@
{"index": {}}
{"typeKeyword": "key00", "typeText": "text00", "typeKeywordFieldData": "keyFD00", "typeTextFieldData": "textFD00", "int0": 0}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of these documents have text fields larger than 256, so we aren't testing the ignore_above sub-field. Can we do that? Can we create a field with ignore_above of around 10, and add data (with spaces) larger than 10 characters?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2a8fbac Added and it passes.

{"typeKeyword": "key00", "typeText": "text00", "typeKeywordFieldNoFieldData": "keyword00","typeTextFieldData": "keyFD00", "typeKeywordFieldData": "textFD00", "textDataFieldNoFields": "textFDNF00","int0": 0}
{"index": {}}
{"typeKeyword": "key01", "typeText": "text01", "typeKeywordFieldNoFieldData": "keyword01", "typeTextFieldData": "keyFD01", "typeTextFieldData": "textFD01OverTen", "textDataFieldNoFields": "textFDNF01", "int0": 1}
{"index": {},typeKeywordFieldData

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A typo? How it works?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved. Issue created opensearch-project#1110

"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try adding a row with more than 10 words. Interesting to test this too.

import static org.opensearch.sql.util.MatcherUtils.schema;
import static org.opensearch.sql.util.MatcherUtils.verifySchema;

public class TextTypeIT extends SQLIntegTestCase {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, this looks exclusively like an issue with aggregation on text fields.
Strangely, I thought POSITION was going to fail on text fields, since it was failing for Margarit earlier.

@MitchellGale
Copy link
Author

aggregateOnText: FAILURE

REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.sql.TextTypeIT.aggregateOnText" -Dtests.seed=4E9E17C90762EAE6 -Dtests.security.manager=false -Dtests.locale=ar-EG -Dtests.timezone=Antarctica/Casey -Druntime.java=13

org.opensearch.client.ResponseException: method [POST], host [http://[::1]:50100], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
java.lang.RuntimeException: org.opensearch.client.ResponseException: method [POST], host [http://[::1]:50100], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
	at __randomizedtesting.SeedInfo.seed([4E9E17C90762EAE6:79CA78F7B23DC6AF]:0)
	at org.opensearch.sql.legacy.SQLIntegTestCase.executeQuery(SQLIntegTestCase.java:239)
	at org.opensearch.sql.legacy.SQLIntegTestCase.executeJdbcRequest(SQLIntegTestCase.java:244)
	at org.opensearch.sql.sql.TextTypeIT.aggregateOnText(TextTypeIT.java:39)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: org.opensearch.client.ResponseException: method [POST], host [http://[::1]:50100], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
	at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:351)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeQuery(SQLIntegTestCase.java:233)
	... 42 more
	Suppressed: org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:50101], URI [/_plugins/_sql?format=jdbc], status line [HTTP/1.1 503 Service Unavailable]
{
  "error": {
    "reason": "Error occurred in OpenSearch engine: all shards failed",
    "details": "Shard[0]: java.lang.IllegalArgumentException: Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory.\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.",
    "type": "SearchPhaseExecutionException"
  },
  "status": 400
}
		at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
		at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
		... 44 more
		```

@MitchellGale
Copy link
Author

selectPositionText: Failure

[2022-12-14T06:17:56,455][INFO ][o.o.s.s.TextTypeIT       ] [selectPositionText] before test
[2022-12-14T06:17:56,473][INFO ][o.o.s.s.TextTypeIT       ] [selectPositionText] after test
REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.sql.TextTypeIT.selectPositionText" -Dtests.seed=4E9E17C90762EAE6 -Dtests.security.manager=false -Dtests.locale=ar-EG -Dtests.timezone=Antarctica/Casey -Druntime.java=13

method [POST], host [http://127.0.0.1:50101], URI [/_plugins/_sql?format=json], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"script_exception","reason":"runtime error","script_stack":["org.opensearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:943)","org.opensearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:145)","org.opensearch.index.query.QueryShardContext.lambda$lookup$1(QueryShardContext.java:423)","org.opensearch.search.lookup.SearchLookup.lambda$new$1(SearchLookup.java:87)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:94)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:91)","java.base/java.security.AccessController.doPrivileged(AccessController.java:312)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:91)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:55)","locate_1 = doc['typeText'].value.indexOf('text',0)+1;","               ^---- HERE"],"script":"def locate_1 = doc['typeText'].value.indexOf('text',0)+1;return locate_1;","lang":"painless","position":{"offset":19,"start":4,"end":57}}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"opensearch-sql_test_index_textkeyword","node":"vaywqI0PQWKFQl14hrmPzQ","reason":{"type":"script_exception","reason":"runtime error","script_stack":["org.opensearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:943)","org.opensearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:145)","org.opensearch.index.query.QueryShardContext.lambda$lookup$1(QueryShardContext.java:423)","org.opensearch.search.lookup.SearchLookup.lambda$new$1(SearchLookup.java:87)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:94)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:91)","java.base/java.security.AccessController.doPrivileged(AccessController.java:312)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:91)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:55)","locate_1 = doc['typeText'].value.indexOf('text',0)+1;","               ^---- HERE"],"script":"def locate_1 = doc['typeText'].value.indexOf('text',0)+1;return locate_1;","lang":"painless","position":{"offset":19,"start":4,"end":57},"caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}}]},"status":400}
org.opensearch.client.ResponseException: method [POST], host [http://127.0.0.1:50101], URI [/_plugins/_sql?format=json], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"type":"script_exception","reason":"runtime error","script_stack":["org.opensearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:943)","org.opensearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:145)","org.opensearch.index.query.QueryShardContext.lambda$lookup$1(QueryShardContext.java:423)","org.opensearch.search.lookup.SearchLookup.lambda$new$1(SearchLookup.java:87)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:94)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:91)","java.base/java.security.AccessController.doPrivileged(AccessController.java:312)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:91)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:55)","locate_1 = doc['typeText'].value.indexOf('text',0)+1;","               ^---- HERE"],"script":"def locate_1 = doc['typeText'].value.indexOf('text',0)+1;return locate_1;","lang":"painless","position":{"offset":19,"start":4,"end":57}}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"opensearch-sql_test_index_textkeyword","node":"vaywqI0PQWKFQl14hrmPzQ","reason":{"type":"script_exception","reason":"runtime error","script_stack":["org.opensearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:943)","org.opensearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:145)","org.opensearch.index.query.QueryShardContext.lambda$lookup$1(QueryShardContext.java:423)","org.opensearch.search.lookup.SearchLookup.lambda$new$1(SearchLookup.java:87)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:94)","org.opensearch.search.lookup.LeafDocLookup$1.run(LeafDocLookup.java:91)","java.base/java.security.AccessController.doPrivileged(AccessController.java:312)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:91)","org.opensearch.search.lookup.LeafDocLookup.get(LeafDocLookup.java:55)","locate_1 = doc['typeText'].value.indexOf('text',0)+1;","               ^---- HERE"],"script":"def locate_1 = doc['typeText'].value.indexOf('text',0)+1;return locate_1;","lang":"painless","position":{"offset":19,"start":4,"end":57},"caused_by":{"type":"illegal_argument_exception","reason":"Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeText] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}}]},"status":400}
	at __randomizedtesting.SeedInfo.seed([4E9E17C90762EAE6:41FB7C6C5A450A13]:0)
	at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:375)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:345)
	at app//org.opensearch.client.RestClient.performRequest(RestClient.java:320)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeRequest(SQLIntegTestCase.java:327)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeRequest(SQLIntegTestCase.java:322)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeRequest(SQLIntegTestCase.java:310)
	at app//org.opensearch.sql.legacy.SQLIntegTestCase.executeQuery(SQLIntegTestCase.java:293)
	at app//org.opensearch.sql.sql.TextTypeIT.selectPositionText(TextTypeIT.java:194)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:567)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at [email protected]/java.lang.Thread.run(Thread.java:830)

@MitchellGale
Copy link
Author

selectPositionTextKeywordFieldNoFieldData: FAILURE

[2022-12-14T06:17:56,482][INFO ][o.o.s.s.TextTypeIT       ] [selectPositionTextKeywordFieldNoFieldData] before test
[2022-12-14T06:17:56,502][ERROR][o.o.s.u.MatcherUtils     ] [selectPositionTextKeywordFieldNoFieldData] verify schema failed, response: {"error":{"reason":"Error occurred in OpenSearch engine: all shards failed","details":"Shard[0]: ScriptException[runtime error]; nested: IllegalArgumentException[Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [typeKeywordFieldNoFieldData] in order to load field data by uninverting the inverted index. Note that this can use significant memory.];\n\nFor more details, please send request for Json format to see the raw response from OpenSearch engine.","type":"SearchPhaseExecutionException"},"status":400}
org.json.JSONException: JSONObject["schema"] not found.
	at org.json.JSONObject.get(JSONObject.java:566) ~[json-20180813.jar:?]
	at org.json.JSONObject.getJSONArray(JSONObject.java:760) ~[json-20180813.jar:?]
	at org.opensearch.sql.util.MatcherUtils.verifySchema(MatcherUtils.java:134) [test/:?]
	at org.opensearch.sql.sql.TextTypeIT.selectPositionTextKeywordFieldNoFieldData(TextTypeIT.java:208) [test/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368) [randomizedtesting-runner-2.7.1.jar:?]
	at java.lang.Thread.run(Thread.java:830) [?:?]
[2022-12-14T06:17:56,504][INFO ][o.o.s.s.TextTypeIT       ] [selectPositionTextKeywordFieldNoFieldData] after test
REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.sql.TextTypeIT.selectPositionTextKeywordFieldNoFieldData" -Dtests.seed=4E9E17C90762EAE6 -Dtests.security.manager=false -Dtests.locale=ar-EG -Dtests.timezone=Antarctica/Casey -Druntime.java=13

JSONObject["schema"] not found.
org.json.JSONException: JSONObject["schema"] not found.
	at __randomizedtesting.SeedInfo.seed([4E9E17C90762EAE6:77825B6B2134DB88]:0)
	at app//org.json.JSONObject.get(JSONObject.java:566)
	at app//org.json.JSONObject.getJSONArray(JSONObject.java:760)
	at app//org.opensearch.sql.util.MatcherUtils.verifySchema(MatcherUtils.java:134)
	at app//org.opensearch.sql.sql.TextTypeIT.selectPositionTextKeywordFieldNoFieldData(TextTypeIT.java:208)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:567)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at [email protected]/java.lang.Thread.run(Thread.java:830)

@MitchellGale
Copy link
Author

selectPositionTypeTextFieldData: FAILURE

[2022-12-14T06:17:56,005][ERROR][o.o.s.u.MatcherUtils     ] [selectPositionTypeTextFieldData] verify schema failed, response: {"_shards":{"total":1,"failed":0,"successful":1,"skipped":0},"hits":{"hits":[{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD00","int0":0,"typeKeyword":"key00","typeKeywordFieldNoFieldData":"keyword00","typeKeywordFieldData":"textFD00","typeText":"text00","textDataFieldNoFields":"textFDNF00"},"_id":"1","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD01","int0":1,"typeKeyword":"key01","typeKeywordFieldNoFieldData":"keyword01","typeKeywordFieldData":"textFD01OverTen","typeText":"text01","textDataFieldNoFields":"textFDNF01"},"_id":"2","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD02","int0":2,"typeKeyword":"key02","typeKeywordFieldNoFieldData":"keyword02","typeKeywordFieldData":"textFD02","typeText":"text02","textDataFieldNoFields":"textFDNF02"},"_id":"3","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD03OverTen","int0":3,"typeKeyword":"key03","typeKeywordFieldNoFieldData":"keyword03","typeKeywordFieldData":"textFD03","typeText":"text03","textDataFieldNoFields":"textFDNF03"},"_id":"4","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD04","int0":4,"typeKeyword":"key04","typeKeywordFieldNoFieldData":"keyword04","typeKeywordFieldData":"textFD04","typeText":"text04","textDataFieldNoFields":"textFDNF04"},"_id":"5","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD05","int0":5,"typeKeyword":"key05","typeKeywordFieldNoFieldData":"keyword05","typeKeywordFieldData":"textFD0OverTen5","typeText":"text05","textDataFieldNoFields":"textFDNF05"},"_id":"6","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD06OverTen","int0":6,"typeKeyword":"key06","typeKeywordFieldNoFieldData":"keyword06","typeKeywordFieldData":"textFD06","typeText":"text06","textDataFieldNoFields":"textFDNF06"},"_id":"7","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}},{"_index":"opensearch-sql_test_index_textkeyword","_source":{"typeTextFieldData":"keyFD07","int0":7,"typeKeyword":"key07","typeKeywordFieldNoFieldData":"keyword07","typeKeywordFieldData":"textFD07","typeText":"text07","textDataFieldNoFields":"textFDNF07"},"_id":"8","_score":1,"fields":{"LOCATE('keyFD', typeTextFieldData)":[0]}}],"total":{"value":8,"relation":"eq"},"max_score":1},"took":7,"timed_out":false}
org.json.JSONException: JSONObject["schema"] not found.
	at org.json.JSONObject.get(JSONObject.java:566) ~[json-20180813.jar:?]
	at org.json.JSONObject.getJSONArray(JSONObject.java:760) ~[json-20180813.jar:?]
	at org.opensearch.sql.util.MatcherUtils.verifySchema(MatcherUtils.java:134) [test/:?]
	at org.opensearch.sql.sql.TextTypeIT.selectPositionTypeTextFieldData(TextTypeIT.java:215) [test/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47) [lucene-test-framework-9.4.1.jar:9.4.1 810817993e0956e63e29906e78a245949501b77d - ivera - 2022-10-20 15:29:24]
	at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.13.2.jar:4.13.2]
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) [randomizedtesting-runner-2.7.1.jar:?]
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368) [randomizedtesting-runner-2.7.1.jar:?]
	at java.lang.Thread.run(Thread.java:830) [?:?]
[2022-12-14T06:17:56,014][INFO ][o.o.s.s.TextTypeIT       ] [selectPositionTypeTextFieldData] after test
REPRODUCE WITH: ./gradlew ':integ-test:integTest' --tests "org.opensearch.sql.sql.TextTypeIT.selectPositionTypeTextFieldData" -Dtests.seed=4E9E17C90762EAE6 -Dtests.security.manager=false -Dtests.locale=ar-EG -Dtests.timezone=Antarctica/Casey -Druntime.java=13

JSONObject["schema"] not found.
org.json.JSONException: JSONObject["schema"] not found.
	at __randomizedtesting.SeedInfo.seed([4E9E17C90762EAE6:121A13F29BBDCBC3]:0)
	at app//org.json.JSONObject.get(JSONObject.java:566)
	at app//org.json.JSONObject.getJSONArray(JSONObject.java:760)
	at app//org.opensearch.sql.util.MatcherUtils.verifySchema(MatcherUtils.java:134)
	at app//org.opensearch.sql.sql.TextTypeIT.selectPositionTypeTextFieldData(TextTypeIT.java:215)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at [email protected]/java.lang.reflect.Method.invoke(Method.java:567)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at app//com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
	at app//org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
	at app//org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
	at app//org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
	at app//org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at app//com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at app//com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
	at [email protected]/java.lang.Thread.run(Thread.java:830)


@Test
public void selectPositionKeyword() {
executeJdbcRequest(String.format("select POSITION(key IN typeKeyword) from %s", TEST_INDEX_TEXTKEYWORD));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you need quotes around the text:

POSITION(\\\"key\\\" IN typeKeyword)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in a47e3ee

schema("SUBSTRING(textDataFieldNoFields, 1, 1)", null, "keyword"));
}

// protected JSONObject executeQuery(String query) throws IOException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved in 1371d40.

@MitchellGale MitchellGale force-pushed the dev-newDataTypeForText branch from 1371d40 to 7bf3753 Compare December 20, 2022 23:02
Signed-off-by: MitchellGale-BitQuill <[email protected]>
Signed-off-by: MitchellGale-BitQuill <[email protected]>
Signed-off-by: MitchellGale-BitQuill <[email protected]>
Signed-off-by: MitchellGale-BitQuill <[email protected]>
@MitchellGale MitchellGale force-pushed the dev-newDataTypeForText branch from 7bf3753 to 0222df6 Compare December 20, 2022 23:04
andy-k-improving pushed a commit that referenced this pull request Nov 16, 2024
* Import h3 library (#154)

Made following changes to make it compatible:
1. Rename package from elasticsearch to opensearch.geospatial
2. Update License headers
3. Update build file
4. Update settings to include sub projects

* Use Transport Request (#164)

Remove usage of deprecated BaseNodeRequest

* Update http client package to resolve build failure (#168) (#171)

* Introduce H3 min resolution constant (#165)

H3 version 1 has 16 resolutions, numbered 0 through 15.
Introduced a constant to represent min value, similar
to max value.

* Add geohex aggregation (#160)

This aggregation will use uber's h3 to group coordinates into H3 cell.
Created new aggregation type geohex_grid. The precision will be between
0 and 15. This aggreation has default precision as 5,
similar to geohash and geotile.

Signed-off-by: Vijayan Balasubramanian <[email protected]>

* Add integration test (#176)

Included integration test for geohex_grid.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants