1 From mike Wed Nov 30 17:50:48 2005
3 Envelope-to: mike@indexdata.com
4 Delivery-date: Wed, 30 Nov 2005 17:49:30 +0100
5 Date: Wed, 30 Nov 2005 17:49:11 +0100
6 From: Adam Dickmeiss <adam@indexdata.dk>
7 X-Accept-Language: en-us, da, en
8 To: Zebra Information Server <zebralist@indexdata.dk>
9 Subject: Re: [Zebralist] indexing data from yaz client
10 In-Reply-To: <20051117161003.M83503@reverseorder.net>
11 Content-Type: text/plain; charset=us-ascii; format=flowed
12 Reply-To: Zebra Information Server <zebralist@indexdata.dk>
13 Sender: zebralist-bounces@indexdata.dk
14 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on bagel.indexdata.dk
15 X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00
16 autolearn=unavailable version=3.0.4
20 > Is there a way to initiate a re-index of the database through the yaz link?
21 > furthermore, is there a way to index content that is not a physical file, but
22 > rather something sent to zebra via the yaz client/link.
24 > I've tried a few things, but I'm not sure how to do this.
26 The extended services are not enabled by default in zebra - due to the
27 fact that they modify the system.
29 In order to allow anybody to update, use
33 Or, even better, allow only updates for a particular admin user. For
34 user 'admin', you could use:
38 And in passwordfile, specify users and passwords ..
41 We can now start a yaz-client admin session and create a database:
43 $ yaz-client localhost:9999 -u admin/secret
44 Authentication set to Open (admin/secret)
47 Connection accepted by v3 target.
49 Name : Zebra Information Server/GFS/YAZ
50 Version: Zebra 1.4.0/1.63/2.1.9
51 Options: search present delSet triggerResourceCtrl scan sort
52 extendedServices namedResultSets
56 Got extended services response
60 Now Default was created.. We can now insert an XML file (esdd0006.grs
61 from example/gils/records) and index it:
63 Z> update insert 1 esdd0006.grs
64 Got extended services response
68 The 3rd parameter.. 1 here .. is the opaque record id from Ext update.
69 It a record ID that _we_ assign to the record in question. If we do not
70 assign one the usual rules for match apply (recordId: from zebra.cfg).
72 Actually, we should have a way to specify "no opaque record id" for
73 yaz-client's update command.. We'll fix that.
78 Received SearchResponse.
80 Number of hits: 1, setno 1
81 SearchResult-1: term=utah cnt=1
85 Let's delete the beast:
88 No last record (update ignored)
89 Z> update delete 1 esdd0006.grs
90 Got extended services response
95 Received SearchResponse.
97 Number of hits: 0, setno 2
98 SearchResult-1: term=utah cnt=0
102 If shadow register is enabled you must run the adm-commit command in
103 order write your changes..
108 > Any help would be appreciated.
116 > _______________________________________________
117 > Zebralist mailing list
118 > Zebralist@indexdata.dk
119 > http://www.indexdata.dk/mailman/listinfo/zebralist
124 _______________________________________________
125 Zebralist mailing list
126 Zebralist@indexdata.dk
127 http://www.indexdata.dk/mailman/listinfo/zebralist
129 From mike Tue Nov 29 11:38:15 2005
131 Envelope-to: mike@miketaylor.org.uk
132 Delivery-date: Tue, 29 Nov 2005 11:36:14 +0100
133 Date: Tue, 29 Nov 2005 11:36:14 +0100
134 From: Adam Dickmeiss <adam@indexdata.dk>
135 X-Accept-Language: en-us, da, en
136 To: Mike Taylor <mike@miketaylor.org.uk>
137 Subject: Re: zoomtest9.c
138 In-Reply-To: <200511241610.jAOGAuSh015366@localhost.localnet>
139 Content-Type: text/plain; charset=us-ascii; format=flowed
140 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on bagel.indexdata.dk
141 X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham
146 > Hi, Adam, thanks for making this very helpful example code. A few
147 > followup quesations.
149 > 1. What's the difference between "replace" and "update"?
151 For replace, and error is returned if the record does not already exist.
152 For (special)update it will be inserted or updated/replaced..
154 > 2. What format should the records be in? If I have a choice (e.g. XML
155 > or MARC) how do I specify which I am using?
157 Currently it's XML only. We could have a way to inject other formats..
158 Ideally what Zebra would like is a filter name reather than a record
159 syntax.. In actual fact updating _is_ a weird thing.. if you inject a
160 record that's already being mangled by presentation... For example,
161 consider a case where a ISO2709/MARC is inserted by zebraidx update...
162 Later a client retireves the same record but now it's in DublinCore..
163 What happens if it gets updated? I guess it's just a DDTH.
165 > 3. Are there options that should be checked after calling send()
167 > 4. Do we have a running server that I can test this against? Or does
168 > any Zebra installation support it, so I can run my own?
169 You should be able to run it against any Zebra server but you need to
170 allow-updated in the config. (It would be too much of a security risk if
171 anybody could update). Add something like this:
173 # Flags for the non-authenticated user. w=write (allows ES Updates)
176 > 5. What steps are taken to authenticate the request?
178 > ... this is complicated stuff, isn't it? :-)
179 And undocumented stuff.
183 > _/|_ ___________________________________________________________________
184 > /o ) \/ Mike Taylor <mike@miketaylor.org.uk> http://www.miketaylor.org.uk
185 > )_v__/\ "I have no idea what a `strong' or a `weak' verb is, and I truly
186 > hope I never find out what a `turbo verb' is, but I usually have
187 > a pretty good idea what the *right* verb is" -- Jane MacDonald.