Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Search portlet and boolean operators (+, -, ! AND, OR)
Hi, I need some clarifications on how works the Search Portlet.
1) The syntax supported is (fully?) compliant to Lucene query parser syntax? I mean, can I write something like this: +title:word1 -title:word2 AND title:abc* ?If not, where can I find the complete reference of the syntax supported?
2) Suppose I'd like to search for documents that contains word1 and NOT contain word2 in the title, if I use the following query: +title:word1 -title:word2 at first glance it works but if I browse the results set I notice that towards the end there are documents with title that contains both words (word1 and word2). I think this is why using the 'prohibit' (-) operator make those documents get poor ranking and so they are included at the end. Is it right? If so, how can I prevent that these documents get included in the results set at all?
thanks in advance,
Marco
P.S: I am using Liferay 6.2 GA3
1) The syntax supported is (fully?) compliant to Lucene query parser syntax? I mean, can I write something like this: +title:word1 -title:word2 AND title:abc* ?If not, where can I find the complete reference of the syntax supported?
2) Suppose I'd like to search for documents that contains word1 and NOT contain word2 in the title, if I use the following query: +title:word1 -title:word2 at first glance it works but if I browse the results set I notice that towards the end there are documents with title that contains both words (word1 and word2). I think this is why using the 'prohibit' (-) operator make those documents get poor ranking and so they are included at the end. Is it right? If so, how can I prevent that these documents get included in the results set at all?
thanks in advance,
Marco
P.S: I am using Liferay 6.2 GA3