<?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>Elastic Search problem: Fielddata is disabled on text fields by default...</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120372538" />
  <subtitle>Elastic Search problem: Fielddata is disabled on text fields by default...</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120372538</id>
  <updated>2026-08-02T06:52:32Z</updated>
  <dc:date>2026-08-02T06:52:32Z</dc:date>
  <entry>
    <title>RE: RE: Elastic Search problem: Fielddata is disabled on text fields by default...</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514814" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514814</id>
    <updated>2022-09-15T15:03:19Z</updated>
    <published>2022-09-14T19:59:01Z</published>
    <summary type="html">&lt;p&gt;As a stab in the dark, try using the .raw version of the text field.
  The original post references the assetTagNames field whose mapping
  looks like &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;			&amp;quot;assetTagNames&amp;quot;: {
				&amp;quot;fields&amp;quot;: {
					&amp;quot;raw&amp;quot;: {
						&amp;quot;store&amp;quot;: true,
						&amp;quot;type&amp;quot;: &amp;quot;keyword&amp;quot;
					}
				},
				&amp;quot;store&amp;quot;: true,
				&amp;quot;term_vector&amp;quot;: &amp;quot;with_positions_offsets&amp;quot;,
				&amp;quot;type&amp;quot;: &amp;quot;text&amp;quot;
			},
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Refer to it as assetTagNames.raw and see if that helps.&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2022-09-14T19:59:01Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Elastic Search problem: Fielddata is disabled on text fields by default...</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514808" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514808</id>
    <updated>2022-09-15T15:03:04Z</updated>
    <published>2022-09-14T19:57:06Z</published>
    <summary type="html">&lt;p&gt;Prashant, this is an old thread. You should post a new one with the
  details of your situation.&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2022-09-14T19:57:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: Elastic Search problem: Fielddata is disabled on text fields by default...</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514753" />
    <author>
      <name>Prashant Ballal</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121514753</id>
    <updated>2022-09-14T19:21:40Z</updated>
    <published>2022-09-14T16:28:50Z</published>
    <summary type="html">&lt;p&gt;Have you found the solution for this? I am facing similer issue.&lt;/p&gt;</summary>
    <dc:creator>Prashant Ballal</dc:creator>
    <dc:date>2022-09-14T16:28:50Z</dc:date>
  </entry>
  <entry>
    <title>Elastic Search problem: Fielddata is disabled on text fields by default...</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120372537" />
    <author>
      <name>G C</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120372537</id>
    <updated>2020-10-27T16:42:58Z</updated>
    <published>2020-10-27T14:26:47Z</published>
    <summary type="html">&lt;p&gt;Hi, I have a feature inside my portlet that search a word inside
  folders and files on document and media library.&lt;/p&gt;
&lt;p&gt;This is a piece of code:&lt;/p&gt;
&lt;p&gt;                    SearchContext searchContext = new SearchContext();&lt;/p&gt;
&lt;p&gt;.                        ....&lt;br /&gt;                    Hits hits =FacetedSearcherManagerUtil.createFacetedSearcher().search(searchContext);&lt;/p&gt;
&lt;p&gt;This is error stracktrace on search method:&lt;/p&gt;
&lt;p&gt;2020-10-27 14:01:57.034 ERROR
  [http-nio-8080-exec-2][ElasticsearchIndexSearcher:165]
  java.lang.RuntimeException:
  org.elasticsearch.ElasticsearchStatusException:
  ElasticsearchStatusException[Elasticsearch exception
  [type=search_phase_execution_exception, reason=all shards failed]];
  nested: ElasticsearchException[Elasticsearch exception
  [type=illegal_argument_exception, reason=Fielddata is disabled on text
  fields by default. Set fielddata=true on [assetTagNames] in order to
  load fielddata in memory by uninverting the inverted index. Note that
  this can however use significant memory. Alternatively use a keyword
  field instead.]]; nested: ElasticsearchException[Elasticsearch
  exception [type=illegal_argument_exception, reason=Fielddata is
  disabled on text fields by default. Set fielddata=true on
  [assetTagNames] in order to load fielddata in memory by uninverting
  the inverted index. Note that this can however use significant memory.
  Alternatively use a keyword field
  instead.]];&lt;br /&gt;java.lang.RuntimeException:
  org.elasticsearch.ElasticsearchStatusException:
  ElasticsearchStatusException[Elasticsearch exception
  [type=search_phase_execution_exception, reason=all shards failed]];
  nested: ElasticsearchException[Elasticsearch exception
  [type=illegal_argument_exception, reason=Fielddata is disabled on text
  fields by default. Set fielddata=true on [assetTagNames] in order to
  load fielddata in memory by uninverting the inverted index. Note that
  this can however use significant memory. Alternatively use a keyword
  field instead.]]; nested: ElasticsearchException[Elasticsearch
  exception [type=illegal_argument_exception, reason=Fielddata is
  disabled on text fields by default. Set fielddata=true on
  [assetTagNames] in order to load fielddata in memory by uninverting
  the inverted index. Note that this can however use significant memory.
  Alternatively use a keyword field instead.]];&lt;br /&gt;    at
  org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)     &lt;/p&gt;
&lt;p&gt;&amp;quot;Reindex all search indexes&amp;quot; function from &amp;quot;Index
  Actions&amp;quot; is not a solution for this problem.&lt;/p&gt;
&lt;p&gt;Anyone can help me?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>G C</dc:creator>
    <dc:date>2020-10-27T14:26:47Z</dc:date>
  </entry>
</feed>
