Improve site Orama searchbox results
JaoodxD opened this issue · 8 comments
When typing "runInNewContext" or "createServer" into the search box, I expect to see links to the corresponding documentation. However, I either receive no results or a few links to unrelated topics.
Interestingly, when I explicitly specify the module name, such as "vm.runInNewContext" or "http.createServer," the search box functions as expected.
Is this a limitation of Orama, or is there a way to configure the search more precisely to address this issue?
cc @micheleriva
Looking on it (cc. @faustoq)
@ovflowd, @JaoodxD this is due to the fact that Orama enables prefix search by default. When specifying vm.runInNewContext
, Orama is able to search by prefix, so you get the expected results.
We should be able to tokenize code blocks and split automatically on .
, so that vm
and runInNewContext
will be considered two separate words, with their own prefixes.
We'll keep you posted on that
Hi!
We released a new version that implements the tokenization using also .
.
Now, the above queries return the expected results.
Thanks for opening this issue.
What is the new version we should be using? Do we only need to update the package.json?
The solution appears to have landed, and the search box works perfectly now. Thank you, @micheleriva and @allevo!
Hi @ovflowd, sorry for the lack of some information. There's no action on the Nodejs side: the fix involves only the Orama "server" without any impact on the frontend side.
Thanks!