Bad search on code.dlang.org
aberba
karabutaworld at gmail.com
Thu Nov 12 20:39:11 UTC 2020
On Wednesday, 11 November 2020 at 16:34:00 UTC, frame wrote:
> I wonder no one noticed it but as I mentioned in another
> thread: the search is insufficient
>
> Looking for example "sql" will not output packages with
> "mysql". You have to search with explicit names instead. I have
> no idea where I can report this.
I'm pretty sure the reason the dub registry search is inaccurate
is due to the limitation of MongoDB's built-in Text search. The
$text operator only due well for the EXACT match [1] so partials
might not work. I personally don't rely on it for search
functionality. You have to give it the exact word you're looking
for in MOST cases.
From [1]:
> For case insensitive and diacritic insensitive text searches,
> the $text operator matches on the complete stemmed word. So if
> a document field contains the word blueberry, a search on the
> term blue will not match. However, blueberry or blueberries
> will match.
Their Cloud offering however comes with a special search product
[2][3] (elasticsearch under the hood... if I remember correctly)
for accurate search.
Another alternative is to roll out a self-hosted elasticsearch
instance for text search.
MeiliSearch [4], built-in rust, is simple and clean for my taste.
It's what I'm going to use for my little side-project.
1. https://docs.mongodb.com/manual/reference/operator/query/text/
2. https://www.mongodb.com/atlas/search
3. https://www.youtube.com/watch?v=kZ77X67GUfk
4. https://www.meilisearch.com/
More information about the Digitalmars-d
mailing list