首先,您应该使用
dismax
or
edismax
query parser instead of the default
(lucene).
然后,您可以使用不同的参数来提高相关性:
- : Use qf to boost your product_name field.
- : Use pf to boost your product_name field where all of the terms in the q parameter appear in close proximity.
- : Use bq to boost documents where the words
with
orwithout
don’t appear. See here. For example :bq=(*:* -with -without)^999



