Reputation: 1821
I am using solr to search through indices written through lucene's index writer. My use case is pretty much close to log collection and analysis. I have the indices in 3 categories, hot, warm and cold.
Now that if I want 100 results from the indices, is there anyway I can ask solr to look into the warm category, only if hundred results are not available from hot, and also look into cold only if hundred results are not obtained still after reading hot and warm?
If the above is ambiguous, in simple terms, can I prioritize the indices in solr?
Upvotes: 1
Views: 262
Reputation: 52769
Why don't you query for 100 results and sort by the categories (hot -> 1, warm -> 2 and cold -> 3).
This way solr will arrange and return back the results accordingly in the order that is required by you.
You can add a facet to the categories so you get the count as well of how many results each of the categories had.
Upvotes: 2