From 1cc042c168862a25393ee8cbc1ddebbd5f83a292 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 11 Apr 2009 20:00:52 +0200 Subject: [PATCH] Fixes for tutorial (dc_-removed) and other. Tutorial updated with fixes as noted by Eric Begin and without dc_ in index names (due to oai2index.xsl being updated earlier). --- doc/tutorial.xml | 76 +++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/doc/tutorial.xml b/doc/tutorial.xml index edcd5fd..bc58142 100644 --- a/doc/tutorial.xml +++ b/doc/tutorial.xml @@ -211,24 +211,24 @@ swith suffix :w): 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 anr:w index, + By default, searches do access the any:w 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 + 1=title the&startRecord=1&maximumRecords=1&recordSchema=dc"> 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 @@ -236,45 +236,45 @@ 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 the in - dc_title and for fish in - dc_description using the query - @and @attr 1=dc_title the @attr 1=dc_description fish. + title and for fish in + description using the query + @and @attr 1=title the @attr 1=description fish. 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 - + Investigating the content of the indexes 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 zebra::index::fieldname. In this example you - can see that the dc_title index has both word + can see that the title index has both word (type :w) and phrase (type :p) indexed fields, - - 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::title But where in the indexes did the term match for the query occur? Easily answered with the special &zebra; schema - zebra::snippet. The matching terma are + zebra::snippet. The matching terms are encapsulated by <s> tags. http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet @@ -286,9 +286,9 @@ found inside my hit set? Try the special &zebra; schema zebra::facet::fieldname:type. In this case, we investigate additional search terms for the - dc_title:w index. - - http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::dc_title:w + title:w index. + + http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::title:w @@ -296,8 +296,8 @@ One can ask for multiple facets. Here, we want them from phrase indexes of type :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 + + http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=the&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::publisher:p,title:p @@ -326,7 +326,7 @@ - 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 @@ -458,7 +458,7 @@ 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 @@ -478,10 +478,10 @@ 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> show 1+1 - 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 @@ -498,8 +498,8 @@ 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 @@ -555,8 +555,8 @@ Notice that searching and scan on indexes - dc_contributor, dc_language, - dc_rights, and dc_source + contributor, language, + rights, and source 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. -- 1.7.10.4