Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache solr set domain priority

I crawled with nutch 3 domains (domain01, domain02 and domain03). I want to get all posts which contains specific keyword (ex. "champions league"), and than in results first show the posts from domain02, next posts from domain01 and last posts from domain03. simply i want to sort them in priority by domain

If there is a way to set priority of domains ?

like image 301
Dragan Menoski Avatar asked Feb 05 '26 02:02

Dragan Menoski


1 Answers

If you always have the same order of domains, then you can use either index time document level boost or query time sort by domain (or domainorder) then by score.

If the domain order depends on the query, you can use QueryElevationComponent, though I think you have to provide full list of IDs then for each elevation rule and it may not support sequence.

You could also write your own Custom Function Query or component (similar to Query Elevation one).

like image 161
Alexandre Rafalovitch Avatar answered Feb 09 '26 01:02

Alexandre Rafalovitch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!