Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query Template Documentation

tarfu_dbaJun 19 2017 — edited Jul 4 2017

We had a requirement to get a count of how many times a particular token appeared in a document, and I found a post by Barbara Boehmer that led us to this solution:

select id, score(1) as token_count from docs where CONTAINS (text,

'<query>

   <textquery lang="ENGLISH" grammar="CONTEXT">blah</textquery>

  <score datatype="INTEGER" algorithm="COUNT"/>

</query>',1)>0;

This works really well for us.  Is there any more documention on Query Templates than what's in the Text Application Developer's Guide? 

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 1 2017
Added on Jun 19 2017
4 comments
543 views