X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=doc%2Fexamples.xml;h=4805c29069a95457b585d1649fe18073e975a485;hb=aa36decbdd330b8858eac641056bf607a8eea8a1;hp=f2af44421d6e1a8f9c3908e45df5e493b3153b61;hpb=518c06f68ffac6658aa792da45282a165b32ca95;p=idzebra-moved-to-github.git diff --git a/doc/examples.xml b/doc/examples.xml index f2af444..4805c29 100644 --- a/doc/examples.xml +++ b/doc/examples.xml @@ -1,5 +1,5 @@ - + Example Configurations @@ -10,7 +10,7 @@ driven by a master configuration file, which may refer to other subsidiary configuration files. By default, they try to use zebra.cfg in the working directory as the - master file; but this can be changed using the -t + master file; but this can be changed using the -c option to specify an alternative master configuration file. @@ -76,7 +76,7 @@ minimal file that just tells zebraidx where to find the default indexing rules, and how to parse the records: - profilePath: .:../../tab:../../../yaz/tab + profilePath: .:../../tab recordType: grs.sgml @@ -106,7 +106,7 @@ $ yaz-client tcp:@:9999 Connecting...Ok. - Z> find @attr 1=/GENUS/MEANING @and lizard earthquakes + Z> find @attr 1=/GENUS/SPECIES/AUTHOR/@name Wedel Number of hits: 1 Z> format xml Z> show 1 @@ -139,63 +139,105 @@ + - Example 2: Supporting Z39.50 Searches + Example 2: Supporting Interoperable Searches - You may have noticed as zebraidx was building - the database that it issued a warning, which we ignored at the - time: - - $ zebraidx update records - 00:45:46-08/10: ../../index/zebraidx(5016) [warn] records/genera.xml:0 Couldn't open GENUS.abs [No such file or directory] - - + The problem with the previous example is that you need to know the + structure of the documents in order to find them. For example, + when we wanted to know the genera for which Matt Wedel is an + author + (Sauroposeidon proteles), + we had to formulate a complex XPath + 1=/GENUS/SPECIES/AUTHOR/@name + which embodies the knowledge that author names are specified in the + name attribute of the + <AUTHOR> element, + which is inside the + <SPECIES> element, + which in turn is inside the top-level + <GENUS> element. - - - - + + + +