[greenstone-users] Please help with fielded search

From Anupama of Greenstone Team
DateThu Feb 5 14:28:42 2009
Subject [greenstone-users] Please help with fielded search
In-Reply-To (BLU120-W206E23609D61617A3044CEA0C30-phx-gbl)
Hi Leo,
> One of the requirements is to perform search with multiple criteria -
> what is called fielded search in Greenstone.
>
> I know that users can access this functionality through the
> preferences page, but I would like to make it the default search
> method, rather than the simple search that currently appears.
>
> Does anyone know if this is possible?
To set the form to appear by default, start up the Greenstone Librarian
Interface application (GLI).

1. In GLI, open the collection for which you want the search form to appear
2. Click on the Format tab
3. On the left-hand side of the Format Pane, select "Format Features"
4. On the right-hand side, you will now see the features for which you
can adjust the format settings. Select "Search Types".
5. In the box beneath, replace "plain, form" with "form, plain".
6. Press the Preview button on the bottom *LEFT* of the Format pane.
(Note that you do not need to rebuild the collection for Format changes
to take effect.)
7. In the collection page that opens in the browser, click the Search
button at the top left. The search form should appear by default.

A better explanation of the above can be found in steps 8 and 9 of the
Greenstone Tutorial page at:
http://wiki.greenstone.org/wiki/gsdoc/tutorial/en/bibliography_collection.htm


> If so, can I change the display features of the fielded search? I
> would like to have something like the Books of the Past page:

I have not tried doing this. However, I have just been having a look at
the macro file that is used for the search forms, which may perhaps help
you get started. The file is "query.dm" and is located in your
Greenstone installation's "macros" folder.

- Can you open up this file?
- And will you also go to the browser and choose to View the Page Source
(html) of the fielded search form page.

In the browser's display of the html source of the Greenstone-generated
search page, you can find the line that says:
<!-- field query form (

Warning: Javascript is disabled in your web browser.
To use form searching, please enable it.

Search for of
Words  ... in field
) -->
<form name="QueryForm" method="get" action="/gs2svn/cgi-bin/library">

<table><tr><td align="left">
...

The above lines and the section that follows seem to be based on what's
specified in the query.dm macro file. In that file, find the section
that starts with the lines:
_fieldqueryform_
<noscript>
<p><b>_textnojsformwarning_</b></p>
</noscript>
<!-- field query form (_query:fieldqueryform_) -->
<form name="QueryForm" method="get" action="/gsdlmod">

<table><tr><td align="left">
...

See how these two sections match? Therefore, I think changing the
arrangement of the html in the query.dm file will change the appearance
of the search form, you will need to know a little html for this. (Not
everything in the macro file is html, because the rest is written in
Greenstone's macro language.)

HOWEVER, and this is important, it is best not to tweak the query.dm (or
other Greenstone macro file) until you have first made a backup copy of
it. That way, if anything breaks terribly, you can go back to the original.

Just in case you are familiar with css files, there is a style.css file
located in your Greenstone 2 installation folder's "images" directory.
Once again, make sure to save a backup copy first of style.css before
changing things in it.

There are online tutorials on html and css at
http://w3schools.com/html/default.asp
and http://w3schools.com/css/default.asp

Hope this helps,
Anupama


Leo Konstantelos wrote:
> Hi everyone,
>
> I've been building a collection for a while now which is based on
> user-specified requirements. One of the requirements is to perform
> search with multiple criteria - what is called fielded search in Greenstone.
>
> I know that users can access this functionality through the preferences
> page, but I would like to make it the default search method, rather than
> the simple search that currently appears.
>
> Does anyone know if this is possible? If so, can I change the display
> features of the fielded search? I would like to have something like the
> Books of the Past page:
>
> http://www.booksfromthepast.org/sitemanager/advsearch.asp?l=en&v=0&b=0&t=1&qb=0&k=1&s=0&hd=0&m=50&o=20
>
> Thanks in advance for your time
>
> Leo
>
> ------------------------------------------------------------------------
> Get news, entertainment and everything you care about at Live.com. Check
> it out! <http://www.live.com/getstarted.aspx >
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users