Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5049

Error when executing join on Elasticsearch Adapter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.29.0
    • None
    • elasticsearch-adapter
    • None

    Description

      Hi

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

       

      SQL query:

      SELECT * FROM "jp_art_desc" a inner join "jp_art_coef" b ON a.ID_ART = b.ID_ART ; 

      Error:

      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} 

      Attachments

        Activity

          People

            Unassigned Unassigned
            yamaga Yamaga fow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: