Search doesn't return result
See original GitHub issueThe following code
var index = new FlexSearch("memory", {
encode: "balance",
tokenize: "forward",
threshold: 0
})
const allData = await GetAllVideos() // load data from mongo db
allData.map( item => {
item.categories.forEach( it => {
if(it === 'Babe') console.log(it)
index.add(item._id, it)
})
})
index.search('Babe', res => {
console.log('Result', res)
})
Returns
Babe
Babe
Babe
Babe
Babe
Babe
Babe
Babe
Babe
Babe
Babe
Result []
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Excel SEARCH function not returning expected results
Yes SEARCH will return an array, but you need to do something with that array or it will only return the first result:...
Read more >Search in Outlook doesn't return any results in many cases
A client of ours experiences issues when using Outlook search When searching for mails in most cases the resulting list is correct.
Read more >Google Search Won't Return Search Results For Some ...
Yesterday some searchers began complaining that Google search would not return search results for them. Instead, Google would return an ...
Read more >Search bar wont return results [closed] - Stack Overflow
Cant figure out what's going wrong here, no errors are appearing but nothing is being returned. The search bar should return the names...
Read more >How to Fix When Excel Find Is Not Working
The most common reason for the error is that the string you're searching doesn't exist. Say you have a data set with prices...
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
@shazgames Is it simply that you need to include
encode: "icase"
ie. The index contains “babe” but you search is for “Babe”.I don’t think this is a bug in flexsearch.
@Leyart He is only searching for a single term, so I don’t see how #96 is relevant.
Please change over to the version >= 0.7.x, thanks a lot.