[MarkLogic Dev General] Limiting cts-search to fields

Engard, Nicole nicole.engard at ptsem.edu
Tue Oct 2 09:42:16 PDT 2007


I'm looking to limit what fields our search looks at when pulling
results.

 

We have this function:

 

define function quick-search ($params as node()) as node()* {

let $query := mlps:get-cts-query(fn:data($params/terms))
let $raw-results := cts:search(//METS:dmdSec,$query)
let $results := build-results($params, $raw-results, $query)
return
  (
  if ($results/result) then
    (v:display-results($params, $results))
  else
    v:display-no-results($params)
  )

} 

 

And here is a snippet of the XML

 

<METS:dmdSec ID="dmd002">
        <METS:mdWrap MIMETYPE="text/xml" MDTYPE="DC" LABEL="Dublin Core
Metadata">
            <METS:xmlData>
                <dc:title>Front Cover</dc:title>
                <dc:creator/>
                <dc:date>1984</dc:date>
                <dc:type>Article</dc:type>
                <dc:language>English</dc:language>
                <dc:source>Bibliographie Karl Barth Band 1:
Ver&#xF6;ffentlichungen von Karl Barth (1984)</dc:source>
                <dc:coverage>fa-fb</dc:coverage>
                <dc:description/>
                <dc:subject/>
            </METS:xmlData>
        </METS:mdWrap>
    </METS:dmdSec> 

 

What I want is to have the search search everything but the source
field.  I'm up for any suggestions!

 

Thanks,

Nicole C. Engard

Metadata Librarian

Princeton Theological Seminary Libraries

Email: nicole.engard at ptsem.edu

Phone: 609.430.2773

Web: http://libweb.ptsem.edu 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20071002/10faa986/attachment.html


More information about the General mailing list