How can I use boolean operators in Search Query?

Topics: Administration, Customizing Orchard, Troubleshooting
Feb 10, 2015 at 11:49 AM
Edited Feb 10, 2015 at 11:51 AM
hi,

I see the search module is based on Lucene.net, but the query parser syntax is different with Lucene.net.
Is there a reference book?

I know the AND operator, but it seems something wrong in it. For example, I have a content page below:
title: cat dog bird
body: table bed light window

If I search "cat AND dog", I can get the page.
If I search "table AND window", I can get the page, too.
But If I search "cat AND table", I got nothing. I think it should return the page. Am I wrong?

I tested it in Orchard 1.x (update at 2015-1-27)

Thanks for any reply.
Developer
Feb 10, 2015 at 4:14 PM
Edited Feb 10, 2015 at 4:14 PM
I just tested and was indeed able to reproduce this.
The AND operator doesn't seem to work across fields on an index record.
Can you please file a bug plus the repro steps? Thanks!
Feb 10, 2015 at 5:17 PM
I have post a new issue here: https://orchard.codeplex.com/workitem/21193
Feb 10, 2015 at 5:20 PM
sfmskywalker wrote:
I just tested and was indeed able to reproduce this.
The AND operator doesn't seem to work across fields on an index record.
Can you please file a bug plus the repro steps? Thanks!
is there any other operators can be use in the search query?
thank you.
Developer
Feb 10, 2015 at 9:01 PM
Feb 11, 2015 at 3:08 AM
sfmskywalker wrote:
http://lmgtfy.com/?q=lucene.net+operators
I see the search module is based on Lucene.net, but the query parser syntax is different with Lucene.net.

for example, i have two content:

title: cat dog bird
body: table bed light window

title: cat
body: table

If I search "cat + bird", the result is different with "cat AND bird". AND operator only returns one content, but + operator returns all the two contents.
If I search "title:cat", there is nothing returned. but in lucene.net, the result is the contents which has "cat" in the title.
Feb 11, 2015 at 4:35 AM
I want to know. the search module is too sample, Is there a advanced search module,I mean that can search field etc;