Hello.

What if you examine parsed query via debugger or just print
query.toString() for both and compare?

On Mon, May 6, 2024 at 1:42 PM Saha, Rajib <rajib.s...@sap.com.invalid>
wrote:

> Hi Experts,
>
>
>
> As per the definition in
> https://lucene.apache.org/core/2_9_4/queryparsersyntax.html
>
>
>
> '-' and 'NOT' in query string stands for same reason theoretically.
>
>
>
>
>
> But, in practical, is there any difference?
>
>
>
> Why I am asking the question. In our product, we have got an incident
> related to different result set for below two queries.
>
>
>
>    1. Lucene Query String : report
>     -kind:"AAD.AnalysisApplication_Bookmark" -kind:BIWidgets -kind:Discussions
>    -kind:"DSL.MetaDataFile" -kind:"DSL.Universe" -kind:Event -kind:LCMJob
>    -kind:ObjectPackage -kind:Profile -kind:Program -kind:Publication
>    -kind:QaaWS -kind:Universe -kind:"VISI.Story" -kind:" VISI.Dataset"
>    -kind:DataDiscoveryAlbum -kind:DataDiscovery
>
>
>
>    2. Lucene Query String : "report" and
>    NOT(kind:"AAD.AnalysisApplication_Bookmark" or kind:BIWidgets or
>    kind:Discussions or kind:"DSL.MetaDataFile" or kind:"DSL.Universe" or
>    kind:Event or kind:LCMJob or kind:ObjectPackage or kind:Profile or
>    kind:Program or kind:Publication or kind:QaaWS or kind:Universe or
>    kind:"VISI.Story" or kind:" VISI.Dataset" or kind:DataDiscoveryAlbum or
>    kind:DataDiscovery)
>
>
>
> Any comment on the different result set for the above two queries would be
> really appreciated.
>
>
>
> Regards
>
> Rajib
>
>
>


-- 
Sincerely yours
Mikhail Khludnev

Reply via email to