Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1
    • Fix Version/s: 4.4, 6.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 7

    • Lucene Fields:
      New

      Description

      Setting maxGraphExpansions > 0 with a lot of expansions (e.g. due to synonyms).
      Set<IntsRef> paths = toFiniteStrings(surfaceForm, ts2a);
      paths may be null, so maxAnalyzedPathsForOneInput = Math.max(maxAnalyzedPathsForOneInput, paths.size()) may end with NPE

      1. LUCENE-4971.patch
        3 kB
        Michael McCandless
      2. LUCENE-4971.patch
        2 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Patch with a test case showing the NPE.

        The question is how to fix it ... SpecialOperations.getFiniteStrings today returns null when it hits the limit, yet, it has accumulated the first N strings it saw at that point, so maybe we should change it to return the first N so that we have something to build?

        Or alternatively, AnalyzingSuggester could just skip a given input if it created too many strings.

        Show
        Michael McCandless added a comment - Patch with a test case showing the NPE. The question is how to fix it ... SpecialOperations.getFiniteStrings today returns null when it hits the limit, yet, it has accumulated the first N strings it saw at that point, so maybe we should change it to return the first N so that we have something to build? Or alternatively, AnalyzingSuggester could just skip a given input if it created too many strings.
        Hide
        Michael McCandless added a comment -

        I'd lean towards returning the first N after the limit is hit; this way at least some expansions are indexed.

        Show
        Michael McCandless added a comment - I'd lean towards returning the first N after the limit is hit; this way at least some expansions are indexed.
        Hide
        Michael McCandless added a comment -

        Patch, just indexing the first limit expanded strings.

        Show
        Michael McCandless added a comment - Patch, just indexing the first limit expanded strings.
        Hide
        Robert Muir added a comment -

        +1, the new semantics for the getFiniteStrings seem more useful to me anyway: I dont see any advantage of returning null.

        Show
        Robert Muir added a comment - +1, the new semantics for the getFiniteStrings seem more useful to me anyway: I dont see any advantage of returning null.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] mikemccand
        http://svn.apache.org/viewvc?view=revision&revision=1495206

        LUCENE-4971: fix NPE in AnalyzingSuggester when there are too many graph expansions

        Show
        Commit Tag Bot added a comment - [trunk commit] mikemccand http://svn.apache.org/viewvc?view=revision&revision=1495206 LUCENE-4971 : fix NPE in AnalyzingSuggester when there are too many graph expansions
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] mikemccand
        http://svn.apache.org/viewvc?view=revision&revision=1495207

        LUCENE-4971: fix NPE in AnalyzingSuggester when there are too many graph expansions

        Show
        Commit Tag Bot added a comment - [branch_4x commit] mikemccand http://svn.apache.org/viewvc?view=revision&revision=1495207 LUCENE-4971 : fix NPE in AnalyzingSuggester when there are too many graph expansions
        Hide
        Michael McCandless added a comment -

        Thanks Alexey!

        Show
        Michael McCandless added a comment - Thanks Alexey!
        Hide
        Steve Rowe added a comment -

        Bulk close resolved 4.4 issues

        Show
        Steve Rowe added a comment - Bulk close resolved 4.4 issues

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Alexey Kudinov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development