Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Chintan Akhani
Issue while doing sorting by title on search results
29 marzo 2013 11.29
Risposta

Chintan Akhani

Punteggio: Regular Member

Messaggi: 111

Data di Iscrizione: 13 marzo 2008

Messaggi recenti

Hi,

We have a custom portlet for search (we are using solr search) . I am getting an exception in case of performing sort by title (in case of web content results). Sort by modified date is working fine but sort by title is not working. We are using Solr 1.4 and Liferay 6.0

Thanks,
Chintan
Atin Agarwal
RE: Issue while doing sorting by title on search results
1 aprile 2013 5.14
Risposta

Atin Agarwal

Punteggio: Junior Member

Messaggi: 86

Data di Iscrizione: 19 febbraio 2012

Messaggi recenti

Share your code for more clarity.
Chintan Akhani
RE: Issue while doing sorting by title on search results
10 aprile 2013 12.21
Risposta

Chintan Akhani

Punteggio: Regular Member

Messaggi: 111

Data di Iscrizione: 13 marzo 2008

Messaggi recenti

I found the solution for sort by title issue with solr 1.4. Below is the solution for same.

1. Open scema.xml file into solr plugin and solr server, create a custom field called "newTitle", and it's type should be "string".
2. After fields tag completed, add one tag called "copyField", this tag has two attributes, source and dest. keep "newTitle" as source and "title" as dest.
3. Now make a small change into your java code of sorting, change the sort by field to "newTitle" instead of "title" and it will work for you.