cancel
Showing results for 
Search instead for 
Did you mean: 

Disable FULL Indexing at CONTENT TYPE LEVEL

nirvanvjain
Champ on-the-rise
Champ on-the-rise
Hi Folks,

I am know to Alfresco Content Model developement,deployment and its usage.

For indexing at particular type of Content there are below properties :

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

Now I want to disable FULL Indexing at Content Type level. I can develop new Content Type in my Custom Content Model by taking/putting cmSmiley Surprisedbject or other "CM" type (which is again a child of cmSmiley Surprisedbject) as its parent.

So if I want to disable the FULL Indexing at Content Type level , I can not as per my understandings.

How to disable ( FULL )Indexing at Content Type Level ? Please help me to achive this requirement.

Thanks!
- Nirvan
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
Just set indexed to "false".

And please don't cross post.   I've deleted it for you.

nirvanvjain
Champ on-the-rise
Champ on-the-rise
Hi mrogers,

I know that once makes False , it will not stop FULL Indexing.

I guess I have not posted it descriptively…

Lets say I have 3 Content Model..
1) cm:Content (ContenModel.xml)
2) Custom Content Model-1 (Having 2 types [abc & xyz] having parent cm:content)
3)Custom Content Model-2 (Having 2 types [abc & xyz] having parent cm:content)

[size=150]Now what I want is in
   Custom Content Model-1 - Type xyz  and  Custom Content Model-2 - Type abc  ;There MUST NOT be INDEXING ENABLED  but on
  Custom Content Model-1 - Type abc and  Custom Content Model-2 - Type xyz;There MUST be INDEXING.[/size]


I hope this makes sense in example . Please let me know if any other thing needed.

Thanks!
- Nirvan

abarisone
Star Contributor
Star Contributor
HI,
from Alfresco 4.0.d on it is possible to control indexing on a particular content type exploiting the cm:indexControl aspect, provided with basic contentModel.xml:
<!–                  –>
      <!– Indexing control –>
      <!–                  –>
     
      <aspect name="cm:indexControl">
         <title>Index Control</title>
         <properties>
            <property name="cm:isIndexed">
               <title>Is indexed</title>
               <type>d:boolean</type>
               <default>true</default>
            </property>
            <property name="cm:isContentIndexed">
               <title>Is content indexed</title>
               <type>d:boolean</type>
               <default>true</default>
            </property>
         </properties>
      </aspect>
Hope this helps.
Regards,
Andrea

dhartford
Champ on-the-rise
Champ on-the-rise
There are many references to ways to "control content indexing", or disabling full text indexing.  However, how to accomplish on an individual content model still seems mis-understood.

Intent: Specify a custom model, and in the definition *somehow* specify never full text index.


<model name="my:textdoc" xmlns="http://www.alfresco.org/model/dictionary/1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <imports>
      <import prefix="d" uri="http://www.alfresco.org/model/dictionary/1.0" />
      <import prefix="cm" uri="http://www.alfresco.org/model/content/1.0" />
   </imports>
   <namespaces>
      <namespace prefix="my"
         uri="http://www.notarealurl.xyz/model/my/1.0" />
   </namespaces>
   <types>
<type name="my:securetextdoc">
<title>text docs with keyword searching, but not content searching</title>
<parent>cm:content</parent>
<properties>
  <property name="my:securekeywords">
     <title>custom key word text field</title>
     <type>d:text</type>
     <mandatory>true</mandatory>
</property>
</properties>

<mandatory-aspects>
   <!– <aspect>cm:dublincore</aspect> –>
   <aspect>cm:versionable</aspect>
</mandatory-aspects>

</type>
</types>
</model>


<strong><em>What do you change or add in the content model file to disable content indexing?</em></strong>  The aspects section is for adding new aspect types was my understanding, and the mandatory-aspects does not allow you to set properties (or, at least, I do not know how to).


(note: copying the above and pasting into the aspects tag underneath types, then changing the contentindex to false fails initially with 11220000 Cannot define class cm:indexControl as namespace http://www.alfresco.org/model/content/1.0 is not defined by model my:textdoc )

To ensure full understanding of intent, the equivalent of cm:isIndexed=true and cm:IsContentIndexed=false is the target behavior directly in the content model file.