Question

How to use Oracle Text Search contains on multiple fields?

I would like to search only on emp_name and supervisor,so I have used the following query

SELECT * FROM fulltext_helper WHERE contains(indexme,'jack and  
jill(/HELPER/EMP_NAME/SUPERVISOR)') > 0;

However it didn't fetch any results.

How I can use certain columns from a table or materialized view to search with and without boolean operators.

Was it helpful?

Solution

Giving the path "/HELPER/EMP_NAME/SUPERVISOR" tells him to search on leaf like "...", which doesn't exists; furthermore you shoud specify the INPATH operator.

The right syntax is:

CONTAINS(indexme,'jack INPATH(/HELPER/EMP_NAME) and jill INPATH(/HELPER/SUPERVISOR)') > 0;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top