[ 
https://issues.apache.org/jira/browse/LUCENE-7695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867947#comment-15867947
 ] 

Alexandre Rafalovitch commented on LUCENE-7695:
-----------------------------------------------

This would have been better discussed on the mailing list first, I feel.

I suspect what might be happening here is that one of the terms is hitting 
synonym expansion and perhaps that is not supported. This is strengthened by 
the fact that the words in the exception do not match the word you gave 
triggering it.

So, I would check the type definition, synonym file it uses and the synonyms in 
there. If I am right, the bigger question then is whether 
ComplexPhraseQueryParser is expected to support synonyms. If yes, then that 
would be the actual issue here.

> Unknown query type SynonymQuery in ComplexPhraseQueryParser
> -----------------------------------------------------------
>
>                 Key: LUCENE-7695
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7695
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/queryparser
>    Affects Versions: 6.4
>            Reporter: Markus Jelsma
>             Fix For: 7.0, 6.5, 6.4.2
>
>
> We sometimes receive this exception using ComplexPhraseQueryParser via Solr 
> 6.4.0. Some terms do fine, others don't.
> This query:
> {code}
> {!complexphrase}owmskern_title:"vergunning" 
> {code}
> returns results just fine. The next one:
> {code}
> {!complexphrase}owmskern_title:"vergunningen~"
> {code}
> Gives results as well! But this one:
> {code}
> {!complexphrase}owmskern_title:"vergunningen"
> {code}
> Returns the following exception:
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to