We are trying to implement a full-text search in Oracle, but I don’t understand how to create a search query correctly: The task is as follows:

  1. When writing a word, all entries should be displayed and sorted by relevance. At the same time, when searching for "rock", the search results should display "cheese", "rock" and "procrastination" sorted by relevance.
  2. When writing several words in a search query, cells containing both all the words and some of the query should be displayed. Also sorted by relevance.
  3. It should be possible to unite words in groups. Those. For example, when you select a word in quotation marks, such an entry must be searched for strictly, without separate search by words.

While it turned out to implement only a part of this, using the ABOUT operator ( reference to documentation ), it is ideally suited for the second item of the task. Those. if I write a query like:

SELECT SCORE(1), name from table WHERE CONTAINS(name, 'ABOUT('some text')', 1) > 0 ORDER BY SCORE(1) DESC; 

Then I will get the following results:

 some text some text 

A question how to integrate it with search in a phrase, and with search of partial occurrences?

    0