Re:Postgres Full-Text Search: A search engine in a database
by IgorPartola on Wednesday July 28, 2021 @01:01AM
(#27980411)
So let’s say that you are building a search engine for performance car parts. There are going to be a bunch of technical terms you use there that are not necessarily going to stand out in the document itself but you know them to be important. For example, the amount of boost pressure a turbo can provide or the number of pistons in a brake caliper. Is there some structured way to specify the grammar which is used for such terms and treat those as important such that when a user puts in “19psi turbo” that they don’t get a bunch of results for just “turbo” which isn’t exactly what they want?
[ Parent
| on HN ]
Re:Postgres Full-Text Search: A search engine in a database
by nostrademons on Wednesday July 28, 2021 @11:08PM
(#27992385)
This subproblem is called "bigram detection", or more generally "n-gram detection" for phrases of > 2 words. I'm not going to give away Google's algorithms, but you should be able to look up public academic research with that keyword.
Re:Postgres Full-Text Search: A search engine in a database
by dreamer7 on Wednesday July 28, 2021 @07:43AM
(#27982679)
When I implemented search for my app, I built a hierarchy of the different attributes weighted by levels and scored search phrases for how closely they matched. This is for mobile phones. For example, searching for "Silver iphone 11 pro" would give a higher ranking to all iphone 11 pros that are Silver, then comes differently coloured 11 Pros, followed by 11 Pro Max and 11s, lastly all silver coloured phones.