HoustonPutman commented on code in PR #3922:
URL: https://github.com/apache/solr/pull/3922#discussion_r2599492953


##########
solr/core/src/java/org/apache/solr/schema/PointField.java:
##########
@@ -158,15 +167,23 @@ public Query getFieldQuery(QParser parser, SchemaField 
field, String externalVal
       // currently implemented as singleton range
       return getRangeQuery(parser, field, externalVal, externalVal, true, 
true);
     } else if (field.indexed() && field.hasDocValues()) {
-      Query pointsQuery = getExactQuery(field, externalVal);
+      Query indexQuery = getExactQuery(parser, field, externalVal);
       Query dvQuery = getDocValuesRangeQuery(parser, field, externalVal, 
externalVal, true, true);
-      return new IndexOrDocValuesQuery(pointsQuery, dvQuery);
+      return new IndexOrDocValuesQuery(indexQuery, dvQuery);
     } else {
-      return getExactQuery(field, externalVal);
+      return getExactQuery(parser, field, externalVal);
     }
   }
 
-  protected abstract Query getExactQuery(SchemaField field, String 
externalVal);
+  final Query getExactQuery(QParser parser, SchemaField field, String 
externalVal) {
+    if (hasIndexedTerms(field)) {
+      BytesRefBuilder br = new BytesRefBuilder();
+      readableToIndexed(externalVal, br);
+      return new TermQuery(new Term(field.getName(), br));
+    } else {
+      return getPointRangeQuery(parser, field, externalVal, externalVal, true, 
true);

Review Comment:
   no, they are functionally the same. And the only reason I didn't do this was 
so that I didn't have to write another `getSpecializedExactQuery` that does the 
`IntPoint.nextExactQuery` or `LongPoint.nextExactQuery`, etc. But that's an 
easy thing to add back in.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to