I'm applying a filter in a SEM_MATCH query using the orardf:textContains operator this way:
SELECT s, p, o
FROM TABLE(SEM_MATCH( '
SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o
FILTER (orardf:textContains(?o, "fuzzy(search_string_1, 70, 1)"))
}',
SEM_Models('model'),
NULL,
NULL,
NULL));
Now I would like to filter by more than one string and order results by number of keyword matched. Something like this:
SELECT s, p, o, scr
FROM TABLE(SEM_MATCH( '
SELECT ?s ?p ?o (score(1) as ?scr)
WHERE
{ ?s ?p ?o
FILTER (orardf:textContains(?o, "fuzzy(search_string_1, 70, 1) ACCUM fuzzy(search_string_2, 70, 1)", 1))
}
ORDER BY ?scr',
SEM_Models('model'),
NULL,
NULL,
NULL));
I was hoping to use the optional third argument of orardf:textContains as a label to be referenced in the SCORE operator (such as in the CONTAINS operator of Oracle Text) but I couldn't figure out how to use it since the score function is not defined in that context.
Is there a way to achieve this?
Thank you
Fred