Can I boost a field and not a term ?
See original GitHub issueI am building an index which has several fields (name, make, OEM name and description)
E.g
ID: 1
Name: Wrench
Make: Test
OEM Name: Wrench 123
Description: Nice wrench
ID: 2
Name: Allen Wrench
Make: Rick
OEM Name: null
Description: It's a good one!
So when I search for allen wrench, given that the word wrench
is in name, oem name and description it makes sense that the first result is ID 1.
However I want to specify that the field Name
has an extra boost so that when I search for allen wrench ID 2 will be the first result.
Is that possible?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Boost — Haystack 2.4.1 documentation
Term boost happens at query time (when the search query is run) and is based around increasing the score if a certain word/phrase...
Read more >solr - How to down boost a term in dismax - Stack Overflow
Boosting on qf parameter will boost the field regardless of value in the field. In order to boost documents that contains the keyword...
Read more >Cross_fields and boost - Is it feasible? - Elasticsearch
Note that cross_fields is usually only useful on short string fields that all have a boost of 1. Otherwise boosts, term freqs and...
Read more >Relevance Tuning Guide, Weights and Boosts - Swiftype
Boosts · Value Boost: Applies to text, number, and date fields. A value boost looks for a specific value within a given field....
Read more >Field Boost - Bee Swarm Simulator Wiki - Fandom
Multiple sources of field boosts can be used to reach much higher stacks. ... the boost in pollen will still be there, but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve just released version 2.3.0 which now re-introduces field boosts as well as adding document boosts. Documentation is being updated, I will updated the guides at some point too, but this is what the interface looks like:
@olivernn Can we have field specific boosting available in lunr 2.0 similar to what we used to have in lunr 1.0. Suppose, if we have 2 fields like ‘title’ and ‘body’ and we want to boost results which have queries matched in ‘title’ over the queries matched in ‘body’ , we cannot achieve it using term level boosting. Thanks in advance.