Oracle Text Reference Release 9.0.1 Part Number A90121-01 |
|
CONTAINS Query Operators, 9 of 28
Use this operator to find all XML documents that contain a specified section path. You can also use this operator to do section equality testing.
Your index must be created with the PATH_SECTION_GROUP for this operator to work.
The query
HASPATH(A/B/C)
finds and returns a score of 100 for the document
<A><B><C>dog</C></B></A>
without the query having to reference dog at all.
The query
dog INPATH A
finds
<A>dog</A>
but it also finds
<A>dog park</A>
To limit the query to the term dog and nothing else, you can use a section equality test with the HASPATH operator. For example,
HASPATH(A="dog")
finds and returns a score of 100 only for the first document, and not the second.
Because of how XML section data is recorded, false matches might occur with XML sections that are completely empty as follows:
<A><B><C></C></B><D><E></E></D></A>
A query of HASPATH(A/B/E) or HASPATH(A/D/C) falsely matches this document. This type of false matching can be avoided by inserting text between empty tags.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|