<?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>Global Search excluding userName term [UNANSWERED YET :)]</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=31367190" />
  <subtitle>Global Search excluding userName term [UNANSWERED YET :)]</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=31367190</id>
  <updated>2026-04-04T01:50:11Z</updated>
  <dc:date>2026-04-04T01:50:11Z</dc:date>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113955495" />
    <author>
      <name>Imtiaz Mohammed H.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113955495</id>
    <updated>2019-06-10T11:45:37Z</updated>
    <published>2019-06-10T11:45:37Z</published>
    <summary type="html">Hi , &lt;br /&gt;Any idea how to achieve this on Liferay 7.0 DXP. Is this issue has a solution?&lt;br /&gt;Please update me the solution ASAP.&lt;br /&gt;Thanks,Mohammed Imtiaz H.</summary>
    <dc:creator>Imtiaz Mohammed H.</dc:creator>
    <dc:date>2019-06-10T11:45:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113756614" />
    <author>
      <name>Arun Das</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=113756614</id>
    <updated>2019-05-29T09:38:50Z</updated>
    <published>2019-05-29T09:38:50Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;&lt;div class="quote-title"&gt;Corné Aussems:&lt;/div&gt;&lt;blockquote&gt;&lt;br /&gt;its about &lt;strong&gt;not&lt;/strong&gt; finding lucene documents eg JournalAticle, DLFileEntry , Blogs .. by its creator.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Any idea how to achieve this on Liferay 7.1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Arun</summary>
    <dc:creator>Arun Das</dc:creator>
    <dc:date>2019-05-29T09:38:50Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31517490" />
    <author>
      <name>Suraj Bihari</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31517490</id>
    <updated>2013-11-14T20:19:03Z</updated>
    <published>2013-11-14T20:19:03Z</published>
    <summary type="html">Namaste my dear Guru,&lt;br /&gt;&lt;br /&gt;You&amp;#39;re welcome &lt;img alt="emoticon" src="@theme_images_path@/emoticons/blush.gif" &gt;  I was a bit over enthusiastic suggesting &amp;#39;another solution&amp;#39; path...&lt;br /&gt;It has been a while, from now on, I&amp;#39;ll try to attend the next event and post accurate solutions &lt;img alt="emoticon" src="@theme_images_path@/emoticons/tongue.gif" &gt;&lt;br /&gt;&lt;br /&gt;Cheerio!</summary>
    <dc:creator>Suraj Bihari</dc:creator>
    <dc:date>2013-11-14T20:19:03Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31491691" />
    <author>
      <name>Corné Aussems</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31491691</id>
    <updated>2013-11-14T07:39:25Z</updated>
    <published>2013-11-14T07:39:25Z</published>
    <summary type="html">Hey my dear Liferay friend Suraj,&lt;br /&gt;&lt;br /&gt;Thanks for answering my post with an absolute ridicoulous suggestion &lt;img alt="emoticon" src="@theme_images_path@/emoticons/laugh.gif" &gt;&lt;br /&gt;Its not about finding Users, its about &lt;strong&gt;not&lt;/strong&gt; finding lucene documents eg JournalAticle, DLFileEntry , Blogs .. by its creator.&lt;br /&gt;As you can read in the post, By default the indexed document is containing &lt;em&gt;userName&lt;/em&gt; and by default &lt;em&gt;userName&lt;/em&gt; is a term that is searched for.&lt;br /&gt;&lt;br /&gt;Zum beispiel. search for &amp;#39;suraj bihari&amp;#39; with the users disabled as you suggest ;) &lt;br /&gt;&lt;br /&gt;Missed you at the DevCon ;)&lt;br /&gt;&lt;br /&gt;C.heers</summary>
    <dc:creator>Corné Aussems</dc:creator>
    <dc:date>2013-11-14T07:39:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31429971" />
    <author>
      <name>Suraj Bihari</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31429971</id>
    <updated>2013-11-13T22:21:58Z</updated>
    <published>2013-11-13T22:21:58Z</published>
    <summary type="html">Hi Corné,&lt;br /&gt;&lt;br /&gt;You could configure the settings of the Global Search Portlet to leave out the User model.&lt;br /&gt;Configure &amp;gt; Setup &amp;gt; Display Settings &amp;gt; Advanced &amp;gt; Search Configuration&lt;br /&gt;&lt;br /&gt;{&amp;#34;facets&amp;#34;: [&lt;br /&gt;    {&lt;br /&gt;       ...&lt;br /&gt;        &amp;#34;data&amp;#34;: {&lt;br /&gt;            &amp;#34;values&amp;#34;: [&lt;br /&gt;                &amp;#34;com.liferay.portlet.bookmarks.model.BookmarksEntry&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.blogs.model.BlogsEntry&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.calendar.model.CalEvent&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.documentlibrary.model.DLFileEntry&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.journal.model.JournalArticle&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.messageboards.model.MBMessage&amp;#34;,&lt;br /&gt;                &amp;#34;com.liferay.portlet.wiki.model.WikiPage&amp;#34;,&lt;br /&gt;                &lt;strong&gt;&lt;strike&gt;&amp;#34;com.liferay.portal.model.User&amp;#34;&lt;/strike&gt;&lt;/strong&gt;&lt;br /&gt;            ],&lt;br /&gt;            &amp;#34;frequencyThreshold&amp;#34;: 1&lt;br /&gt;       ...&lt;br /&gt;&lt;br /&gt;Just remove the &amp;#34;com.liferay.portal.model.User&amp;#34; and no users are listed in the results.&lt;br /&gt;&lt;br /&gt;Beste regards,&lt;br /&gt;Suraj</summary>
    <dc:creator>Suraj Bihari</dc:creator>
    <dc:date>2013-11-13T22:21:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31410151" />
    <author>
      <name>Corné Aussems</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31410151</id>
    <updated>2013-11-13T11:43:19Z</updated>
    <published>2013-11-13T11:43:19Z</published>
    <summary type="html">&lt;div class="quote-title"&gt;Vitaliy Koshelenko:&lt;/div&gt;&lt;blockquote&gt;You can just patch com.liferay.portal.kernel.search.Field class and remove Field.USER_NAME form it&amp;#39;s KEYWORDS array in this case, and then put the complied class into ROOT/WEB-INF/classes directory.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Hi Vitaliy,&lt;br /&gt;&lt;br /&gt;Thanks for your suggestion.&lt;br /&gt;There is a good reason i do &lt;strong&gt;not&lt;/strong&gt; want to use &lt;strong&gt;EXT-plugins&lt;/strong&gt; .. &lt;strong&gt;maintainability&lt;/strong&gt; !&lt;br /&gt;So adding a compiled class to ROOT/WEB-INF/classes not a better option. &lt;img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" &gt;&lt;br /&gt;&lt;br /&gt;Since Liferay Core Developers and Gurus monitor unanswered post, would you please remove your answer for me so it get noticed.&lt;br /&gt;&lt;br /&gt;Thanks again for your try.&lt;br /&gt;&lt;br /&gt;Corné</summary>
    <dc:creator>Corné Aussems</dc:creator>
    <dc:date>2013-11-13T11:43:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Global Search excluding userName term</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31388575" />
    <author>
      <name>Vitaliy Koshelenko</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31388575</id>
    <updated>2013-11-12T21:10:39Z</updated>
    <published>2013-11-12T21:10:39Z</published>
    <summary type="html">You can just patch com.liferay.portal.kernel.search.Field class and remove Field.USER_NAME form it&amp;#39;s KEYWORDS array in this case, and then put the complied class into ROOT/WEB-INF/classes directory.</summary>
    <dc:creator>Vitaliy Koshelenko</dc:creator>
    <dc:date>2013-11-12T21:10:39Z</dc:date>
  </entry>
  <entry>
    <title>Global Search excluding userName term [UNANSWERED YET :)]</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31367189" />
    <author>
      <name>Corné Aussems</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=31367189</id>
    <updated>2013-11-12T11:27:54Z</updated>
    <published>2013-11-12T11:27:54Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi all,&lt;br&gt;&lt;br&gt;From the Global Search Portlet i need to remove the searching (and results) for userName from the Global Search.&lt;br&gt;My aim is to do this without an EXT-plugin.&lt;br&gt;&lt;br&gt;The LuceneImpl generates by default the following query &lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;+(
	+(companyId:10154) 
	+(
		(
			+(entryClassName:com.liferay.portlet.journal.model.JournalArticle) 
			+(status:0)
		)
	)
) 
+(	
	*removed some lines for convenience* 
	content:aussems 
	userName:*aussems* 
	*removed some lines for convenience*
)
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;To remove the userName term i override JournalIndexer.java by registering this in my custom StartUpAction&lt;br&gt;and remove this specific line;&lt;br&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/6.1.x/portal-impl/src/com/liferay/portlet/journal/util/JournalIndexer.java#L149"&gt;https://github.com/liferay/liferay-portal/blob/6.1.x/portal-impl/src/com/liferay/portlet/journal/util/JournalIndexer.java#L149&lt;/a&gt;&lt;br&gt;&lt;br&gt;This works fine but to no avail, the problem here is that FacetedSearcher&lt;br&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/6.1.x/portal-service/src/com/liferay/portal/kernel/search/FacetedSearcher.java#L166"&gt;https://github.com/liferay/liferay-portal/blob/6.1.x/portal-service/src/com/liferay/portal/kernel/search/FacetedSearcher.java#L166&lt;/a&gt;&lt;br&gt;Adds all Field.KEYWORDS including Field.USERNAME&lt;br&gt;&lt;a href="https://github.com/liferay/liferay-portal/blob/6.1.x/portal-service/src/com/liferay/portal/kernel/search/Field.java#L70"&gt;https://github.com/liferay/liferay-portal/blob/6.1.x/portal-service/src/com/liferay/portal/kernel/search/Field.java#L70&lt;/a&gt;&lt;br&gt;&lt;br&gt;Since we see only one 'userName' entry in the query i hoped i could overwrite userName with a dummy content, but LuceneHelper checks _includeIfUnique so that won't do it either.&lt;br&gt;&lt;br&gt;Other idea was with an IndexerPostProcessor manipulating the collection of BooleanClauses inside the BooleanQuery. But &lt;br&gt;com.liferay.portal.kernel.search.BooleanClause does not support any useful method.&lt;br&gt;&lt;br&gt;Anyone has some idea how to succeed or maybe suggests another solution path?&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Corné Aussems</dc:creator>
    <dc:date>2013-11-12T11:27:54Z</dc:date>
  </entry>
</feed>
