originally: http://www.oclc.org/research/software/gwen/demodoc.htm
Gwen attempts to provide a boolean query evaluation package that sits above a database layer and beneath a z39.50 server layer. It provides no database or server functionality itself. Gwen does hope to provide enough of an API that a server need only use the gwen interface to a database.
testgwen.java is a demonstration of an application using a gwen database. An example pears database (sample.pdb) is provided as part of the demonstration.
The sample database consists of 4 files:
All of these can be obtained by downloading the sample database tar file http://whereIsIt.
testgwen automatically starts up with the sample.props file. If you want to play with another database then start it as follows:
java ORG.oclc.os.gwen.testgwen -p<properties file>
testgwen has the following commands:
HELP
help
Generates this list
BROWSE
b[rowse] [numberOfTerms] [positionOfSeed] <browseTerm>
numberOfTerms defaults to 10
positionOfSeed defaults to numberOfTerms/2
browseTerm must be specified in prefix query format
example: b @attrset bib-1 @attr 1=1016 cat
SEARCH
s[earch] <query>
query must be specified in prefix query format
example: s @attrset bib-1 @attr 1=1016 cellulose
RANKED SEARCH
r[anksearch] <rankId> <query>
rankId must be meaningful to the gwen db implementation
query must be specified in prefix query format
example: r NNN @attrset bib-1 @attr 1=1016 cellulose
DISPLAY DOCUMENT
d[ocument] [startpoint][-endpoint]
startpoint defaults to 1
endpoint defaults to 1
example: d 1
QUIT
q[uit]
Looking at the source in testgwen is a good example of searching and browsing a gwen database. testgwen does not use the update functionality provided by gwen