Hi Nilesh 
You may want to play with the mm parameter for edismax. This parameter 
determines how many of your terms need to match. I say play, because it is hard 
to learn this from the documentation. I did a bit of experimentation to 
discover all the details of this. Cheers--Rick

On February 28, 2017 3:33:24 PM EST, Nilesh Kamani <nilesh.kam...@gmail.com> 
wrote:
>Sure. If I do OR query, does Solr provide number of phrases matched in
>each
>document ?
>E.g. if I search for A B C, if two documents are returned. Can Solr
>provide
>result like this ?
>Doc1 - A, B
>Doc2 - B,C
>
>Thanks,
>
>
>On Tue, Feb 28, 2017 at 2:56 PM, Walter Underwood
><wun...@wunderwood.org>
>wrote:
>
>> I strongly recommend using OR instead of AND. Misspellings are in
>about
>> 10% of queries. Those tend to get zero results for many variations of
>AND
>> or mostly-AND.
>>
>> wunder
>> Walter Underwood
>> wun...@wunderwood.org
>> http://observer.wunderwood.org/  (my blog)
>>
>>
>> > On Feb 28, 2017, at 11:54 AM, Nilesh Kamani
><nilesh.kam...@gmail.com>
>> wrote:
>> >
>> > I tried, but it does not serve the purpose. The autoRelax is
>applied when
>> > words are removed from query field due to stopwords, etc
>> > So it is applied before the results are fetched.
>> > In my case, if no results are found, I want best possible results.
>> > So if I search for +A +B +C +D +E +F... +Z) and no documents found
>with
>> all
>> > phrases, I want best possible result. Let's say a document with +A
>+C +F
>> > (max number of phrases found in a document).
>> >
>> >
>> >
>> >
>> > On Tue, Feb 28, 2017 at 1:49 PM, Alexandre Rafalovitch <
>> arafa...@gmail.com>
>> > wrote:
>> >
>> >> Under eDismax there is a parameter called relax something.... Try
>that
>> >> first.
>> >>
>> >> Regards,
>> >>    Alex
>> >>
>> >> On 28 Feb 2017 12:34 PM, "Nilesh Kamani" <nilesh.kam...@gmail.com>
>> wrote:
>> >>
>> >>> Hello All,
>> >>>
>> >>> I want to modify a boolean AND search.
>> >>> Just to give an example.
>> >>> If somebody searches for +A +B +C, but if there is no document
>which
>> >>> contains all three phrases, it should return the least +A +B or
>+A +C.
>> >>> Could you please tell me which classes will I need to modify for
>this ?
>> >>>
>> >>>
>> >>> Thanks,
>> >>> Nilesh Kamani
>> >>>
>> >>
>>
>>

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to