You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Mike Drob (Jira)" <ji...@apache.org> on 2020/01/15 21:03:00 UTC
[jira] [Commented] (LUCENE-9142) Operations computes next state
inefficiently during determinize()
[ https://issues.apache.org/jira/browse/LUCENE-9142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17016319#comment-17016319 ]
Mike Drob commented on LUCENE-9142:
-----------------------------------
Continuing to look through this more, we have magic tucked away into the {{equals}} method to tie the two classes together. Going to repurpose this JIRA to simply add docs to this so somebody else doesn't get tripped up on this in the future.
> Operations computes next state inefficiently during determinize()
> -----------------------------------------------------------------
>
> Key: LUCENE-9142
> URL: https://issues.apache.org/jira/browse/LUCENE-9142
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/search
> Reporter: Mike Drob
> Priority: Major
>
> Was tracing through the fuzzy query code, and IntelliJ helpfully pointed out that we have mismatched types when trying to reuse states, and so we may be creating more states than we need to.
> Relevant snippets:
> {code:title=Operations.java}
> Map<SortedIntSet.FrozenIntSet,Integer> newstate = new HashMap<>();
> final SortedIntSet statesSet = new SortedIntSet(5);
> Integer q = newstate.get(statesSet);
> {code}
> {{q}} is always going to be null in this path because there are no SortedIntSet keys in the map.
> There are also very little javadoc on SortedIntSet, so I'm having trouble following the precise relationship between all the pieces here.
> cc: [~mikemccand] [~romseygeek] - I would appreciate any pointers if you have them
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org