Solr + Sunspot: Is It Possible To Promote Different Record Labels - Possible?

I have a model like Post. It has tags. Each of the tags has a weight that should be reflected in the search. Can I somehow save these tags and increase each of them with my weight?

Example:

Post subject "Food outside" Tags "burgers" (weight 5), "pizza" (white 4) and "sushi" (weight 2). When someone is looking for "hamburgers" it should take the extra impulse into account and show it above the post tagged "burgers" that has a weight of 2.

The first solution that came to my mind consisted of 5 text fields with boosts 1-5 that will contain tags for each post. Is there a more elegant solution?

+3


source to share


1 answer


There is no good support for this. However, the closest match looks like payloads . Have a look at the (old) article on this here , but there is a later option . They both use the usual similarities, which is a rather complex topic. Fortunately, as of Solr 4, there is a way to determine similarity by field , so the final code might be simpler than any of these examples.



If you do, share the article with the rest of the world (like SearchHub ). I guess nobody has put everything together with a completely revamped Solr stack.

+1


source







All Articles