hive-solr
hive-solr copied to clipboard
Support case insensitive fieldnames from solr
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
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.
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.