[ https://issues.apache.org/jira/browse/SOLR-9995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15935749#comment-15935749 ]
Varun Thacker commented on SOLR-9995: ------------------------------------- David's suggestion on https://issues.apache.org/jira/browse/SOLR-9994?focusedCommentId=15875390&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15875390 could probably be part of this scope as well > Simple cleanup of PointFields code > ----------------------------------- > > 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 > > 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org