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

Allow single prefix "phrase*" in complexphrase queryparser

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4, 7.0
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      From Otmar Caduff <ocad...@gmail.com>
      Subject ComplexPhraseQueryParser with wildcards
      Date Tue, 20 Dec 2016 13:55:42 GMT
      Hi,

      I have an index with a single document with a field "field" and textual
      content "johnny peters" and I am using
      org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser to
      parse the query:
      field: (john* peter)
      When searching with this query, I am getting the document as expected.
      However with this query:
      field: ("john*" "peter")
      I am getting the following exception:
      Exception in thread "main" java.lang.IllegalArgumentException: Unknown
      query type "org.apache.lucene.search.PrefixQuery" found in phrase query
      string "john*"
      at
      org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser$ComplexPhraseQuery.rewrite(ComplexPhraseQueryParser.java:268)

        Attachments

        1. LUCENE-7614.patch
          2 kB
          Mikhail Khludnev
        2. LUCENE-7614.patch
          2 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mkhludnev Mikhail Khludnev
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: