SRU%20and%20Lucene - PowerPoint PPT Presentation

View by Category
About This Presentation
Title:

SRU%20and%20Lucene

Description:

DC.transformer=LuceneToDC.xsl. configInfo. Generated Automatically. maximumRecords (20) ... searchStyleSheet= /SRW/searchRetrieveResponse.xsl. Making the Magic Happen ... – PowerPoint PPT presentation

Number of Views:291
Avg rating:3.0/5.0
Slides: 22
Provided by: Ralph102
Learn more at: http://staff.oclc.org
Category:
Tags: 20lucene | 20and | sru | xsl

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: SRU%20and%20Lucene


1
SRU and Lucene
  • Ralph LeVan
  • Research Scientist
  • levan_at_oclc.org

2
SRU Overview
  • A Simple Web Service
  • Supports REST-ful and SOAP requests
  • Responses are always XML records
  • Supports Search and Retrieve
  • Uses a Standard Query Grammar
  • Supports Self-Configuring Clients
  • A Gateway to Local Databases

3
SRU Features
  • Explain Records
  • CQL Query Grammar
  • Persistent Result Sets
  • XML Database Records Returned
  • Index Browses
  • Stylesheets

4
Explain Records
  • serverInfo
  • databaseInfo
  • metaInfo
  • indexInfo
  • schemaInfo
  • configInfo

5
serverInfo
  • Generated Automatically
  • host
  • port
  • database

6
databaseInfo
  • From SRWDatabase.props
  • databaseInfo.title
  • databaseInfo.description
  • databaseInfo.contact
  • Provided Automatically
  • implementation

7
metaInfo
  • From SRWDatabase.props
  • metaInfo.dateModified
  • metaInfo.aggregatedFrom
  • metaInfo.dateAggregated

8
indexInfo
  • Generated Automatically
  • local index set and Lucene index names
  • From SRWDatabase.props
  • qualifier.ltindexSetgt.ltindexNamegt
    ltLuceneIndexNamegt
  • Used only if you want to map other index names to
    your Lucene indexes (e.g. qualifier.dc.identifier
    id)

9
schemaInfo
  • Generated Automatically
  • LuceneDocument
  • From SRWDatabase.props
  • xmlSchemasltlist of namegt
  • ltschemaNamegt.identifier
  • ltschemaNamegt.location
  • ltschemaNamegt.namespace
  • ltschemaNamegt.title
  • ltschemaNamegt.transformer
  • ltschemaNamegt.resolver

10
schemaInfo Example
  • xmlSchemasLuceneDocument, DC
  • LuceneDocument.identifierinfosrw/schema/1/Lucene
    Document
  • LuceneDocument.locationhttp//www.oclc.org/standa
    rds/Lucene/schema/LuceneDocument.xsd
  • LuceneDocument.namespacehttp//www.oclc.org/Lucen
    eDocument
  • LuceneDocument.titleLucene Demo Database records
    in their internal format

11
schemaInfo Example (cont.)
  • DC.identifierinfosrw/schema/1/dc-v1.1
  • DC.locationhttp//www.loc.gov/zing/srw/dc-schema.
    xsd
  • DC.titleDC Dublin Core Elements
  • DC.transformerLuceneToDC.xsl

12
configInfo
  • Generated Automatically
  • maximumRecords (20)
  • numberOfRecords (10)
  • resultSetTTL (300)
  • From SRWDatabase.props
  • configInfo.maximumRecords
  • configInfo.numberOfRecords
  • configInfo.resultSetTTL

13
CQL Query Grammar
  • Builtin BasicLuceneQueryTranslator
  • CqlQueryTranslator
  • Query makeQuery(CQLNode cn)
  • Term getTerm()
  • From SRWDatabase.props
  • SRWLuceneDatabase. CqlToLuceneQueryTranslator
    ltClassNamegt

14
Persistent Result Sets
  • Builtin LuceneQueryResult

15
XML Database Records
  • Builtin BasicLuceneRecordResolver
  • RecordResolver
  • Void init(Properties props)
  • Record resolve(Document doc, String IdFieldName,
    ExtraDataType extraDataType)
  • From SRWDatabase.props
  • ltschemaNamegt.resolverltClassNamegt
  • SRWLuceneDatabase.idFieldName ltFieldNamegt

16
Index Browses
  • Builtin SRWLuceneDatabase.getTerms()

17
Stylesheets
  • From SRWDatabase.props
  • explainStyleSheet /SRW/explainResponse.xsl
  • scanStyleSheet/SRW/scanResponse.xsl
  • searchStyleSheet /SRW/searchRetrieveResponse.xsl

18
Making the Magic Happen
  • Drop the SRWLucene.war into your lttomcatgt/webapps
    directory
  • Restart Tomcat
  • Edit lttomcatgt/webapps/SRWLucene/WEB-INF/classes/SR
    WServer.props
  • Restart Tomcat

19
Sample SRWServer.props
  • db.LuceneDemoDB.class ORG.oclc.os.SRW.Lucene.SRWL
    uceneDatabase
  • db.LuceneDemoDB.home f/lucene-2.0.0
  • db.LuceneDemoDB.configuration SRWDatabase.props

20
Sample SRWDatabase.props
  • databaseInfo.titleLucene Demo Database
  • databaseInfo.descriptionAn index of the source
    code for Lucene
  • databaseInfo.contactRalph LeVan (levan_at_oclc.org)
  • qualifier.cql.serverChoicecontents
  • explainStyleSheet/SRWLucene/explainResponse.xsl
  • scanStyleSheet/SRWLucene/scanResponse.xsl
  • searchStyleSheet /SRWLucene/searchRetrieveRespons
    e.xsl

21
Resources
  • http//www.oclc.org/research/software/srw
  • http//staff.oclc.org/levan/SRWLuceneSource.jar
  • http//staff.oclc.org/levan/SRWLucene.war
  • http//staff.oclc.org/levan/Implementing20an20S
    RWLuceneDatabase.doc
  • http//staff.oclc.org/levan/SRU20and20Lucene.pp
    t
  • http//alcme.oclc.org/srw/SRUServerTester.html
About PowerShow.com