Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9142

Add documentation to Operations.determinize, SortedIntSet, and FrozenSet

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: master (9.0)
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      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:

      Operations.java
          Map<SortedIntSet.FrozenIntSet,Integer> newstate = new HashMap<>();
      
          final SortedIntSet statesSet = new SortedIntSet(5);
      
          Integer q = newstate.get(statesSet);
      

      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: Michael McCandless Alan Woodward - I would appreciate any pointers if you have them

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mdrob Mike Drob
                Reporter:
                mdrob Mike Drob
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m