Did you mean q=oow in your example? As written, I don't see how there is a problem.
On Thu, Jul 26, 2018 at 8:41 AM Andrea Gazzarini <[email protected]> wrote: > Hi, still fighting with synonyms, I have another question. > I'm not understanding the role, and the effect, of the > "autoGeneratePhraseQueries" attribute in a synonym context. > I mean, if I have the following field type: > > <fieldtype name="custom_text" class="solr.TextField" > autoGeneratePhraseQueries="true"> > <analyzer type="index"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.LowerCaseFilterFactory"/> > </analyzer> > <analyzer type="query"> > <tokenizer class="solr.StandardTokenizerFactory"/> > <filter class="solr.LowerCaseFilterFactory"/> > <filter class="solr.SynonymGraphFilterFactory" > synonyms="synonyms.txt" ignoreCase="false" expand="true"/> > </analyzer></fieldtype> > > with the following synonym: *out of warranty,oow* > > with the following query: *q=out of warranty* > > The output query is exactly what I would expect: *(title:oow > PhraseQuery(title:"out of warranty"))* > > Setting the autoGeneratePhraseQueries to *false* (or better, forgetting > the attribute declaration at all), the output query is: > > *(title:oow (+title:out +title:of +title:warranty))* > Which matches things like "I had to step out for renewing the warranty of > my device". > > This, at first glance sounds to me completely wrong. Or, better, I'm not > able to imagine a use case where that synonym decomposition could be > useful. Is that wanted? I would say that the query parser should always > generates a phrase query for multi-term synonyms, like in the first example > (i.e. autoGeneratePhraseQueries=true). > > Thanks in advance, > Andrea >
