Answer the question
In order to leave comments, you need to log in
How, having a large text, find matches of all sentences?
Imagine there is a table sentences, where hundreds of thousands of some sentences or phrases are stored.
And there is a text of 5000 words that the user entered (for example).
Is there any way or algorithm to rationally use computational resources to select all matches in the text (for example, through str_replace) from the entire sentences table?
Answer the question
In order to leave comments, you need to log in
And why, in fact, do you want to solve this problem using postgres, and not using much more suitable solutions based on inverted indexes - Lucene, Elasticsearch, etc.?
It is necessary to build an alphabetical index and multiply words by simple coefficients.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question