[
https://issues.apache.org/jira/browse/SOLR-9027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15259548#comment-15259548
]
David Smiley commented on SOLR-9027:
------------------------------------
I took a peek at what you committed out of curiosity.
* why wrap each BytesRef in a Term when in the end you just need the BytesRef?
Or maybe I'm mistaken.
* equals and hashcode is on {{id}} yet you initialize that to {{new Object()}}.
Firstly; why not have equals/hashcode actually work? Secondly, if for some
reason it should be this way, then you can do away with {{id}} and do equals on
instance equality of the query instance -- you don't need id.
* Query fields should be 'final' to emphasize immutability.
* I think it's very suspicious that GraphTermsQuery holds List<TermContext>; I
think the Query object should not hold state pertaining to the actual index as
it could cause issues with caching. Maybe you could do the construction of
this in createWeight and hold it on the Weight?
* collectTermContext: assuming just one field is actually supported, this could
avoid looking up a Terms for each query terms since it'd always be the same.
* in no place do I see you sort the incoming terms. It's faster to seek
sequentially and not randomly.
> Add GraphTermsQuery to limit traversal on high frequency nodes
> --------------------------------------------------------------
>
> Key: SOLR-9027
> URL: https://issues.apache.org/jira/browse/SOLR-9027
> Project: Solr
> Issue Type: New Feature
> Reporter: Joel Bernstein
> Priority: Minor
> Attachments: SOLR-9027.patch, SOLR-9027.patch, SOLR-9027.patch,
> SOLR-9027.patch
>
>
> The gatherNodes() Streaming Expression is currently using a basic disjunction
> query to perform the traversals. This ticket is to create a specific
> GraphTermsQuery for performing the traversals.
> The GraphTermsQuery will be based off of the TermsQuery, but will also
> include an option for a docFreq cutoff. Terms that are above the docFreq
> cutoff will not be included in the query. This will help users do a more
> precise and efficient traversal.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]