cancel
Showing results for 
Search instead for 
Did you mean: 

Custom sorting doesn't work for search results in Share

webdesigner
Champ in-the-making
Champ in-the-making
Hello,

I have a search configuration for my custom type to allow sorting of search results using the custom metadata properties.

Here my configuration in share-config-custom.xml

<config evaluator="string-compare" condition="Search">
<sorting>
<sort labelId="label.propert.one">my:customPropOne</sort>
<sort labelId="label.propert.two">my:customPropTwo</sort>
</sorting>
</config>

The properties are displayed properly, but if I try to use them for sort (Click to the property name in the "sort by" drop down of the search result dialog), empty list has been displayed and I see no errors in log.


Is it a bug or what I' doing wrong?

Thanks in advance
Best regards
Vitali
4 REPLIES 4

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

What version of Alfrecso are you using?

SOLR sorting was not recognising the prefix form for sorting.
It could be this?

Andy

webdesigner
Champ in-the-making
Champ in-the-making
Hi,

I'm using Alfresco 4.0 and I can search everywhere for my custom metadata (Node-Browser, Search queries over searchService - API etc.)

These properties are also displayed in Details and Document libraries (my custom metadata-templates configuration)

The sorting of the search results seems to be buggy even with standard properties.

For example:
- I search for documents and find 2 results
- I sort for "size" and refreshed dialog contain only one document (not two!)

And as I said, it doesn't work with custom metadata.

>>SOLR sorting was not recognising the prefix form for sorting.
>>It could be this?

Do I need an extra configuration for my custom model in SOLR to get it working? What should I do exactly?

Best regards
Vitali

webdesigner
Champ in-the-making
Champ in-the-making

ying
Champ in-the-making
Champ in-the-making
Hello,

I have the same problem while sorting with custom metadata properties. I receive an empty list.

In my stderr log I have this (I take Vitali's exemple):

17 juil. 2012 16:51:46 org.apache.solr.common.SolrException log
GRAVE: java.lang.UnsupportedOperationException: Ordering not supported for @{http://www.mytype.com/model/content/1.0}customPropOne
   at org.alfresco.solr.AlfrescoSolrDataModel.getSortField(AlfrescoSolrDataModel.java:1100)
   at org.alfresco.solr.AlfrescoDataType.getSortField(AlfrescoDataType.java:106)
        …


We can see Share has transfered my: to {http://www.mytype.com/model/content/1.0}, so can I consider that SOLR sorting has recognised the prefix form for sorting ?

Does anyone know what is the problem?
Vitali, have you soloved your case?

Thanks in advance.
BR,
Ying