cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Indexing custom properties

jzulu2000
Champ in-the-making
Champ in-the-making
Hello

I have a problem with Alfresco that is not finding custom documents when I search using custom properties. It stopped working without changing any configuration… the search worked fine, and from a moment on, it's not working anymore.

I have a new document type called planillasSmiley Tonguelanilla, and it has a lot of new fields, i.e. nombreEmpleador. When I try to search that field, alfresco returns older documents containing the search term in that field, but for new documents, alfresco doesn't return documents.

Lucene query is: ( TYPE:"{planillas.model}planillaObligatoria") AND ( @planillas\:nombreEmpleador:"JOHN")

When I first execute the query, alfresco returns 2 documents containing JOHN in nombreEmpleador field.

Then, I add another new document and fill that name with 'JHON'… when I try to search it, alfresco doesn't find it….

If I go to the alfresco web client, and modify one of the documents that alfresco finds normally, after saving it, lucene doesn't find it anymore..

If I check the documents using web interface, all fields are correctly filled, including nombreEmpleador.

The strange thing is that If I try to search by TEXT, lucene finds the documents, even after modifying them.. I modified the same document that alfresco didn't find by nombreEmpleador, and changed the description; after doing this, the search by TEXT did find it, but by nombreEmpleador didn't.

The query to search by text is:
( TYPE:"{planillas.model}planillaObligatoria") AND (TEXT:JOHN)

I tried wit this search and alfresco find them too…
( TYPE:"{planillas.model}planillaObligatoria") AND (TEXT:"JOHN")

Does somebody know why this could happen?

The new document type configuration, with custom fields is as follows…


      <type name="planillas:planilla">
         <title>Planilla</title>
         <parent>cm:content</parent>
         <properties>
            <property name="planillas:tipoIdentidad">
               <type>d:text</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
               <constraints>
                  <constraint ref="planillas:tiposIdentidad" />
               </constraints>
            </property>
            <property name="planillas:identidad">
               <type>d:text</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
            </property>
            <property name="planillas:nombreEmpleador">
               <type>d:text</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>true</tokenised>
               </index>
            </property>
            <property name="planillas:numero">
               <type>d:long</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
            </property>
            <property name="planillas:fechaPago">
               <type>d:date</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
            </property>
            <property name="planillas:valorConsignado">
               <type>d:double</type>
               <mandatory>false</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
            </property>
            <property name="planillas:errada">
               <type>d:boolean</type>
               <mandatory>true</mandatory>
               <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
            </property>
            <property name="planillas:erroresCarga">
               <type>d:text</type>
               <mandatory>false</mandatory>
               <multiple>true</multiple>
               <index enabled="false"/>
            </property>
         </properties>
      </type>

Thank you
3 REPLIES 3

jzulu2000
Champ in-the-making
Champ in-the-making
After dealing with this problem in production enviroment for about 4 days, we just restarted alfresco and everythink started working fine again.. so strange.

joksy
Champ in-the-making
Champ in-the-making

      <index enabled="true">
                   <atomic>false</atomic>
                   <stored>false</stored>
                   <tokenised>false</tokenised>
               </index>
Hi I m not a lucene expert, but maybe if you change the store value somethings happend, yes of course you have been set the indexing to true.

serverok
Champ in-the-making
Champ in-the-making
<atomic>false</atomic>

this mean that the property is indexed in background. Maybe at all this time it was not indexed. Set this setting to "true" - the property will be indexed in the transaction.