lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-10399) generalize some SimpleFacet logic realted to PointsField vs other fields
Date Sat, 01 Apr 2017 01:25:42 GMT

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

ASF subversion and git services commented on SOLR-10399:
--------------------------------------------------------

Commit eb9a4b962088ee38358303cc8e75d3b83c910ef3 in lucene-solr's branch refs/heads/branch_6x
from Chris Hostetter
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=eb9a4b9 ]

SOLR-10399: Generalize some internal facet logic to simplify points/non-points field handling

(cherry picked from commit b60b86ecab797396ab6bd8be82740191922b0aa2)


> generalize some SimpleFacet logic realted to PointsField vs other fields
> ------------------------------------------------------------------------
>
>                 Key: SOLR-10399
>                 URL: https://issues.apache.org/jira/browse/SOLR-10399
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>
> {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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message