Re: Dismax Question
I and another user recently posted about this exact same issue. It sounds like maybe this is a new bug introduced in 3.6: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201206.mbox/%3CCAMKKMTx_ybPqsbgU5NtQ19t%2B0kWdAHtq-CZTZxfYxdu6rS1u1g%40mail.gmail.com%3E http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201206.mbox/%3CCAMySt%2BE6Hr6%3DgOkkDeZU9PCTpgJ4Mb1i8YrzfAndfqUzdot8xw%40mail.gmail.com%3E I've managed to figure out a fix that is working well enough for my own application right now. I set autoGeneratePhraseQueries to true on my field, and also set qs=2. The high query slop value simulates the AND behavior that I want since my documents are relatively short, but this is obviously not the correct solution, and I don't know if there are any performance issues with using really high query slop values. On Mon, Jul 2, 2012 at 9:16 AM, Steve Fatula compconsult...@yahoo.comwrote: From: Ahmet Arslan iori...@yahoo.com To: solr-user@lucene.apache.org; Steve Fatula compconsult...@yahoo.com Sent: Monday, July 2, 2012 6:22 AM Subject: Re: Dismax Question So, my question is how do we get Solr search to work with AND when it is splitting words? The splitting part is good, the bad part is that it is searching for any one of those split words. Setting autoGeneratePhraseQueries=true and mm=100% might help you. fieldType name=text class=solr.TextField autoGeneratePhraseQueries=true I set mm to 100%, no effect at all. It works only for words typed in that are separated already. Remember, the example here is: DualHead2Go finds all kinds of matches (it splits into dual head 2 go) Dial Head 2 Go finds the correct matches, indicating it is adding them based on q/op, defautOperator, and mm.
Why won't dismax create multiple DisjunctionMaxQueries when autoGeneratePhraseQueries is false?
Hi, I am trying to configure Solr for Chinese search and I've been having trouble getting the dismax query parser to behave correctly. In schema.xml, I'm using SmartChineseAnalyzer on my fulltext field with autoGeneratePhraseQueries=false. I've verified that it is correctly tokenizing Chinese words, and the query parser is in fact not generating phrase queries. But I can't figure out why dismax is only producing a single DisjunctionMaxQuery object for multiple Chinese terms, thereby producing an OR effect, which is not what I want. Here's an example of the parsed query debug output that I get for a multiple term English query: str name=rawquerystringmy friend/str str name=querystringmy friend/str str name=parsedquery +((DisjunctionMaxQuery((t_field_keywords:unified_fulltext:my)~0.01) DisjunctionMaxQuery((t_field_keywords:unified_fulltext:friend)~0.01))~2) /str str name=parsedquery_toString +(((t_field_keywords:unified_fulltext:my)~0.01 (t_field_keywords:unified_fulltext:friend)~0.01)~2) /str This is exactly what I want to happen for Chinese queries. But for a Chinese query, you can see that I only get a single DisjunctionMaxQuery object: str name=rawquerystring我的朋友/str str name=querystring我的朋友/str str name=parsedquery +DisjunctionMaxQuery(((t_field_keywords:unified_fulltext:我 t_field_keywords:unified_fulltext:的 t_field_keywords:unified_fulltext:朋友))~0.01) /str str name=parsedquery_toString +((t_field_keywords:unified_fulltext:我 t_field_keywords:unified_fulltext:的 t_field_keywords:unified_fulltext:朋友))~0.01 /str The result of this is that an increase in the number of terms increases the number of results, instead of narrowing them as it should. I feel like this is so close to working... does anybody know what I need to do to get the query parser to behave correctly? Any help would be much appreciated! Joel