hive-solr icon indicating copy to clipboard operation
hive-solr copied to clipboard

Support case insensitive fieldnames from solr

Open juarezr opened this issue 6 years ago • 2 comments

Today mixed case field return null value instead. For example:

<field name="id" type="string" indexed="true" stored="true"  />
<field name="clientId" type="string" indexed="true" stored="true"  required="true"/>
<field name="ownerId" type="string" indexed="true" stored="true" required="true"/>

Using the following query:

SELECT id, clientId, ownerId from my_solr_table limit 1

will return the values:

  • abcefg
  • null
  • null

juarezr avatar Nov 22 '18 20:11 juarezr

Lack of support for mixed-case field names would be a surprise to me, but I guess it's possible.

Does Solr record any errors in its logs when this query is performed? It would be interesting to find out what Solr thinks it's being asked for to pinpoint the mismatch.

ctargett avatar Nov 26 '18 14:11 ctargett

No log while querying. When storing it depends on dynamicField configuration. But it doesn't solve the problem.

<dynamicField name="*_i"  type="int"    indexed="true"  stored="true"/>
<dynamicField name="*_is" type="ints"    indexed="true"  stored="true"/>
<dynamicField name="*_s"  type="string"  indexed="true"  stored="true" />
<dynamicField name="*_ss" type="strings"  indexed="true"  stored="true"/>

I checked and this github has a workaround in his lib.

juarezr avatar Nov 27 '18 19:11 juarezr