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

Regex bug in AnalyzingQueryParser

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.9
    • Fix Version/s: None
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      Dennis Walter recently pointed out this bug on dev@lucene.apache.org:

      " // gobble escaped chars or find a wildcard character
      private final Pattern wildcardPattern = Pattern.compile("(
      .)|([?*]+)");

      The first group will match a literal dot ("."), while its intention seems to be to match a backslash and a single character. So the expression should instead be "(\\\\.)|([?*]+)" "

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tallison Tim Allison
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: