Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Relevancy using Oracle Text

Tags:

search

oracle

I want to implement a relevancy based text search on News text. Here is the requirement.

A table will contain the news text in an Oracle table column of type CLOB. The search will retrieve the news article based on relevancy of the user entered value in descending order. e.g. user enters a search text , "grand slam tournament". The application will return all news articles which has one or more of these 3 keywords in this order,

  1. All articles with "grand slam tournament" in it
  2. All articles which has either "grand slam" or "slam tournament"
  3. All articles which has all 3 words in it but not contiguous
  4. All articles which has any 2 of these words in it but none contiguous
  5. All articles which has at least one of these words in it

LIKE search will be slow due to high data volume and long text

Can this be implemented using Oracle TEXT search features of Oracle 11g ?

like image 987
cosmos Avatar asked Jul 05 '11 10:07

cosmos


1 Answers

This may be somewhat offtopic, but depending on your environment (and if you are not locked purely to the database), we have found that using something like a SOLR server (or lucene app like hibernate-search) performs better, give better relevancy and is more configurable than most DB's.

In my experience, we got mysql to do this using the full text search feature, but it never really worked the way we wanted to.

like image 89
Richard Noble Avatar answered Sep 20 '22 13:09

Richard Noble