A few questions about searching specific fields...

1) In lib-parser.xqy I see the following variable definition:

define variable $SEARCH-FIELD-MAP as element(lp:search-field-map) {
  <lp:search-field-map>
    <lp:mapping code="title" qname="title"/>
    <lp:mapping code="heading" qname="h1 h2 h3 h4 h5"/>
    <lp:mapping code="weighted" field="weighted"/>
  </lp:search-field-map>
}

However, in some lib-search-custom.xqy examples (and stated in the lib-search documentation), I've also seen the same structure in the /config/search element of the $CONFIG variable. I've also seen comments on this mailing list saying the field search mappings can be specified in a search-criteria element. Where is the search-field-map element "supposed" to go? Why is there one sitting in lib-parser.xqy rather than lib-parser-custom.xqy? Should the mappings in lib-parser.xqy be removed, since we're not using them?

2) Can someone formally define the attributes code, qname, and field in the mapping elements? Or point me to where I can find these definitions in the docs (I've looked and can't find a (complete) answer)?

3) I have an html search form with a <select> drop-down containing fields a user might wish to search in, for example Journal Title, or Author. Should this selection will appear in the query string as field=author:Eric?

4) Does it make "lib-search sense" to have multiple field key/value pairs in the query string, eg. field=author:Eric&field=title:xquery, and will they be treated as an AND or an OR?

That's all for now, any answers will be appreciated.

Much thanks,

Eric
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to