7

I implemented a boost on my 'tags' field; however it doesn't rank my results in the appropriate way.

my search_indexes.py:

class ParagraphIndex(indexes.SearchIndex, indexes.Indexable):
    text= indexes.CharField(document=True, use_template=True, boost=1.0)
    tags= indexes.MultiValueField(boost=2.5)
    def prepare_tags(self,object):
        return [tag.tag for tag in object.tags.all()]

My regular search works fine with the right fields. I have ran update_index several times and still getting the same answer. Any help will be much appreciated. Please let me know if more info is required!

Dan Mašek
  • 17,852
  • 6
  • 57
  • 85
Badi8beach
  • 556
  • 2
  • 4
  • 18
  • I'm running into a similar issue on document boosting and it turns out haystack doesn't currently implement it for Elasticsearch (https://github.com/toastdriven/django-haystack/pull/744/commits). Might want to check into support for the field boost you're trying to use. – Tom Mar 29 '13 at 21:13

0 Answers0