dhysong
dhysong

Reputation: 1021

Solr - complicated sort

I need to sort a list of properties by the following:

  1. Search Term (ex. City:Atlanta)
  2. Distance (ex. distance from center of Atlanta, Ga) : geodist(LatLng,34.002878,-84.144637) desc
  3. PackageLevel asc
  4. Random Order for PackageLevel's 1-5: product(map(PackageLevel, 1, 5, 1), seedrandom_10) desc
  5. Distance: geodist() asc

I can handle all but the first requirement. I have tried termfreq(City, 'Atlanta'), but it returns an error:

sort param could not be parsed as a query, and is not a field that exists in the index: termfreq(City,'Atlanta')

Any help would be greatly appreciated.

Upvotes: 0

Views: 318

Answers (1)

Persimmonium
Persimmonium

Reputation: 15781

unless you are on 4.0 you dont have those functions available in 3.6...see here

Upvotes: 1

Related Questions