I have a solr query which has a bunch of boost params for relevancy. This
search works fine and returns the most relevant documents as per the user
query. For example, if user searches for: "iphone 5", keywords like
"apple", "wifi" etc are boosted. I get these keywords from external
training. The top 10-20 results are iphone 5 phones and then it follows
iphone cases and other noise.

But I also have a field in the schema called: attachment_count. I need to
sort the top N result I get after boost based on this field.

Example:
I want to sort the top 5 documents based on attachment_count on the boosted
result (which are relevant for the user).

1. iphone 5 32gb, attachment_count=0
2. iphone 5 16gb, attachment_count=5
3. iphone 5 32gb, attachment_count=10
4. iphone 4gs, attachment_count=3
5. iphone 4, attachment_count=1
...
11. iphone 5 case, attachment_count=100


Expected result:
1. iphone 5 32gb, attachment_count=10
2. iphone 5 16gb, attachment_count=5
3. iphone 4gs, attachment_count=3
4. iphone 4, attachment_count=1
5. iphone 5 32gb, attachment_count=0
...
11. iphone 5 case, attachment_count=100


Is this possible using a function query? I am not sure how the results will
look like but I want to try it out.

-- 
Thanks,
-Utkarsh

Reply via email to