Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

only send one boost value for multi-valued fields

Ryan McKinleyf475f5d76c3f
diff --git a/client/java/solrj/src/org/apache/solr/client/solrj/util/ClientUtils.java b/client/java/solrj/src/org/apache/solr/client/solrj/util/ClientUtils.java
index 71d4c47660d..2e5fa8beac7 100644
--- a/client/java/solrj/src/org/apache/solr/client/solrj/util/ClientUtils.java
+++ b/client/java/solrj/src/org/apache/solr/client/solrj/util/ClientUtils.java
@@ -92,6 +92,9 @@ public class ClientUtils
Float boost = doc.getBoost( name );
for( Object o : doc.getFieldValues( name ) ) {
writeFieldValue(writer, name, boost, o );
+ // only write the boost for the first mulit-valued field
+ // otherwise, the used boost is the product of all the boost values
+ boost = null;
}
}
writer.write("</doc>");