I have a solr query that just returns the most recent elements in an index. However, I try, if necessary, if the categories are transferred, have this category field weighted in such a way that if there are matches for the category field, then they are weighted higher, but still have those that are not shown by categories.
therefore, the structure of the document looks something like this:
{id:1, title:"sometitle", category:['cat1','cat2']},{id:1, title:"sometitle", category:[]}
my general query looks something like this:
title:*
but if the categories are passed in i, I would make the same heading: * query, but I would like the results to be sorted so that those results with category fields that correspond to the categories are weighted above
I tried boost query (bq), but it didnโt work (which makes sense because my query should return everything), and I sort the primary score and do the secondary sort in the โcreatedโ field
Akeem source
share