-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
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
Fuzzy search same model, but different fields #38
Comments
Hi, this is not possible, but even if it was, I wasn't suggested you to use fuzzy search in big strings. Even better if you set as searchable column only the title, the results will be more accurate. |
But this is a very nice idea though, I will add it on the backlog. |
@VassilisPallas did you have time to do this? |
try this https://github.com/evgeniy-skakun/mongoose-fuzzy-searching, there is a search for specific fields
|
Does the fuzzysearch() look into all the fuzzy fields for matching input string, in my case even through both firstName, lastName mentioned as fuzzy fields the search occur only on the firstName, but for lastName only the extract match works // schema UserSchema.plugin(mongoose_fuzzy_searching, { fields: ['firstName', 'lastName'] }) // insert // search output: [] const users = await User.fuzzySearch({ query: 'doe', prefixOnly: true, fields: ['lastName'] }) output: [{ _id: 609f6e9d7fd01b5b260b24ef, |
so if I have and then, without fuzzy search, I would search like this: With this package, there will not be a way to fuzzy search different strings for each of the fields "start" and "end"? |
Hi.
I have and model named Article that contains the tilte and content .
The model is exported and used in another .js.
How can I fuzzy search the title and content separately, without declaring
in the model schema file?
I want to have 2 functions that search articles one by the title, and the other one by the content, separately.
If I put the
then my both functions will use title and content for the fuzzy search.
Can I achieve something like this?
The text was updated successfully, but these errors were encountered: