Oracle XML full text query using CONTAINS, <progression> and INPATH

751 Views Asked by At

I am struggling to find a way to combine a full-text query progression using <query> syntax and an INPATH expression.

Given the next code, Oracle ignores the INPATH expression.

SELECT DISTINCT publication.id, SCORE (1)
   FROM TBL_PUBLICATION publication
   WHERE 
         ( ( (CONTAINS (
                     xmlcontent,
                     '(<query>
                         <textquery grammar="CONTEXT" >my text
                           <progression>    
                             <seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>    
                             <seq><rewrite>transform((TOKENS, "{", "}", " NEAR "))</rewrite></seq>    
                             <seq><rewrite>transform((TOKENS, "$(?{", "})", " AND "))</rewrite></seq>
                           </progression>
                         </textquery>
                      </query>) INPATH(//foo/bar)',
                     1) > 0))              
ORDER BY SCORE (1) DESC 
0

There are 0 best solutions below