source: trunk/gsdl3/RUNNING@ 3548

Last change on this file since 3548 was 3393, checked in by kjdon, 22 years ago

added phind applet

  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1Note: when running the localhost:8080/gsdl3/library, only the mgppdemo
2collection can do anything useful.
3
4*******************************************************
5There are 3 main parts to the system: sites, interfaces, library executables.
6
7Sites contain collections. Interfaces contain images and xslts.
8
9There are 3 sites in this prototype example.
10
11sites/localsite is a standalone site, like used by a local library. It has
12no connections to any other sites.
13
14sites/site1 is a site that specifies a SOAP connection to another site: site2
15
16sites/site2 can be run as a local site also.
17
18to run site1, and talk to site2 via SOAP, you need to have apache tomcat installed,running, and serving site2. (see INSTALL)
19
20You can add other sites by putting a directory in the sites directory, and
21configuring it appropriately. TODO MakeSite program
22
23
24There is one interface - default. you can add other interfaces if you like, in
25the interfaces directory.
26
27The interface and site to use for a particular servlet is determined by the
28init-params in the web.xml file
29
30XSL Files: when an xslt file is to be used, eg home.xsl, it is looked for in
31several places: in current site/transform, current interface/transform, and
32 finally default/transform
33
34so you can change the interface by adding new xslt files to these three places.
35 Note, if a stylesheet includes another one, eg they all include style.xsl,
36the included one needs to be in the same directory - ie you need to either
37create a new one, or copy the default one to the new location.
38
39******************************************************
40Servlet:
41
42need to run setup.bash to set CLASSPATH etc
43
44Can run the web interface by starting tomcat (see INSTALL) and going to
45localhost:8080/gsdl3/library
46
47only mgpp collections can be searched - use mgppdemo, not demo.
48Currently, only Text search works.
49
50to change the interface language, you can add &l=fr to the url. fr is the
51only alternative to en at the moment.
52
53*******************************************************
54Command line libraries
55
56need to run setup.bash to set CLASSPATH etc
57
58there is a sample executable class: Library1
59
60it can be run by "java org.greenstone.gsdl3.Library1 <sitehome>"
61
62sitehome is the base dir for the site you are running:
63 for the local library example site, its .../gsdl3/sites/localsite
64 for the distributed soap example site, its .../gsdl3/sites/site1
65
66Library1 - just takes straight XML queries and returns the results. It talks
67directly to the message router
68
69basically messages are like:
70
71<message><request type="describe|query" to="demo/TextQuery" info=""/></message>
72with type="describe", to="", can use serviceList, collectionList and siteList
73for the info field.
74
75this program is not very useful - except for debugging - when using the servlet
76or Library2, can print out the messages - then cut and paste these for teh
77input to Library1
78
79sample messages: (to cut and paste)
80
81describe request to message router:
82<message><request type="describe" to=""/></message>
83
84describe request to collection:
85<message><request type="describe" to="mgppdemo"/></message>
86
87query:
88<message><request type="query" to="mgppdemo/TextQuery"><paramList/><content>the</content></request></message>
89
90get Titles for a list of docs:
91<message><request type="query" to="mgppdemo/MetadataRetrieve"><paramList/><content><resourceList><resource name="HASH30aa188f4d8ddaef558fc9" /><resource name="HASH0102361bccb095d60673448c.3" /><resource name="HASH4632a8a51d33c47a75c559.4.1.5" /></resourceList><metadataList><element name="Title"/></metadataList></content></request></message>
92
93get a document:
94<message><request type="query" to="mgppdemo/ResourceRetrieve"><paramList/><content><resourceList><resource name="HASH30aa188f4d8ddaef558fc9" /></resourceList></content></request></message>
95
96
97Library2:
98
99java org.greenstone.gsdl3.Library2 <sites home> <site name> <interfaces home> <interface name>
100
101takes xml request of 'cgi' params, and returns html (input must be all on one line)
102
103<message lang="en">
104<request type="action" info="q/text">
105<paramList>
106<param name="q" value="the"/>
107</paramList>
108</request>
109</message>
110
111the info field is action/subaction, eg a=p&sa=home, or a=q&sa=text
112
113Some sample queries: (to cut and paste)
114
115home page:
116<message lang="en"><request type="action" info="p/home"/></message>
117
118about page for mgppdemo:
119<message lang="en"><request type="action" info="p/about"><paramList><param name="c" value="mgppdemo"/></paramList></request></message>
120
121search for frog in mgppdemo: (no docs returned)
122<message lang="en"><request type="action" info="q/text"><paramList><param name="c" value="mgppdemo"/><param name="q" value="frog"/><param name="md" value="10"/></paramList></request></message>
123
124search for frog in mgppdemo, with stemming on: (some docs returned)
125<message lang="en"><request type="action" info="q/text"><paramList><param name="c" value="mgppdemo"/><param name="q" value="frog"/><param name="md" value="10"/><param name="s" value="1"/></paramList></request></message>
126
127
128Collections:
129
130Can use the new java Queryer to test mgpp collections:
131
132java org.greenstone.mgpp.Queryer <basedir> <indexdir> <textdir>
133
134eg
135java org.greenstone.mgpp.Queryer sites/localsite/collect/mgppdemo/index tt/mgppdemo text/mgppdemo
136
137you can use any mgpp collection built with gsdl2 - you need to add a
138buildcfg.xml file to the index directory - look at the one for mgppdemo to see
139what it should look like.
140
141
142
143
144
145
146
Note: See TracBrowser for help on using the repository browser.