[
https://issues.apache.org/jira/browse/SOLR-6018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexandre Rafalovitch resolved SOLR-6018.
-----------------------------------------
Resolution: Won't Fix
> Solr DataImportHandler not finding dynamic fields
> -------------------------------------------------
>
> Key: SOLR-6018
> URL: https://issues.apache.org/jira/browse/SOLR-6018
> Project: Solr
> Issue Type: Bug
> Components: contrib - DataImportHandler
> Affects Versions: 4.7
> Reporter: Aaron LaBella
> Priority: Major
> Fix For: 4.9
>
> Attachments: 0001-dih-config-check-for-dynamic-fields.patch
>
>
> There is an issue with
> *org.apache.solr.handler.dataimport.DocBuilder:addFields* around ~line 643.
> The logic currently says see if you can find the field from the schema, ie:
> {code:title=DocBuilder.java|borderStyle=solid}
> SchemaField sf = schema.getFieldOrNull(key);
> {code}
> and, if not found, go ask DIHConfiguration to find it, ie:
> {code:title=DocBuilder.java|borderStyle=solid}
> sf = config.getSchemaField(key);
> {code}
> The latter call takes into account case-insensitivity, which is a big deal
> since some databases, ie: DB2, upper case all the resulting column names. In
> order to not modify solr-core (ie: the match logic in IndexSchema), I'm
> attaching a patch that makes DIHConfiguration apply the same case-insensitive
> logic to the DynamicFields.
> Without this patch, dynamic fields will not be added to the index unless you
> declare them like this:
> {code:xml}
> <dynamicField name="*_S" type="string" indexed="true" stored="true" />
> {code}
> (note the capital S)
> which is in-consistent with what I believe to be solr schema conventions to
> have all the schema fields as lower-case.
> Thanks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]