Text Index return min of words specified [message #616613] |
Thu, 19 June 2014 01:11 |
|
sherlocksher
Messages: 14 Registered: June 2013
|
Junior Member |
|
|
Hi,
We have a text index that is built on a multi column data store . The column names are DISC_CMPLNT_TX and MAINT_ACT_TX .
Our requirement is as follows :
1. The user can specify two types of words for searching. The first type is a REQUIRED KEYWORD and the second type is an OPTIONAL keyword.
2. Records that are returned should satisfy the condition where the required keyword is present and along with it ATLEAST 50% of the no of optional keywords should also be present .
For e.g. If the required keyword is RIGHT and the OPTIONAL keyword are SEAT, MAINTENANCE, ENGINE, SUPPLY,WING then records that contain the word RIGHT and three or more than three words from the optional keywords specified should be retrieved.
3. In addition, fuzzy search is switched on by default and each word can have synonyms.
4. For the REQUIRED keyword condition, I am able to specify the condition in the below manner where RHT,RT,R/H and RGT given below are synonyms of the word RIGHT.
SELECT a.ac_maint_id,
a.disc_cmplnt_tx,
a.MAINT_ACT_TX
score (1),
score (2)
FROM ac_maint a
WHERE project_id = 1261
AND contains (DISC_CMPLNT_TX,
'((?{RIGHT} = {RHT} = {RT} | {R/H} | {RGT}))',
1) > 0
5. Can somebody please clarify on how do I get atleast 50% of the OPTIONAL KEYWORDS. Also if the same OPTIONAL keyword is duplicated multiple times, then it should be treated as a single word.
|
|
|