AnsweredAssumed Answered

Turning on/of indexing by defining a new type

Question asked by torghal on May 27, 2008
Latest reply on Jul 18, 2008 by plecras
For some documents in our repository the content needs to be indexed for searching, for other documents this indexing should be turned of.  To do this we created a new document type:

<type name="cm:contentNoIndexing">
         <title>Content</title>
         <parent>cm:cmobject</parent>
         <archive>true</archive>
         <properties>
            <property name="cm:contentNoIndexing">
               <type>d:content</type>
               <mandatory>false</mandatory>
               <!— Index content in the background –>
               <index enabled="false">
                  <atomic>false</atomic>
                  <stored>false</stored>
                  <tokenised>false</tokenised>
               </index>
            </property>
         </properties>
      </type>
With the webservice client we can create documents of this type. To retrieve the documents we have 2 problems:

1) the documents of this type are not displayed in de web client.

2) when we try to retrieve the content of a document of this type by

content = getContentService().read(new Predicate(new Reference[]{new Reference(STORE, dmsId, null)}, STORE, null), PROP_CONTENT_NO_INDEXING);

and
ContentUtils.getContentAsInputStream(content[0]) 
we get:

The node's content is missing:
   node: workspace://SpacesStore/449bd2ae-2bf4-11dd-acee-fd7ebfbe7924
   reader: null 
Please contact your system administrator.

Can anybody solve these problems or is there a better way to handle the switching between content indexing and non-indexing.

Thx

Outcomes