Closed eemi closed 7 years ago
Hi, @eemi!
Thanks for the feedback :) It helped me realize we were testing the indexing of the gem, but not the actual use of the index - so I tried that.
The error you see is because the client code is not loading lunr's stemmer support & custom language stopword filters. We did that during the index generation, but it was missing from the client code.
So I've just updated the README to reflect this - let me know if that works. It's getting a bit verbose - I'm not sure if we could make the extension work out this require
s -, but it should do the trick.
Once again, thanks for pointing this out.
Cheers!
@matiasgarciaisaia thank you very much! It's working flawlessly.
Hey guys!
When retrieving the data file (search.json), I got this error in the console:
Cannot load un-registered function: stopWordFilter-es
. I didn't add the function myself, but I guess it was done automatically when setting es as the language.So, I created a deregister.js.erb file with this content
<%= search_lunr_js_pipeline %>
and loaded it before retrieving the data file as specified in your readme. The issue is that the method doesn't seem to exist, this is what I getting in the console:throw Error("NameError: undefined local variable or method `search_lunr_js_pipeline' for #<#<Class:0x007fdfad03c818>:0x007fdfa4fccef8>\n on line 1 of /Users/emi/Documents/ANSES/code/site/source/assets/js/deregister.js.erb)")
What I'm doing wrong?
Im using Middleman 4.1.10 and middleman-search (0.9.0)
Kind regards