<?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>Liferay 7  Search Portlet - Only show journal articles and PDF files as sea</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117495762" />
  <subtitle>Liferay 7  Search Portlet - Only show journal articles and PDF files as sea</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117495762</id>
  <updated>2026-04-05T12:12:42Z</updated>
  <dc:date>2026-04-05T12:12:42Z</dc:date>
  <entry>
    <title>RE: Liferay 7  Search Portlet - Only show journal articles and PDF files as</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117546378" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117546378</id>
    <updated>2019-10-23T15:44:40Z</updated>
    <published>2019-10-23T15:44:40Z</published>
    <summary type="html">Hi Srini,It&amp;#39;s not pretty, but you are on the right track. If you re using the old search portlet then pretty much all the logic you need to manipulate can be done in the JSPs. I have created some very custom Search queries (with filters) and Results (grouped by types in tabs for example) simply by reworking the logic in these JSP files. &lt;br /&gt;&lt;br /&gt;Are you stuck on something?</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2019-10-23T15:44:40Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7  Search Portlet - Only show journal articles and PDF files as</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117520804" />
    <author>
      <name>srini vasulu</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117520804</id>
    <updated>2019-10-21T13:55:39Z</updated>
    <published>2019-10-21T13:55:39Z</published>
    <summary type="html">Hi Any suggestions on this? </summary>
    <dc:creator>srini vasulu</dc:creator>
    <dc:date>2019-10-21T13:55:39Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7  Search Portlet - Only show journal articles and PDF files as sea</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117495761" />
    <author>
      <name>srini vasulu</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117495761</id>
    <updated>2019-10-18T20:02:05Z</updated>
    <published>2019-10-18T20:02:05Z</published>
    <summary type="html">Hi,1) In liferay 7 search portlet we need to customize to sort the results like title name ect.&lt;br /&gt;2) We need to add the more input fields fileTypess(like adding file tyle .pdf,.docx) and only get file same file types and did not search any other places.in 6.2 start.jsp file added like below files.&amp;lt;aui:input inlineField=&amp;#34;&amp;lt;%= true %&amp;gt;&amp;#34; label=&amp;#34;File Type (pdf, docx, etc)&amp;#34; name=&amp;#39;&amp;lt;%= namespace + &amp;#34;fileExtension&amp;#34; %&amp;gt;&amp;#39; size=&amp;#34;30&amp;#34; title=&amp;#34;extension&amp;#34; type=&amp;#34;text&amp;#34; useNamespace=&amp;#34;&amp;lt;%= false %&amp;gt;&amp;#34;/&amp;gt; &lt;br /&gt;and got the value in search.jsp and that value passed in main-search.jsp fileif(Validator.isNotNull(fileExtension) &amp;amp;&amp;amp; fileExtension != &amp;#34;&amp;#34;){&lt;br /&gt;    Query fileExtensionQuery = StringQueryFactoryUtil.create(&amp;#34;entryClassName:com.liferay.portlet.documentlibrary.model.DLFileEntry +extension:&amp;#34;+fileExtension);&lt;br /&gt;    BooleanClause fileExtensionClause = BooleanClauseFactoryUtil.create(searchContext, fileExtensionQuery, BooleanClauseOccur.MUST.getName());&lt;br /&gt;    booleanClauseList.add(fileExtensionClause);}&lt;br /&gt; if(booleanClauseList.size()&amp;gt;0){&lt;br /&gt;        BooleanClause[] booleanClause = new BooleanClause[booleanClauseList.size()];&lt;br /&gt;        booleanClause = booleanClauseList.toArray(booleanClause);&lt;br /&gt;        searchContext.setBooleanClauses(booleanClause);&lt;br /&gt;    //searchContext.setBooleanClauses(new BooleanClause[] {fileExtensionClause,pbDocumentTypeClause});&lt;br /&gt;    } &lt;br /&gt;and we got only file extension but in liferay 7 how we will implement same functionality?&lt;br /&gt;we need to implement it only custom portlet and using hook we can implement? if we are able to implement using hook the what steps we need to take care?. </summary>
    <dc:creator>srini vasulu</dc:creator>
    <dc:date>2019-10-18T20:02:05Z</dc:date>
  </entry>
</feed>
