Hi,

I found a own hack. It's based on free interpretation of the function strdist().

Have:
- one multivalued field 'part_of'
- one unique field 'groupsort'

Index each item:
   For each group membership:
      add groupid to 'part_of'
      concat groupid and sortstring  to new string
      add this string to a csv list
   End
   add the csv list to 'groupsort'
End

Have also, a own class that implements org.apache.lucene.search.spell.StringDistance, to generate a custom distance value. This class should:
- split the csv list
- find the element/string that starts with the given group id
- translate the rest (sortstring) to a float value
.../select?q=part_of:X&sort=strdist("X", groupsort, FQN) asc
FQN is the fully qualified name of the own class. (remember to place the the jar in a 'lib' defined in solrconfig.xml or add a own 'lib' entry)

Uwe
(still looking for a smarter solution)

Reply via email to