lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salvo Bonanno <>
Subject Sorting by custom order
Date Sat, 01 Sep 2018 06:36:56 GMT

I need to sort a results set in a particolar way... the documents
looks like this:

    "name_txt":["Equal Corp"],
    "address_txt":["Austin Ring Center"],
    "name_txt":["Mustard Ltd"],
    "address_txt":["Telegraph Road"],

I need to sort them by profile_txt value (it's a multiValue field but
actually it contains just a single value), but since the possible
values are just 5, I'd like to tokenize them for deciding in wich
order the should came.

the order should follows a simple schema:

1. profile_txt = "Gold"
2. profile_txt = "Super"
3. profile_txt = "Smart"
4. profile_txt = "Base"
5. profile_txt = "Essential"

Then an additional sort by visibility_weight_txt should be done

Is it possible to do this someway using FunctionQueries? Unfortunally
I can't modify the schema.

Thanks for reading

View raw message