1 Example DOM XML filter configuration using XSLT stylesheets
3 Get some more data to play with:
6 (stop the script when you get tired waiting ..)
9 Checking manually the retrieval stylesheets:
10 cat data/debug-record.xml
11 xsltproc conf/oai2dc.xsl data/debug-record.xml
12 xsltproc conf/oai2zebra.xsl data/debug-record.xml
14 Checking manually the indexing stylesheet:
15 xsltproc conf/oai2index.xsl data/debug-record.xml
19 zebraidx -c conf/zebra.cfg init
20 zebraidx -c conf/zebra.cfg update data
21 zebraidx -c conf/zebra.cfg commit
23 (in case you have not installed zebra yet, use the following command:
24 ../../index/zebraidx -c conf/zebra.cfg this and that .. )
26 Starting the SRU/SRW/Z39.50 server in PQF mode only:
27 zebrasrv -c conf/zebra.cfg
29 Or, alternatively, starting the SRU/SRW/Z39.50 server including
30 PQF and CQL query configuration:
31 zebrasrv -f conf/yazserver.xml
34 yaz-client localhost:9999
41 Z39.50 presents using presentation stylesheets:
48 Z39.50 buildin Zebra presents (in this configuration only if
49 started without yaz-frontendserver):
51 Z> elements zebra::meta
54 Z> elements zebra::meta::sysno
61 Z> elements zebra::index
64 Z> elements zebra::snippet
67 Z> elements zebra::facet::any:w
70 Z> elements zebra::facet::any:w,title:w
73 Z39.50 searches targeted at specific indexes
75 Z> find @attr 1=title communication
78 Z> find @attr 1=author alain
82 Z> find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
85 Z> find @attr 1=oai_datestamp @attr 4=3 2001-04-20
88 Z> find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
91 Z> find @attr 1=identifier @attr 4=3
92 http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
97 Notice that all indexes defined by 'type="0"' in the
98 indexing style sheet must be searched using the '@attr 4=3'
99 structure attribute instruction.
101 Notice also that searching and scan on indexes
102 'contributor', 'language', 'rights', and 'source'
103 fails, simply because none of the records in this example set
104 have these fields set, and consequently, these indexes are
107 Z39.50 searches using Bib-1
109 - only if bib1.att is referred to from zebra.cfg
111 Z> find @attr 1=4 communication
114 Z> find @attr 1=1003 alain
117 Z> find @attr 1=21 all
120 Z> find @attr 1=1018 data
125 yaz-client localhost:9999
128 Z> scan @attr 1=oai_identifier @attr 4=3 oai
129 Z> scan @attr 1=oai_datestamp @attr 4=3 1
130 Z> scan @attr 1=oai_setspec @attr 4=3 2000
132 Z> scan @attr 1=title communication
133 Z> scan @attr 1=identifier @attr 4=3 a
138 Z39.50 search using server-side CQL conversion:
146 Z> find creator = the
147 Z> find dc.creator = the
150 Z> find description < the
151 Z> find title le some
152 Z> find title ge some
155 Z> find identifier eq
156 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
157 Z> find relation eq something
160 etc, etc. Notice that all indexes defined by 'type="0"' in the
161 indexing style sheet must be searched using the 'eq'
169 Z39.50 scan using server side CQL conversion:
171 Unfortunately, this will _never_ work as it is not supported by the
173 If you want to use scan using server side CQL conversion, you need to
174 make an SRW connection using yaz-client, or a
175 SRU connection using REST Web Services - any browser will do.
178 SRU Explain ZeeRex response:
180 http://localhost:9999/
181 http://localhost:9999/?version=1.1&operation=explain
184 SRU Search Retrieve records:
186 http://localhost:9999/?version=1.1&operation=searchRetrieve
189 http://localhost:9999/?version=1.1&operation=searchRetrieve
190 &query=date=1978-01-01
191 &startRecord=1&maximumRecords=1&recordSchema=dc
193 http://localhost:9999/?version=1.1&operation=searchRetrieve
196 http://localhost:9999/?version=1.1&operation=searchRetrieve
197 &query=description=the
202 http://localhost:9999/?version=1.1&operation=searchRetrieve
208 http://localhost:9999/?version=1.1&operation=scan&scanClause=title=a
209 http://localhost:9999/?version=1.1&operation=scan
210 &scanClause=identifier%20eq%20a
212 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
216 SRW explain with CQL index points:
218 Z> open http://localhost:9999
221 Notice: when opening a connection using the 'http.//' prefix, yaz-client
222 uses SRW SOAP connections, and 'form xml' and 'querytype cql' are
226 SRW search using implicit server side CQL:
228 Z> open http://localhost:9999
229 Z> find identifier eq
230 "http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
231 Z> find description < the
234 In SRW connection mode, the follwing fails due to problem in yaz-client:
239 SRW scan using implicit server side CQL:
241 yaz-client http://localhost:9999
242 Z> scan title = communication
243 Z> scan identifier eq a
245 Notice: you need to use the 'eq' relation for all @attr 4=3 indexes
250 SRW search using X-PQF query
252 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=dc
254 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::data
256 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::meta
258 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::index::description
260 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::snippet
262 http://localhost:9999/?version=1.1&operation=searchRetrieve&x-pquery=fish&startRecord=1&maximumRecords=1&recordSchema=zebra::facet::description:w