mdBook
mdBook copied to clipboard
No search results when there are
For example: https://doc.rust-lang.org/nightly/reference/expressions/if-expr.html?search=if%20let

Unfortunately if and let are stop words ((src)[https://github.com/mattico/elasticlunr-rs/blob/beedaf86038839b07df007b0f7cf8417e4414956/src/lang/en.rs#L22-L33]), so they aren't indexed.
I think it is possible to define a custom pipeline in elasticlunr, but I fear that removing the stop words would result in noticeably worse search results (and maybe a much larger index?). Perhaps if search.use-boolean-and were true it wouldn't be so bad, but the default is false, and I'm not really sure if it would be wise to change that.
Is there a way to search in table content (sections listing) only? That might reduce the index and create more correctly search result.
I don't think so, I believe it can only boost the ranking of different things.
the default is
false, and I'm not really sure if it would be wise to change that.
I find current behavior surprising, so curious why not change the default to use-boolean-and = true... why would it be not wise?