-
Notifications
You must be signed in to change notification settings - Fork 12
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
Passing a search string to the serverless function returns the entire index #19
Comments
hi Matt! hmm, weird bug! should need to be caught with the test suite. |
@hypervillain if you'd like to help with this one itd be much appreciated, i took a quick look and it seems we dont really have tests set up for this. might be a regression from one of our previous merges.. @mattstratton the other thing im considering is that this could be due to our use of fuzzy matching. a short string is easier to fuzzymatch loosely. you're expeciting it to work like a filter, probably. maybe we should add a "strict" mode, or make fuzzy search opt in rather than default. |
That could be! With our site the index is waaaay big so we can’t have the whole thing come back like that (it’s over 25 MB). |
I'll take a look ✌️ |
@mattstratton yea i get you. i wonder if we should offer an option to just bypass fusejs altogether and just use javascript's |
To be honest I haven’t gotten that far yet, as this was the beginning of my POC to figure out what we want to do with search :) (I appreciate the responses and your work on this plugin by the way!) |
np! tbh i did this in my final days at Netlify, am looking for a new owner/more maintainers as i pursue other things at aws. lmk if you end up using it! |
@mattstratton we have released #20 as v0.1.6 with a lower fuzzy match threshold and a new |
It probably won't do miracles for small strings though, but that's probably a limitation with Fuse itself. |
yeah maybe we should offer fuzzy as an opt-in thing since it is probably slower than |
Describe the bug
Passing a search string to the serverless function returns the entire index.
To Reproduce
This is reproducible in the demo link at https://netlify-plugin-search-index.netlify.app/.netlify/functions/search?s=web (the entire index appears to be returned).
This occurs when I attempted it on my own site as well, but I discovered it is happening with the demo link as well, so that is probably easier to reproduce :)
The text was updated successfully, but these errors were encountered: