SOLR sort depending on "tokenisation"

Showing results for 
Search instead for 
Did you mean: 
Member II

SOLR sort depending on "tokenisation"

Hi everyone,

from what I understand:

  • each model property has a default value of "<tokenized>true</tokenized>"
  • each model property can configure/override this, for example to "<tokenized>false</tokenized>"
  • SOLR sort should not work if the property is tokenised, and should throw an exception ("java.lang.UnsupportedOperationException: Ordering not supported for")

What's bothering me is that if by using Share I sort the results by "Author" - "cm:author" property having "<tokenized>true</tokenized>" - I see no error. Sorting does work, but not correctly (probably due to the tokenization). I see the same behaviour by using Javascript Console with JS API ("fts-alfresco" query language).

So, I'm a bit confused here, can anybody help please:

  • why does the sort even work?
  • why does it not sort ok (additionally, there's no OOTB/easy way to override "tokenization" of Alfresco's model)


1 Reply
Member II

Re: SOLR sort depending on "tokenisation"

The same is true when talking about the "cm:creator" property, as well.

So, I can get the behaviour that I want by changing the "tokenized" field + reindexing the database, but this means that to get a "natural" sort I need to change the out of the box Alfresco model - and there's no easy way to do that.

Am I missing something?