How to create a database field on a Marklogic server?

I have the following xml structure

 <patent-assignors>
        <patent-assignor>
          <name>VOLPENHEIN, ROBERT A.</name>
          <execution-date>
        <date>19841204</date>
          </execution-date>
        </patent-assignor>
 </patent-assignors>


    <patent-assignees>
        <patent-assignee>
          <name>PROCTER &amp; GAMBLE COMPANY, THE</name>
          <address-2>A CORP. OF  OHIO</address-2>
          <city>CINCINNATI</city>
          <state>OHIO</state>
        </patent-assignee>
   </patent-assignees>

I want to create a database field in Marklogic Server for patent-assignorand patent-assignee  so that I can use cts:field-word-query. But I want to find the name of the patent holder and the assignee (both contain the same element " name"). Can someone tell me how I can match the field for the patent assignor of the name of the patent holder and patent holder with the name of the patent holder so that I can use cts:field-word-querythe names of the patent holder and the assignee. I want an exact match.

+3
source share
2 answers

Field. 'name', . , word-query value-query element-query .

+2

, , , , . , MarkLogic, , , " ".

, "name" , ( value-query a word-query)

cts:element-value-query(xs:QName("name"), "VOLPENHEIN, ROBERT A.")

, , , "name" , "name" , element-queries ( , , element-word-positions element-value-positions true)

cts:or-query((

    cts:element-query( xs:QName("patent-assignor"), 
                       cts:element-value-query(
                           xs:QName("name"), 
                           "VOLPENHEIN, ROBERT A.")),

    cts:element-query( xs:QName("patent-assignee"), 
                       cts:element-value-query(
                           xs:QName("name"), 
                           "VOLPENHEIN, ROBERT A."))
))

, "" "", . , , , " ", .

+1

All Articles