Skip to content

Commit 767e3ca

Browse files
authored
Fix DMP Visibility (#248)
* Add support for boost params + mult boosts * Make DMP parameters interface public
1 parent b55227f commit 767e3ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

montysolr/src/main/java/org/apache/solr/search/AqpExtendedDismaxQParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static class U extends SolrPluginUtils {
6969
/**
7070
* shorten the class references for utilities
7171
*/
72-
private interface DMP extends DisMaxParams {
72+
public interface DMP extends DisMaxParams {
7373
/**
7474
* User fields. The fields that can be used by the end user to create field-specific queries.
7575
*/
@@ -187,7 +187,7 @@ public Query parse() throws SyntaxError {
187187
Query topQuery = QueryUtils.build(query, this);
188188
List<ValueSource> boosts = getMultiplicativeBoosts();
189189
if (boosts.size() > 1) {
190-
ValueSource prod = new ProductFloatFunction(boosts.toArray(new ValueSource[boosts.size()]));
190+
ValueSource prod = new ProductFloatFunction(boosts.toArray(new ValueSource[0]));
191191
topQuery = FunctionScoreQuery.boostByValue(topQuery, prod.asDoubleValuesSource());
192192
} else if (boosts.size() == 1) {
193193
topQuery = FunctionScoreQuery.boostByValue(topQuery, boosts.get(0).asDoubleValuesSource());

0 commit comments

Comments
 (0)