elasticlunr.js
elasticlunr.js copied to clipboard
Searching Different on Safari, is it supported ?
I have a search example which works in Chrome but not Safari. If you look at the results variable in the Safari screenshot you will see that the ref number goes from 0 upwards and the score is NaN. The exact same query in chrome shows ref fields with values I expect and scores that make sense.
Are there known problems with Safari, the search string "was" works in chrome. Safari doesn't fail on all searches, I've noticed that the string "mas" happens to work.
Will just add that even though "was" could be a stop word I remove stop words with:
elasticlunr.clearStopWords();
and I remove the stemmer too:
var index = elasticlunr(); index.pipeline.remove(elasticlunr.stemmer);
I have the exact same issue and also removed the stemmer and stop words.
@harringtonp have you found a solution for this by any chance?
@xarg Afraid I haven't. I do wonder though would the same issue arise in lunr. If you figure out what it is let me know
For now the "fix" for me is: don't use Safari if you want to get search results - which is pretty lame to tell people to do.
@weixsong I'd like to fix this, but some hints at where to look would be appreciated. I'm not entirely sure where to start looking as I'm not familiar with the internals.
@xarg I wrote my own search solution which was easy (in my case) and has no cross browser issues. Code at:
https://stackoverflow.com/a/46446723/7778427