Paging with mutltiple fields/boost.
See original GitHub issueSetup
var index = FlexSearch.create({
doc: {
id: "url",
field: [
"title",
"content"
]
}
});
Working
Invoke:
index.search(
"test",
{
page: true,
limit: 5
})
Result:
{
"page": "0",
"next": "5",
"result": [
{
"title": "Load Testing V. 1.0.1",
"content": "test",
"url": "/Project_Management/validations/validation2"
},
{
"title": "Pre Test Inpsection Report",
"content": "test",
"url": "/V_and_V/5016-09-F21"
},
{
"title": "Packaging Validaiton Test Report",
"content": "test",
"url": "/V_and_V/5016-09-F19"
},
{
"title": "EMC 60601 Test Plan",
"content": "test",
"url": "/V_and_V/5016-09-F23"
},
{
"title": "Third Party Testing",
"content": "test",
"url": "/3rd_Party_Testing"
}
]
}
Not working
Invoke:
index.search(
[
{
field: "title",
query: "test",
boost: 1
},
{
field: "content",
query: "test",
boost: 0.5
}
],
{
page: true,
limit: 5
}));
Result:
{
"page": "0",
"next": null,
"result": [
]
}
Comments
I need to be able to page the results, while also search multiple fields with different boost
values.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
elasticsearch: multiple fields with boosts - Stack Overflow
I am trying to create a query for elasticsearch. The conditions: there is always a customer filter. There is a field "name" that...
Read more >How to work with search results - Azure Cognitive Search
Scoring profiles give you more control over the ranking of items in search results, with the ability to boost matches found in specific...
Read more >boost | Elasticsearch Guide [7.17] | Elastic
Individual fields can be boosted automatically — count more towards the relevance score — at query time, with the boost parameter as follows:....
Read more >The DisMax Query Parser | Apache Solr Reference Guide 7.2
The qf parameter introduces a list of fields, each of which is assigned a boost factor to increase or decrease that particular field's...
Read more >Boosting - Coding Explained -
Documents containing this phrase within their name field will have a boosted relevancy score. Of course this makes more sense if you are ......
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 Free
Top 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
Hmm, in the README, it mentions it’s supported. What is this in reference to?
Please change over to the version >= 0.7.x, thanks a lot.