lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gupta, Abhinav" <abgu...@ptc.com>
Subject Custom sorting on facets
Date Tue, 31 Dec 2013 12:54:48 GMT
Hi,

I am using facets for suggestions. By default facet sort is based only on index order and
count.
Now, in that I have a requirement that based on a value in solr doc ;some suggestions must
be at top and then other.

Example :
<doc>
<id>doc1</id>
<name>ProductInstance<name/>
<machineId>hydraulic</machineId>
</doc>

<doc>
<id>doc2</id>
<name>ProductInstance<name/>
<machineId>other hydraulic</machineId>

</doc>

<doc>
<id>doc3</id>
<name>Product<name/>
<machineId>test hydraulic</machineId>

</doc>

<doc>
<id>doc4</id>
<name>Product<name/>
<machineId>other test hydraulic </machineId>

</doc>

In above 4 solr documents  ,I will be having many more fields... In suggestions I want to
create facet on machineID... But I want to sort it based on name field ..
Say if I queried for hy*.. then I should get facet from all 4 docs but sorted by name field.

PS: I can't use any other type of suggester as I need to display whole machineID text as suggestions
and not a single word..

Many Thanks,
Abhinav

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message