cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene index FULL recovery breaks record sorting

sylvain78
Champ in-the-making
Champ in-the-making
Hi,

I have a problem with sorting and I would like to have a few explanations regarding Lucene index, analysis modes and locales.

Let's consider the following settings :
  • Alfresco Community 3.4.d

  • The DOD5015 module is installed (so I can't move on to Solr yet)

  • Server locale is en_US

  • Default analysis modes : EXACT_LANGUAGE_AND_ALL

  • Custom Records Model property (not multilingual) : rmc:myProperty
When I add a new content having my custom property, Alfresco would add 2 entries to the following terms in the index :
  • rmc:myProperty

  • rmc:myProperty.en.sort
Now let's say I have 10 entries in each terms.
If I rebuild the index, the term 'rmc:myProperty.en.sort' just disappears which is not so bad until I add new content…

When I add a new content having my custom property, Alfresco would add 2 entries in the index :
  • 1 more in rmc:myProperty which now have a total of 11 entries

  • 1 in rmc:myProperty.en.sort which now have a total of 1 entry
If I do a search in Record Search and I want to sort the results by rmc:myProperty, the content that has an entry in rmc:myProperty.en.sort would appear at the beginning or at the end of the results.

It does not blend with the other results.  It looks like they are sorted separately or something.

Explanation and solution?
  • I tried to use the 'ALL_ONLY' search analysis mode but the result is the same.

  • Maybe it has something to do with the fact that the value in rmc:myProperty is indexed as {en}myValue?

  • Why does the term 'rmc:myProperty.en.sort' disappear when I rebuild the index?

  • Should I just rebuild the index using the 'ALL_ONLY' index analysis mode?
Anybody has a few more pointers?

Thanks,

Sylvain
2 REPLIES 2

andy
Champ on-the-rise
Champ on-the-rise
Hi

You can upgrade to 4.0 and still use lucene.
4.0 has a change to sort on <>.no_locale which will be better - but not as good as localized ordering with SOLR.

Andy

sylvain78
Champ in-the-making
Champ in-the-making
Hi Andy,

I will eventually have to upgrade to 4.0 but that would require too much work at this point, because I'm using the dod5015 module which is not supported yet in 4.0.

So far, we have a few workarounds left like supporting sorting on the client-side only (with YUI).

But to shade light on what is going on here, my understanding is that we should not do a full index recovery when using "EXACT_LANGUAGE_AND_ALL"?
Because it would effectively break sorting?

The strange thing is that the cm:name property is still localized even after a full index recovery, so there must be some special treatment in this case.

Thanks for your explanation,

Sylvain
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.