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

2013-02-03 Thread Mateusz Matela (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13569777#comment-13569777
 ] 

Mateusz Matela commented on SOLR-3967:
--

Yes, the fix looks good. Thanks!

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2013-01-30 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566329#comment-13566329
 ] 

Commit Tag Bot commented on SOLR-3967:
--

[branch_4x commit] Jan Høydahl
http://svn.apache.org/viewvc?view=revision&revision=1440319

SOLR-3967: langid.enforceSchema option checks source field instead of target 
field (merge from trunk)


> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2013-01-29 Thread Commit Tag Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566007#comment-13566007
 ] 

Commit Tag Bot commented on SOLR-3967:
--

[trunk commit] Jan Høydahl
http://svn.apache.org/viewvc?view=revision&revision=1440226

SOLR-3967: langid.enforceSchema option checks source field instead of target 
field


> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2013-01-24 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561615#comment-13561615
 ] 

Jan Høydahl commented on SOLR-3967:
---

The patch moves the enforce logic to the getMappedField() method.

I also fixed an issue where langid would fallback to original field instead of 
aborting in case mapped field does not exist. Will commit shortly if no 
objections.

> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2012-11-04 Thread Alexey Kudinov (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490188#comment-13490188
 ] 

Alexey Kudinov commented on SOLR-3967:
--

Apparently it should check the mapped field

> 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
>
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org