Full-text search queries are currently supported by many databases as their primary function.
As for the implementation, I think your best bet is to check postgres full-text search , as you can
- find a lot of material about how it is implemented.
- actually change and reproduce using parsers (for example, they are optimized for a specific domain)
Wikipedia describes additional details and a concept:
source
share