使用CONTAINS,<progression>和INPATH </progression>的Oracle XML全文查询

时间:2012-05-25 13:41:51

标签: oracle oracle-text oracle-xml-db-repository

我正在努力找到一种方法,使用<query>语法和INPATH表达式组合全文查询进程。

鉴于下一个代码,Oracle忽略了INPATH表达式。

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 个答案:

没有答案