AnsweredAssumed Answered

Problem Indexing d:content properties

Question asked by oskarlanda on Sep 10, 2014
Latest reply on Sep 10, 2014 by oskarlanda
Hello,

Alfresco Community 4.0.e (using Solr) is not indexing content type properties when updating content.

After content update, I try to search the node using the lucene query TEXT:"inmenso" (that is in the text of this property) but the result is 0 nodes. After a full reindex the same result.

My aspect definition is:


   <aspect name="btz:ocr">
      <title>OCR</title>
      <properties>
          <property name="btz:ocrContent">
         <title>Texto del OCR</title>
             <type>d:content</type>
                        <index enabled="true">
                           <atomic>true</atomic>
                           <stored>false</stored>
                           <tokenised>true</tokenised>
                        </index>
          </property>
      </properties>
   </aspect>   


My function for the update process is:


   public void setContentValue(NodeRef nodeRef, QName propertyQName, Object hmcontent) throws Exception {

      UserTransaction trx = transactionService.getUserTransaction();

      try {
         trx.begin();

                        nodeService.addAspect(nodeRef, btz:ocr, null);

         ContentWriter contentWriter = contentService.getWriter(nodeRef, propertyQName, true);
         contentWriter.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
         contentWriter.putContent(hmcontent.toString());
         contentWriter.guessEncoding(); //setEncoding("UTF-8");

         trx.commit();

      } catch (Exception e) {
         trx.rollback();
         throw e;
      }
   }


Any ideas ?

Outcomes