AnsweredAssumed Answered

Indexing d:content property with content > 32 KB

Question asked by lutz.horn on Apr 8, 2015
I have an Alfresco model type with an additional property of type
d:content
. This property causes Solr exceptions when I try to store content larger than 32 KB in it. The current definition of this property is

<blockcode>
<property name="acme:secondContent">
  <type>d:content</type>
  <mandatory>false</mandatory>
  <index enabled="true">
    <atomic>true</atomic>
    <stored>true</stored>
    <tokenised>both</tokenised>
  </index>
</property>
</blockcode>

If I put content larger that 32 KB into this property, Solr throws this exception when it tries to index it:

<blockcode>
java.lang.IllegalArgumentException: Document contains at least one immense term in field="content@s____@{http://acme.com/model/custom/1.0}secondContent" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.
</blockcode>

In contentModel.xml,
cm:content
is configured like this:

<blockcode>
<index enabled="true">
  <atomic>true</atomic>
  <stored>false</stored>
  <tokenised>true</tokenised>
</index>
</blockcode>

Adding a simple text/plain file with content larger than 32 KB works without problems.

The same index configuration for my custom property still fails.

How do I configure the index of a
d:content
property so that I can save and index content larger than 32 KB?

Outcomes