Tutorial updated with fixes as noted by Eric Begin and without dc_ in
index names (due to oai2index.xsl being updated earlier).
swith suffix <literal>:w</literal>):
<screen>
any:w
swith suffix <literal>:w</literal>):
<screen>
any:w
- dc_title:w
- dc_creator:w
- dc_subject:w
- dc_description:w
- dc_contributor:w
- dc_publisher:w
- dc_language:w
- dc_rights:w
+ title:w
+ author:w
+ subject:w
+ description:w
+ contributor:w
+ publisher:w
+ language:w
+ rights:w
- By default, searches do access the <literal>anr:w</literal> index,
+ By default, searches do access the <literal>any:w</literal> index,
but we can direct searches to any access point by constructing the
correct &acro.pqf; query. For example, to search in titles only,
we use
<ulink
url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr
but we can direct searches to any access point by constructing the
correct &acro.pqf; query. For example, to search in titles only,
we use
<ulink
url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr
- 1=dc_title the&startRecord=1&maximumRecords=1&recordSchema=dc">
+ 1=title the&startRecord=1&maximumRecords=1&recordSchema=dc">
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@attr
- 1=dc_title the&startRecord=1&maximumRecords=1&recordSchema=dc
+ 1=title the&startRecord=1&maximumRecords=1&recordSchema=dc
Similar we can direct searches to the other indexes defined. Or we
can create boolean combinations of searches on different
indexes. In this case we search for <literal>the</literal> in
Similar we can direct searches to the other indexes defined. Or we
can create boolean combinations of searches on different
indexes. In this case we search for <literal>the</literal> in
- <literal>dc_title</literal> and for <literal>fish</literal> in
- <literal>dc_description</literal> using the query
- <literal>@and @attr 1=dc_title the @attr 1=dc_description fish</literal>.
+ <literal>title</literal> and for <literal>fish</literal> in
+ <literal>description</literal> using the query
+ <literal>@and @attr 1=title the @attr 1=description fish</literal>.
<ulink
url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and
<ulink
url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and
- @attr 1=dc_title the
- @attr 1=dc_description
+ @attr 1=title the
+ @attr 1=description
fish&startRecord=1&maximumRecords=1&recordSchema=dc">
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and
fish&startRecord=1&maximumRecords=1&recordSchema=dc">
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=@and
- @attr 1=dc_title the
- @attr 1=dc_description fish&startRecord=1&maximumRecords=1&recordSchema=dc
+ @attr 1=title the
+ @attr 1=description fish&startRecord=1&maximumRecords=1&recordSchema=dc
</ulink>
</para>
</sect1>
</ulink>
</para>
</sect1>
- <sect1 id="tutorial-oai-sru-zebra-indexess">
+ <sect1 id="tutorial-oai-sru-zebra-indexes">
<title>Investigating the content of the indexes</title>
<para>
How doess the magic work? What is inside the indexes? Why is a certain
<title>Investigating the content of the indexes</title>
<para>
How doess the magic work? What is inside the indexes? Why is a certain
- record foound by a search, and another not?. The answer is in the
- inverterd indexes. You can easily investigate them using the
+ record found by a search, and another not?. The answer is in the
+ inverted indexes. You can easily investigate them using the
special &zebra; schema
<literal>zebra::index::fieldname</literal>. In this example you
special &zebra; schema
<literal>zebra::index::fieldname</literal>. In this example you
- can see that the <literal>dc_title</literal> index has both word
+ can see that the <literal>title</literal> index has both word
(type <literal>:w</literal>) and phrase (type
<literal>:p</literal>)
indexed fields,
(type <literal>:w</literal>) and phrase (type
<literal>:p</literal>)
indexed fields,
- <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::dc_title">
- http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::dc_title
+ <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::title">
+ http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::index::title
</ulink>
</para>
<para>
But where in the indexes did the term match for the query occur?
Easily answered with the special &zebra; schema
</ulink>
</para>
<para>
But where in the indexes did the term match for the query occur?
Easily answered with the special &zebra; schema
- <literal>zebra::snippet</literal>. The matching terma are
+ <literal>zebra::snippet</literal>. The matching terms are
encapsulated by <literal><s></literal> tags.
<ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet">
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
encapsulated by <literal><s></literal> tags.
<ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet">
http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
found inside my hit set? Try the special &zebra; schema
<literal>zebra::facet::fieldname:type</literal>. In this case, we
investigate additional search terms for the
found inside my hit set? Try the special &zebra; schema
<literal>zebra::facet::fieldname:type</literal>. In this case, we
investigate additional search terms for the
- <literal>dc_title:w</literal> index.
- <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_title:w">
- http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_title:w
+ <literal>title:w</literal> index.
+ <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::title:w">
+ http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::title:w
One can ask for multiple facets. Here, we want them from phrase
indexes of type
<literal>:p</literal>.
One can ask for multiple facets. Here, we want them from phrase
indexes of type
<literal>:p</literal>.
- <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_publisher:p,dc_title:p">
- http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_publisher:p,dc_title:p
+ <ulink url="http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::publisher:p,title:p">
+ http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::publisher:p,title:p
- The we are all set to start the &acro.sru;/acro.z3950; server including
+ We are all set to start the &acro.sru;/acro.z3950; server including
&acro.pqf; and &acro.cql; query configuration. It uses the &yaz; frontend
server configuration - just type
<screen>
&acro.pqf; and &acro.cql; query configuration. It uses the &yaz; frontend
server configuration - just type
<screen>
Z> elements zebra::facet::any:w
Z> show 1+1
Z> elements zebra::facet::any:w
Z> show 1+1
- Z> elements zebra::facet::dc_publisher:p,dc_title:p
+ Z> elements zebra::facet::publisher:p,title:p
Z> show 1+1
</screen>
</para>
Z> show 1+1
</screen>
</para>
Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
Z> show 1+1
Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
Z> show 1+1
- Z> find @attr 1=dc_title communication
+ Z> find @attr 1=title communication
- Z> find @attr 1=dc_identifier @attr 4=3
+ Z> find @attr 1=identifier @attr 4=3
http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
Z> show 1+1
</screen>
http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
Z> show 1+1
</screen>
Z> scan @attr 1=oai_datestamp @attr 4=3 1
Z> scan @attr 1=oai_setspec @attr 4=3 2000
Z>
Z> scan @attr 1=oai_datestamp @attr 4=3 1
Z> scan @attr 1=oai_setspec @attr 4=3 2000
Z>
- Z> scan @attr 1=dc_title communication
- Z> scan @attr 1=dc_identifier @attr 4=3 a
+ Z> scan @attr 1=title communication
+ Z> scan @attr 1=identifier @attr 4=3 a
<para>
Notice that searching and scan on indexes
<para>
Notice that searching and scan on indexes
- <literal>dc_contributor</literal>, <literal>dc_language</literal>,
- <literal>dc_rights</literal>, and <literal>dc_source</literal>
+ <literal>contributor</literal>, <literal>language</literal>,
+ <literal>rights</literal>, and <literal>source</literal>
might fail, simply because none of the records in the small example set
have these fields set, and consequently, these indexes might not
been created.
might fail, simply because none of the records in the small example set
have these fields set, and consequently, these indexes might not
been created.