rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

Searching for "fromEvent" shows wrong/random results

Open martinsik opened this issue 3 years ago • 2 comments

Bug Report

Current Behavior When I go to https://rxjs.dev/ and use the search field in the top right corner to search for "fromEvent" it's suggesting wrong/incomplete results.

rxjs-frome rxjs-fromev rxjs-fromeven rxjs-fromevent

Expected behavior

When typing into the search field I should see smaller and smaller subset of search results probably ending with fromEvent and fromEventPattern.

martinsik avatar Jun 30 '21 08:06 martinsik

I had a quick look at this issue and it seems that keyword generation for the search index is not working correctly.

In your case fromEvent is used in many Examples and somehow the content of the examples are included within the keywords of the document. Searching for click will also return many documents.

tmair avatar Jul 07 '21 15:07 tmair

I was investigating this a little and there's something wrong with lunr.js I think. When I search for fromeven it searches for "titleWords:*fromeven* fromeven" which should find both fromEvent() and fromEventPattern(). When I try the same query "name:*Shepar* Shepard" at https://olivernn.github.io/moonwalkers/ it works as expected.

I created an issue in their repo as well https://github.com/olivernn/lunr.js/issues/513.

martinsik avatar Apr 20 '22 19:04 martinsik