lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: query bag of word with negation
Date Sun, 22 Apr 2018 22:26:19 GMT
Queries of the form *some* can be _quite_ expensive, make sure you
test on a realistic corpus.

ngrams are often used to solve that problem.

If you mean *some then you may want to include ReverseWildcardFilterFactory

Best,
Erick

On Sun, Apr 22, 2018 at 12:33 PM, Nicolas Paris <niparisco@gmail.com> wrote:
> Hello Markus
>
> Thanks !
>
> The ComplexPhraseQueryParser syntax:
> q={!complexphrase inOrder=false}collector:"wonderful pizza -peperoni"~5
> answers my needs.
>
> BTW,
> Apparently it accepts both leading/ending wildcards, that's look powerful
> feature.
>
> Any chance it would support the "sow=false" in order to combine with
>  multi-word synonyms ?
>
>
> 2018-04-22 21:11 GMT+02:00 Markus Jelsma <markus.jelsma@openindex.io>:
>
>> Hello Nicolas,
>>
>> Yes you can! Check out ComplexPhaseQParser
>> https://lucene.apache.org/solr/guide/6_6/other-parsers.html#OtherParsers-
>> ComplexPhraseQueryParser
>>
>> Regards,
>> Markus
>>
>>
>>
>> -----Original message-----
>> > From:Nicolas Paris <niparisco@gmail.com>
>> > Sent: Sunday 22nd April 2018 20:04
>> > To: solr-user@lucene.apache.org
>> > Subject: query bag of word with negation
>> >
>> > Hello
>> >
>> > I wonder if there is a plain text query syntax to say:
>> > give me all document that match:
>> >
>> > wonderful pizza NOT peperoni
>> >
>> > all those in a 5 distance word bag
>> > then
>> >
>> > pizza are wonderful -> would match
>> > I made a wonderful pasta and pizza -> would match
>> > Peperoni pizza are so wonderful -> would not match
>> >
>> > I tested:
>> > "wonderful pizza - peperoni"~5
>> > without success
>> >
>> > Thanks
>> >
>>

Mime
View raw message