<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Search portlet and boolean operators (+, -, ! AND, OR)</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117603474" />
  <subtitle>Search portlet and boolean operators (+, -, ! AND, OR)</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117603474</id>
  <updated>2026-04-26T22:33:30Z</updated>
  <dc:date>2026-04-26T22:33:30Z</dc:date>
  <entry>
    <title>Search portlet and boolean operators (+, -, ! AND, OR)</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117603473" />
    <author>
      <name>Marco Azzalini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117603473</id>
    <updated>2019-10-30T16:17:25Z</updated>
    <published>2019-10-30T16:17:25Z</published>
    <summary type="html">Hi, I need some clarifications on how works the Search Portlet.&lt;br /&gt;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?&lt;br /&gt;2) Suppose I&amp;#39;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 &amp;#39;prohibit&amp;#39; (-) 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?&lt;br /&gt;thanks in advance,&lt;br /&gt;Marco&lt;br /&gt;P.S: I am using Liferay 6.2 GA3</summary>
    <dc:creator>Marco Azzalini</dc:creator>
    <dc:date>2019-10-30T16:17:25Z</dc:date>
  </entry>
</feed>
