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

Hoss Man commented on SOLR-9995:
--------------------------------

i've spun off 2 sub-tasks for the specific suggestions made so far.

In general i think having smaller, individual issues to track these changes is 
better because it will help us keep them isolated, move forward more flexible 
with individual changes even if others prove problematic, & track individually 
in CHANGES when each improvement was made (in case something in inadvertently 
causes a bug and we want to track down how widely impacted people are)

> refactor / cleanup PointFields code and overall asumptions about numerics
> -------------------------------------------------------------------------
>
>                 Key: SOLR-9995
>                 URL: https://issues.apache.org/jira/browse/SOLR-9995
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Tomás Fernández Löbbe
>            Priority: Trivial
>
> Generalizing this issue to serve as a parent for small individual 
> improvements/cleanup/refactoring subtasks that can be made to various places 
> in the solr code where we deal with Points fields and other older types of 
> numeric fields.
> ----
> Original description...
> As Suggested by Adrien in 
> [SOLR-8396|https://issues.apache.org/jira/browse/SOLR-8396?focusedCommentId=15828365&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15828365]
> {quote}
> 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}
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to