<?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>Get the "title" field from the "assetentry" table</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118817206" />
  <subtitle>Get the "title" field from the "assetentry" table</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118817206</id>
  <updated>2026-04-04T12:46:39Z</updated>
  <dc:date>2026-04-04T12:46:39Z</dc:date>
  <entry>
    <title>RE: Get the "title" field from the "assetentry" table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118826517" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118826517</id>
    <updated>2020-03-30T14:39:36Z</updated>
    <published>2020-03-30T14:39:36Z</published>
    <summary type="html">Maybe you could use Elasticsearch instead? I mean, ES has indexed all assets and writing a custom query isn&amp;#39;t really hard. Maybe something along the following lines could work:&lt;br /&gt;        SearchContext searchContext = new SearchContext();&lt;br /&gt;        searchContext.setCompanyId(companyId);&lt;br /&gt;        searchContext.setUserId(userId);&lt;br /&gt;        searchContext.setGroupIds(groupIds);&lt;br /&gt;        searchContext.setLocale(locale);&lt;br /&gt;        BooleanQuery query = new BooleanQueryImpl();&lt;br /&gt;        query.addTerm(Field.TITLE, keyword, true, BooleanClauseOccur.MUST);&lt;br /&gt;// Add other filters to make the query more precise, e.g. to get rid of drafts and old versions:     criteriaBuilder.addExactRequiredTerm(query, &amp;#34;head&amp;#34;, &amp;#34;true&amp;#34;);        Hits hits = indexSearcherHelper.search(searchContext, query);</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2020-03-30T14:39:36Z</dc:date>
  </entry>
  <entry>
    <title>RE: Get the "title" field from the "assetentry" table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118822329" />
    <author>
      <name>Dominik Marks</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118822329</id>
    <updated>2020-03-30T13:09:20Z</updated>
    <published>2020-03-30T13:09:20Z</published>
    <summary type="html">As far as I know there is no method to get Assets by title with a wildcard match.&lt;br /&gt;&lt;br /&gt;Probably the best way to fulfil your requirement is to use Dynamic Queries: &lt;a href="https://portal.liferay.dev/docs/7-2/appdev/-/knowledge_base/a/dynamic-query"&gt;https://portal.liferay.dev/docs/7-2/appdev/-/knowledge_base/a/dynamic-query&lt;/a&gt;&lt;br /&gt;Please note that asset title is multilanguage, so the field &amp;#34;title&amp;#34; contains an XML with all translations.</summary>
    <dc:creator>Dominik Marks</dc:creator>
    <dc:date>2020-03-30T13:09:20Z</dc:date>
  </entry>
  <entry>
    <title>Get the "title" field from the "assetentry" table</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118817205" />
    <author>
      <name>Dimas TB</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118817205</id>
    <updated>2020-03-27T20:52:43Z</updated>
    <published>2020-03-27T20:52:43Z</published>
    <summary type="html">Hello!&lt;br /&gt;&lt;br /&gt;I want to make a query to the &amp;#34;assetentry&amp;#34; table, which will get all those records whose &amp;#34;title&amp;#34; field contains the word &amp;#34;Shared&amp;#34;. I tried to get it, but can&amp;#39;t find the way.&lt;br /&gt;&lt;br /&gt;AssetEntryQuery x = new AssetEntryQuery();&lt;br /&gt;x.setTitle(&amp;#34;Shared&amp;#34;);&lt;br /&gt;        &lt;br /&gt;List&amp;lt;AssetEntry&amp;gt; title = AssetEntryLocalServiceUtil.getEntries(x);&lt;br /&gt;        &lt;br /&gt;for(int i=0; i&amp;lt;title.size(); i++) {&lt;br /&gt;     System.out.println(&amp;#34;Titulo &amp;#34; + i + &amp;#34;: &amp;#34; + title.get(i));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Thank you!&lt;br /&gt;&lt;br /&gt;Regards!</summary>
    <dc:creator>Dimas TB</dc:creator>
    <dc:date>2020-03-27T20:52:43Z</dc:date>
  </entry>
</feed>
