[Zebralist] SRU out of the box?

Larry E. Dixson ldix at loc.gov
Thu Jun 4 21:37:31 CEST 2009


Daine,
You will need to create a server configuration file
following GFS instructions -- see the following:

    http://www.indexdata.dk/yaz/doc/server.vhosts.tkl

That file will reference your configuration files
and contain some retrieval information.
(see below -- I named my PQF file "cql2rpn.cfg"):

Then you will need to reference that yazgfs file
when you start your server.  For example, my 
yazgfs file is named "serverconfig.xml" and I
reference with "-f serverconfig.xml" when starting
the server:

    zebrasrv -f serverconfig.xml @:9999

You can start with a very minimal file and then
add to it.
Larry

-------------------------------------------------
$ more serverconfig.xml

<yazgfs>
   <server>
      <config>zebra.cfg</config>
      <cql2rpn>cql2rpn.cfg</cql2rpn>
      <explain xmlns="http://explain.z3950.org/dtd/2.0/">
         <serverInfo>
            <host>xxxx.loc.gov</host>
            <port>9999</port>
            <database>DBName</database>
         </serverInfo>
         <databaseInfo>
            <title lang="en" primary="true">Descriptive name of
database</title>
            <description lang="en" primary="true">Information about the
database.>
            </description>
         </databaseInfo>
         <indexInfo>
            <set
identifier="info:srw/cql-context-set/1/cql-v1.1" name="cql"/>
            <set
identifier="info:srw/cql-context-set/1/dc-v1.1" name="dc"/>
            <set
identifier="info:http://zing.z3950.org/cql/bath/2.0/" name="bath"/>
            <index id="1016">
               <title>anywhere</title>
               <map><name set="cql">anywhere</name></map>
               <map><name set="cql">serverChoice</name></map>
               <map><name set="bath">any</name></map>
            </index>
            <index id="4">
               <title>title</title>
               <map><name set="dc">title</name></map>
            </index>
            <index id="21">
               <title>subject</title>
               <map><name set="dc">subject</name></map>
            </index>

              [ . . . etc. etc. . . .]

         </indexInfo>
         <schemaInfo>
            <schema
identifier="info:srw/schema/1/dc-v1.1" sort="false" name="dc">
            <title>Dublin Core</title>
            </schema>
            <schema
identifier="info:srw/schema/1/mods-v3.3" sort="false" name="mods">
            <title>MODS</title>
            </schema>
         </schemaInfo>
      </explain>
   <retrievalinfo xmlns="http://indexdata.com/yaz" version="1.0">
      <retrieval syntax="marc21">
        <backend syntax="xml" name="F">
          <marc inputformat="xml" outputformat="marc" inputcharset="utf-8"
              outputcharset="utf-8"/>
        </backend>
      </retrieval>
      <retrieval syntax="xml" name="marcxml"/>
      <retrieval syntax="xml" name="mods"/>
      <retrieval syntax="xml" name="dc"/>
      <retrieval syntax="xml" name="zebra::data"/>
      <retrieval syntax="xml" name="zebra::snippet"/>
      <retrieval syntax="xml" name="zebra::facet"/>
      <retrieval syntax="xml" name="zebra::meta"/>
      <retrieval syntax="xml" name="zebra::meta::sysno"/>
    </retrievalinfo>
  </server>
</yazgfs>



On Thu, 4 Jun 2009, [iso-8859-1] Sébastien Nadeau wrote:

> Hi,
> 
> I forgot about using SRU long ago. You need to use a config file
> to map from CQL to PQF and that's not something trivial to do. It's
> easy when you have basic needs and can use the files from the tutorial,
> but here I need a high degree of indexes customization. So now I only
> query Zebra using PQF queries and Yaz.
> 
> Sébastien
> 
> 
> > -----Message d'origine-----
> > De : zebralist-bounces at lists.indexdata.dk 
> > [mailto:zebralist-bounces at lists.indexdata.dk] De la part de 
> > Daine Mamacos
> > Envoyé : 4 juin 2009 12:06
> > À : zebralist at lists.indexdata.dk
> > Objet : [Zebralist] SRU out of the box?
> > 
> > I've been reading the zebra documentation, and it says it can 
> > do SRU queries of the box using the x-pquery=mineral GET 
> > parameter. However, the server just tells me it can't find 
> > Default. 404 This is the request line:
> > http://127.0.0.1:9999/Default?version=1.1&operation=searchRetr
> > ieve&x-pquery=mineral&startRecord=1&maximumRecords=1
> > 
> > Any ideas? I can clearly see that there is a web interface on 
> > that port, but nothing seems to return anything other than a 
> > 404 error.
> > 
> > Thanks
> > Daine.
> 
> _______________________________________________
> Zebralist mailing list
> Zebralist at lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist
> 




More information about the Zebralist mailing list