<?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>DXP 7.1 Search result customization</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120560252" />
  <subtitle>DXP 7.1 Search result customization</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120560252</id>
  <updated>2026-04-04T17:11:58Z</updated>
  <dc:date>2026-04-04T17:11:58Z</dc:date>
  <entry>
    <title>RE: DXP 7.1 Search result customization</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120566837" />
    <author>
      <name>Gopal Prasad Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120566837</id>
    <updated>2021-01-28T05:26:37Z</updated>
    <published>2021-01-28T05:26:36Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am trying to achieve this through KeywordQueryContributor. Not sure
  but giving a try. But after deploying the module, contribute method is
  not getting called.My requirement is for web contents so mentioned the indexer.class.name=com.liferay.journal.model.JournalArticle&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;import com.liferay.portal.kernel.search.BooleanQuery;
import com.liferay.portal.kernel.search.Field;
import com.liferay.portal.search.query.QueryHelper;
import com.liferay.portal.search.spi.model.query.contributor.KeywordQueryContributor;
import com.liferay.portal.search.spi.model.query.contributor.helper.KeywordQueryContributorHelper;

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import com.liferay.portal.kernel.search.SearchContext;


@Component(
	immediate = true,
	property = &amp;quot;indexer.class.name=com.liferay.journal.model.JournalArticle&amp;quot;,
	service = KeywordQueryContributor.class
)
public class AllKeywordQueryContributor implements KeywordQueryContributor {

	@Override
	public void contribute(
		String keywords, BooleanQuery booleanQuery,
		KeywordQueryContributorHelper keywordQueryContributorHelper) {
		queryHelper.addSearchLocalizedTerm(
			booleanQuery, keywordQueryContributorHelper.getSearchContext(),
			Field.TITLE, true);
	}

	@Reference
	protected QueryHelper queryHelper;

}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;build.gradle&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;dependencies {&lt;br /&gt;    compileOnly group: &amp;quot;biz.aQute.bnd&amp;quot;,
  name: &amp;quot;biz.aQute.bndlib&amp;quot;, version: &amp;quot;3.1.0&amp;quot;&lt;br /&gt;  
   compileOnly group: &amp;quot;com.liferay&amp;quot;, name:
  &amp;quot;com.liferay.portal.search.api&amp;quot;, version:
  &amp;quot;2.0.0&amp;quot;&lt;br /&gt;    compileOnly group: &amp;quot;com.liferay&amp;quot;,
  name: &amp;quot;com.liferay.portal.search.spi&amp;quot;, version:
  &amp;quot;2.0.0&amp;quot;&lt;br /&gt;    compileOnly group:
  &amp;quot;com.liferay.portal&amp;quot;, name:
  &amp;quot;com.liferay.portal.kernel&amp;quot;, version: &amp;quot;3.0.0&amp;quot;&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Any idea??&lt;/p&gt;</summary>
    <dc:creator>Gopal Prasad Satapathy</dc:creator>
    <dc:date>2021-01-28T05:26:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1 Search result customization</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120563356" />
    <author>
      <name>Gopal Prasad Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120563356</id>
    <updated>2021-01-27T07:33:47Z</updated>
    <published>2021-01-27T07:33:46Z</published>
    <summary type="html">&lt;p&gt;Hello Russell,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks for your reply. &lt;/p&gt;
&lt;p&gt;Since i donot have a upgrade plan as of now, So I am looking for a
  solution for DXP 7.1 only.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Gopal Prasad Satapathy</dc:creator>
    <dc:date>2021-01-27T07:33:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: DXP 7.1 Search result customization</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120560524" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120560524</id>
    <updated>2021-01-25T19:54:53Z</updated>
    <published>2021-01-25T19:54:53Z</published>
    <summary type="html">&lt;p&gt;If you're a DXP subscriber, upgrade to 7.2 (might as well go to 7.3?)
  and you'll have access to a Search Tuning feature called &lt;a
    href="https://learn.liferay.com/dxp/7.x/en/using-search/search-administration-and-tuning/result-rankings.html"&gt;Result Rankings&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Not sure how you can homecook something like this, but I'm sure it's possible.&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2021-01-25T19:54:53Z</dc:date>
  </entry>
  <entry>
    <title>DXP 7.1 Search result customization</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120560251" />
    <author>
      <name>Gopal Prasad Satapathy</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120560251</id>
    <updated>2021-01-25T10:47:29Z</updated>
    <published>2021-01-25T10:47:29Z</published>
    <summary type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I want to customize the search result to show certain results to
  appear at the top of the result when related search is performed.&lt;/p&gt;
&lt;p&gt;Any pointer on this is appreciated.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Using DXP 7.1&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Gopal Prasad Satapathy</dc:creator>
    <dc:date>2021-01-25T10:47:29Z</dc:date>
  </entry>
</feed>
