We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample code
const { Document } = require('flexsearch'); const flexSearchDocument = new Document({ tokenize: 'forward', document: { id: 'id', index: [ 'firstName', 'lastName', ], store: true, } }); for (let i = 1; i <= 2; i++) { flexSearchDocument.add(i, { firstName: 'John' + i, lastName: 'Doe' + i, }); } const searchQuery = [ { field: 'lastName', query: 'Doe' }, ]; //Good: search will return lastName field const searchResults = flexSearchDocument.search(searchQuery); console.log('search:', JSON.stringify(searchResults)); //Bad: searchAsync will return firstName field flexSearchDocument.searchAsync(searchQuery) .then(asyncSearchResults => console.log('searchAsync:', JSON.stringify(asyncSearchResults)));
searchAsync expected output: [{"field":"lastName","result":[1,2]}]
[{"field":"lastName","result":[1,2]}]
searchAsync actual output: [{"field":"firstName","result":[1,2]}]
[{"field":"firstName","result":[1,2]}]
The text was updated successfully, but these errors were encountered:
Sorry @wwqwq2313 , wwqwq2313@32c2197 doesn't fix the issue.
Sorry, something went wrong.
No branches or pull requests
Sample code
searchAsync expected output:
[{"field":"lastName","result":[1,2]}]
searchAsync actual output:
[{"field":"firstName","result":[1,2]}]
The text was updated successfully, but these errors were encountered: