lucidworks / hive-solr

Code to index Hive tables to Solr and Solr indexes to Hive
Apache License 2.0
47 stars 34 forks source link

Support case insensitive fieldnames from solr #61

Open juarezr opened 5 years ago

juarezr commented 5 years ago

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:

ctargett commented 5 years ago

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.

juarezr commented 5 years ago

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.