Hi,

Is there a way to select text fields in a query with a join clause in
Streaming Expressions or Parallel SQL? The following query:

SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a LIMIT 10

requires that field_t, which is of type text, have docValues enabled, which
is not supported afaik:

java.io.IOException: --> http://172.31.34.56:8983/solr/t1:Failed to execute
sqlQuery 'SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a
LIMIT 10' against JDBC connection 'jdbc:calcitesolr:'. Error while
executing SQL "SELECT field_s, field_t FROM t1 INNER JOIN t2 ON t1.a = t2.a
LIMIT 10": java.io.IOException: java.util.concurrent.ExecutionException:
java.io.IOException: -->
http://172.18.0.2:8983/solr/t1_shard1_replica_n1/:field_t{type=text_general,properties=indexed,tokenized,stored,useDocValuesAsStored,uninvertible}
must have DocValues to use this feature.

Its equivalent streaming expression clearly results in the same:

innerJoin(
  search(t1, q="*:*", qt="/export", fl="a1,field_t", sort="a asc"),
  search(t2, q="*:*", qt="/export", fl="a2,field_s", sort="a asc"),
  on="a"
)

java.io.IOException: -->
http://172.31.34.56:8983/solr/reviews:java.util.concurrent.ExecutionException:
java.io.IOException: -->
http://172.18.0.2:8983/solr/t1_shard1_replica_n1/:field_t{type=text_general,properties=indexed,tokenized,stored,useDocValuesAsStored,uninvertible}
must have DocValues to use this feature.

Thanks,
A.

Reply via email to