Query time synonym expansion has problems with multi-word synonyms.
Query parser splits query string according to white-spaces before query string 
reaches to analysis chain.


This is a known limitation explained here : 

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.SynonymFilterFactory

But I think using synonyms at index time has its problems as well. E.g. You 
need to re-index if you add/remove/edit synonym list. For some systems 
re-indexing takes a lot of time. 

I am wondering if a "query expansion module" that injects (before analysis 
chain) synonymy to initial query string would makes sense. 
E.g. If the query string contains 'adult education' it will add "educación de 
adultos" phrase as an injected optional clause.

About query slop, since you are using (e)dismax query parser, it is controlled 
via qs parameter.

http://wiki.apache.org/solr/DisMaxQParserPlugin#qs_.28Query_Phrase_Slop.29 


> has anyone managed to get querytime synonym expansion
> working?
> 
> Synonym expansion itself is working but I get no search
> results.
> 
> synonyms_test.txt
> erwachsenenbildung, adult education, educación de adultos,
> éducation des adultes
> 
> search for
> "erwachsenenbildung"   -->  8 hits
> search for "adult education"      --> 13
> hits
> search for "educación de adultos" -->  3 hits
> 
> search for "adult education" with synonym expansion -->
> 0 hits.
> 
> RESULT:
> -------
> <str name="q">textth:"adult education"</str>
> <str name="q.op">OR</str>
> 
> <result name="response" numFound="0" start="0"
> maxScore="0.0"/>
> −
> <lst name="debug">
> <str name="rawquerystring">textth:"adult
> education"</str>
> <str name="querystring">textth:"adult
> education"</str>
> −
> <str name="parsedquery">
> +((textth:erwachsenenbildung textth:adult education
> textth:educación de adultos textth:éducation des
> adultes)~4)
> </str>
> −
> <str name="parsedquery_toString">
> +((textth:erwachsenenbildung textth:adult education
> textth:educación de adultos textth:éducation des
> adultes)~4)
> </str>
> <lst name="explain"/>
> <str
> name="QParser">ExtendedDismaxQParser</str>
> 
> 
> Can it be that the "q.op=OR" parameter is ignored?
> 
> Why is the a slop of ~4 added to the parsedquery?
> 
> Regards,
> Bernd
> 
> 
>

Reply via email to