You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Yamaga fow (Jira)" <ji...@apache.org> on 2022/03/16 16:59:00 UTC

[jira] [Created] (CALCITE-5049) Elasticsearch Adapter - Jion failed error

Yamaga fow created CALCITE-5049:
-----------------------------------

             Summary: Elasticsearch Adapter - Jion failed error
                 Key: CALCITE-5049
                 URL: https://issues.apache.org/jira/browse/CALCITE-5049
             Project: Calcite
          Issue Type: Bug
          Components: elasticsearch-adapter
    Affects Versions: 1.29.0
            Reporter: Yamaga fow


Hi

I am trying to make a join sql query over Elasticsearch but it's returning this error:

 

SQL query:
{code:java}
SELECT * FROM "jp_art_desc" a inner join "jp_art_coef" b ON a.ID_ART = b.ID_ART ; {code}
Error:
{code:java}
SQL Error: Error while executing SQL "SELECT * FROM "jp_art_desc" a inner  join "jp_art_coef" b ON a.ID_ART = b.ID_ART ": org.elasticsearch.client.ResponseException: method [POST], host [http://***], URI [/jp_art_desc/_search?scroll=1m], status line [HTTP/1.1 400 Bad Request]
{"error":{"root_cause":[{"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 [ID_ART] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"jp_art_desc","node":"rcltVuOcTJOLJxnuGelrOA","reason":{"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 [ID_ART] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}],"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 [ID_ART] in order to load field data by uninverting the inverted index. Note that this can use significant memory.","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 [ID_ART] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}},"status":400} {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)