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

Unknown query type SynonymQuery in ComplexPhraseQueryParser

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4
    • Fix Version/s: 6.5, 7.0
    • Component/s: core/queryparser
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We sometimes receive this exception using ComplexPhraseQueryParser via Solr 6.4.0. Some terms do fine, others don't.

      This query:

      {!complexphrase}owmskern_title:"vergunning" 
      

      returns results just fine. The next one:

      {!complexphrase}owmskern_title:"vergunningen~"
      

      Gives results as well! But this one:

      {!complexphrase}owmskern_title:"vergunningen"
      

      Returns the following exception:

      IllegalArgumentException: Unknown query type "org.apache.lucene.search.SynonymQuery" found in phrase query string "algemene plaatselijke verordening"
              at org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser$ComplexPhraseQuery.rewrite(ComplexPhraseQueryParser.java:313)
              at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:265)
              at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:684)
              at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:734)
              at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
              at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:241)
              at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1919)
              at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1636)
              at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:611)
              at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:533)
              at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
      

        Attachments

        1. LUCENE-7695.patch
          7 kB
          Mikhail Khludnev
        2. LUCENE-7695.patch
          5 kB
          Markus Jelsma
        3. LUCENE-7695.patch
          3 kB
          Markus Jelsma
        4. LUCENE-7695.patch
          2 kB
          Markus Jelsma
        5. LUCENE-7695.patch
          2 kB
          Markus Jelsma

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              markus17 Markus Jelsma
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: