Multi-fields search in documents is not working
See original GitHub issueHi,
Following the doc this sample code should work but it yields an empty array. Any clues about what is done wrong?
var { Document } = require(`flexsearch`);
var index = new Document({
document: {
id: "id",
index: ["title"]
}
});
index.add({
id: 0,
title: "I am a test"
});
index.add({
id: 1,
title: "I am also a test"
});
var result = index.search([
{
field: "title",
query: "test"
},
{
field: "title",
query: "also"
}
]);
console.log(`result`, JSON.stringify(result));
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:16 (8 by maintainers)
Top Results From Across the Web
multifield searching in elasticsearch did not work?
I tried to show all the document which matches either title or body section of article in elastic search and i wrote following...
Read more >fields | Elasticsearch Guide [8.5] | Elastic
This is the purpose of multi-fields. For instance, a string field could be mapped as a text field for full-text search, and as...
Read more >FT.AGGREGATE with multi-fields SORTBY to replace FT ...
This is working as expected. A problem arose when I tried to sort documents by multiple fields before the conditions for FT.SEARCH are...
Read more >Understanding Elasticsearch combined fields and multi match ...
This still returns two documents - and the red esprit dress is ranked higher. In addition you could search for a term that...
Read more >Apache Lucene Migration Guide
Deleted docs are no longer implicitly filtered from docs/positions enums. ... in particular the MultiFields TermsEnum does not implement them.
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

@theguy147 do you have any idea how this works with
{enrich: true}? I feel like there’s another bug 😃Update: @ts-thomas just merged the fix into master, so it should be fixed if you’re on current master now