[ 
https://issues.apache.org/jira/browse/CALCITE-5049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ZheHu resolved CALCITE-5049.
----------------------------
    Fix Version/s: 1.39.0
       Resolution: Duplicate

I'll mark this case as duplicated since 
[CALCITE-4954|https://issues.apache.org/jira/browse/CALCITE-4954] is resolved.

> Error when executing join on Elasticsearch Adapter
> --------------------------------------------------
>
>                 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
>            Priority: Critical
>             Fix For: 1.39.0
>
>
> Hi
> I am trying to make a SQL join 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.10#820010)

Reply via email to