cpoerschke commented on code in PR #3318:
URL: https://github.com/apache/solr/pull/3318#discussion_r2064100792


##########
solr/core/src/java/org/apache/solr/search/RankQParserPlugin.java:
##########
@@ -73,6 +73,18 @@ public Query createQuery(String fieldName, SolrParams 
params) throws SyntaxError
         }
       }
     },
+    LINEAR {
+      @Override
+      public Query createQuery(String fieldName, SolrParams params) throws 
SyntaxError {
+        float weight = params.getFloat(WEIGHT, 1f);
+        try {
+          return FeatureField.newLinearQuery(
+              RankField.INTERNAL_RANK_FIELD_NAME, fieldName, weight);
+        } catch (IllegalArgumentException iae) {
+          throw new SyntaxError(iae.getMessage());
+        }
+      }
+    },

Review Comment:
   #3339 for this, with tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to