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

QueryParserUtil, big query with wildcards -> runs endlessly and produces heavy load

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: modules/queryparser
    • Labels:
      None
    • Environment:

      Lucene 4.7.2
      Java 6

    • Lucene Fields:
      New

      Description

      The following "testcase" runs endlessly and produces VERY heavy load.
      ...
      String query = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut "
      + "labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et "
      + "ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
      + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt "
      + "ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores "
      + "et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet"; String query = query.replaceAll( "
      s+", "*" ); try { QueryParserUtil.parse( query, new String[]

      { "test" }

      , new Occur[]

      { Occur.MUST }

      , new KeywordAnalyzer() ); } catch ( Exception e )

      { Assert.fail( e.getMessage() ); }

      ...

      I don't say this testcase makes "sense", nevertheless the question remains whether this is a bug or a "feature"?

      99% the threaddump/stacktrace looks as follows:
      BasicOperations.determinize(Automaton) line: 680
      Automaton.determinize() line: 759
      SpecialOperations.getCommonSuffixBytesRef(Automaton) line: 165
      CompiledAutomaton.<init>(Automaton, Boolean, boolean) line: 168
      CompiledAutomaton.<init>(Automaton) line: 91
      WildcardQuery(AutomatonQuery).<init>(Term, Automaton) line: 67
      WildcardQuery.<init>(Term) line: 57
      WildcardQueryNodeBuilder.build(QueryNode) line: 42
      WildcardQueryNodeBuilder.build(QueryNode) line: 32
      StandardQueryTreeBuilder(QueryTreeBuilder).processNode(QueryNode, QueryBuilder) line: 186
      StandardQueryTreeBuilder(QueryTreeBuilder).process(QueryNode) line: 125
      StandardQueryTreeBuilder(QueryTreeBuilder).build(QueryNode) line: 218
      StandardQueryTreeBuilder.build(QueryNode) line: 82
      StandardQueryTreeBuilder.build(QueryNode) line: 53
      StandardQueryParser(QueryParserHelper).parse(String, String) line: 258
      StandardQueryParser.parse(String, String) line: 168
      QueryParserUtil.parse(String, String[], BooleanClause$Occur[], Analyzer) line: 119
      IndexingTest.queryParserUtilLimit() line: 1450

        Attachments

        1. afterdet.png
          2.33 MB
          Michael McCandless

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              clemensdev Clemens Wyss
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: