R
R
Roman Sarvarov2020-04-19 23:31:40
Search engines
Roman Sarvarov, 2020-04-19 23:31:40

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

3 answer(s)
K
ky0, 2020-04-20
@ky0

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.?

X
xmoonlight, 2020-04-20
@xmoonlight

It is necessary to build an alphabetical index and multiply words by simple coefficients.

A
Alexander Aksentiev, 2020-04-20
@Sanasol

https://ru.wikipedia.org/wiki/%D0%90%D0%BB%D0%B3%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question