You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (JIRA)" <ji...@apache.org> on 2013/01/30 10:53:13 UTC

[jira] [Resolved] (SOLR-3967) Mapping error: langid.enforceSchema option checks source field instead of target field

     [ https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Høydahl resolved SOLR-3967.
-------------------------------

    Resolution: Fixed

This should now be fixed. Perhaps you [~mmatela] would care to check out the code and verify if you're happy?
                
> Mapping error: langid.enforceSchema option checks source field instead of target field
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-3967
>                 URL: https://issues.apache.org/jira/browse/SOLR-3967
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - LangId
>    Affects Versions: 4.0
>            Reporter: Mateusz Matela
>            Assignee: Jan Høydahl
>             Fix For: 4.2, 5.0
>
>         Attachments: SOLR-3967.patch
>
>
> I use LangDetect update processor with a document that has "body" field. LangDetect should map this field to "body_pl", "body_en" or "body_nolang". My schema defines fields with language suffixes, but not "body" field. When the processor runs, I get error:
> {quote}Unsuccessful field name mapping to body_nolang, field does not exist, skipping mapping.{quote}
> I looked up source code and it seems there's an error in {{org.apache.solr.update.processor.LanguageIdentifierUpdateProcessor.process(SolrInputDocument)}}:
> {noformat}
>           String mappedOutputField = getMappedField(fieldName, fieldLang);
>           if(enforceSchema && schema.getFieldOrNull(fieldName) == null) {
>             log.warn("Unsuccessful field name mapping to {}, field does not exist, skipping mapping.", mappedOutputField, fieldName);
>             mappedOutputField = fieldName;
>           }
> {noformat}
> I think it should check for {{schema.getFieldOrNull(mappedOutputField)}} instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org