[ 
https://issues.apache.org/jira/browse/SOLR-8396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15828365#comment-15828365
 ] 

Adrien Grand commented on SOLR-8396:
------------------------------------

It is a pity we have to add that many calls to {{isPointField()}} but I don't 
have a better idea and I think it is nice how you emit explicit errors eg. when 
users try to sort on a point field that does not have doc values. Otherwise the 
change looks good, I focused on the point types and the way you generate eg. 
range queries using {{*Point.nextDown/nextUp}} looked good.

One suggestion for a simplification: in the below change, it looks like the 
logic that you apply to point fields would work in the general case and be as 
efficient?

{code}
+    if (ft.isPointField()) {
+      for (String term : terms) {
+        int count = searcher.numDocs(ft.getFieldQuery(null, sf, term), 
parsed.docs);
+        res.add(term, count);
+      }
+    } else {
+      for (String term : terms) {
+        String internal = ft.toInternal(term);
+        int count = searcher.numDocs(new TermQuery(new Term(field, internal)), 
parsed.docs);
+        res.add(term, count);
+      }
     }
{code}

> Add support for PointFields in Solr
> -----------------------------------
>
>                 Key: SOLR-8396
>                 URL: https://issues.apache.org/jira/browse/SOLR-8396
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ishan Chattopadhyaya
>         Attachments: SOLR-8396.patch, SOLR-8396.patch, SOLR-8396.patch, 
> SOLR-8396.patch, SOLR-8396.patch, SOLR-8396.patch, SOLR-8396.patch, 
> SOLR-8396.patch, SOLR-8396.patch
>
>
> In LUCENE-6917, [~mikemccand] mentioned that DimensionalValues are better 
> than NumericFields in most respects. We should explore the benefits of using 
> it in Solr and hence, if appropriate, switch over to using them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to