Closed 13ogrammer closed 3 years ago
I am unable to get search results on Documents when only enrich: true option is set.
enrich: true
Here is the code I am using to test this:
var { Document } = require(`flexsearch`); var index = new Document({ id: "objectID", index: ["firstname", "lastname"], store: true }); index.add({ firstname: "Jimmie something", lastname: "Barninger", objectID: "myID1" }); index.add({ firstname: "Warren", lastname: "jimmie", objectID: "myID2" }); var result = index.search("jimmie", { enrich: true }); console.log(`result`, JSON.stringify(result)); // result [] var resultWithIndex = index.search("jimmie", { index: "firstname", enrich: true }); console.log(`result`, JSON.stringify(resultWithIndex)); // result [{"field":"firstname","result":[{"id":"myID1","doc":{"firstname":"Jimmie something","lastname":"Barninger","objectID":"myID1"}}]}]
Here is the link to codesandbox: https://codesandbox.io/s/flexsearch-search-tests-2quf3
Thanks for the report. This bug is now fixed in 0.7.1
Thanks @ts-thomas
I am unable to get search results on Documents when only
enrich: true
option is set.Here is the code I am using to test this:
Here is the link to codesandbox: https://codesandbox.io/s/flexsearch-search-tests-2quf3