Aron

Please open a JIRA and attach a patch. See
https://wiki.apache.org/nutch/HowToContribute for the patch format etc...

Thanks

Julien


On 5 September 2013 13:18, Scheffel, Aaron <[email protected]>wrote:

> In version 2.2.1 and 1.7
>
> Class org.apache.nutch.indexer.solr.SolrWriter
>
> Line 66
>
>
> inputDoc.addField(solrMapping.mapKey(e.getKey()), val2);
>
> String sCopy = solrMapping.mapCopyKey(e.getKey());
>
> if (sCopy != e.getKey()) {
>
> inputDoc.addField(sCopy, val2);
>
> }
>
>
> There is a string comparison "sCopy != e.getKey()" with a != and not an
> equals. It basically never works right. Not sure if someone was trying to
> be clever but even if those strings are the same they happen to be
> different objects. Which I'm assuming is due to how the strings are
> serialized in from the config files.
>
>
> Suggest its updated to
>
>
> String sCopy = solrMapping.mapCopyKey(e.getKey());
>
> if (!sCopy.equals(solrMapping.mapKey(e.getKey()))) {
>
>       inputDoc.addField(sCopy, val2);
>
> }
>
>
> -Aaron
>



-- 
*
*Open Source Solutions for Text Engineering

http://digitalpebble.blogspot.com/
http://www.digitalpebble.com
http://twitter.com/digitalpebble

Reply via email to