I have solr query that simply returns the most recent items in the index. However I'm trying to optionally if categories are passed in have it the category field weighted such that if there are matches for the category field then those are weighted higher but still have those without categories show.
so the document structure looks something like this:
{id:1, title:"sometitle", category:['cat1','cat2']},{id:1, title:"sometitle", category:[]}
my general query is something like:
title:*
but if categories are passed in i'd do the same title:* query but i'd like the results to be sorted such that those results with category fields that match the categories passed in are weighted higher
I tried boost query (bq) but that didn't work (which makes sense because my query is to return all) and i am sorting primary by score and doing a secondary sort on a "created" field