Re: [greenstone-users] about search and scipts.

From PaingThu Chit
DateMon, 16 Apr 2007 09:03:55 +0800
Subject Re: [greenstone-users] about search and scipts.
In-Reply-To (461F4DA4-F2EE-000A-0-ukzn-ac-za)
Hello,.. is there anyone who can guide me how to do ???
  I want to show the detail info of selected item from the list of search result in new window. I have no idea how to put all those
metadata onto new page.  Pls help needs. I dun have docs to show. my collection has only images with associated metadata information. So when I click on the link 'datail', I have to pass the detail metadata information on the new window.
With best regards,

On 4/13/07, Karunananda Chetty <> wrote:
create a dummy record. within an exisitng folder (obtained via import). The metadata may not have any file associations (but a nul one is created)  and when the actual file becomes available, replace it with real file. This way you can create a virtual library without any documents which can be linked at some future time.
K. Chetty

>>> "PaingThu Chit" <> 4/13/2007 6:59 AM >>>
Hello,.. I still cannot put my metadata info on blank page .. Could u pls help me more ???
Here is my format I want to put on new page

<table style=\"font-size:12\">
<td width=335 align=left valign=top><b>[link][POI.Title][/link]</b> ([POI.Category]) </td>

<td valign=top align=center width=150>[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]</td>
<td align=left valign=top>
<table border=0 width=435 cellpadding=2 cellspacing=0>
<td width=20 align=left valign=top><b>Location:</b></td>
<td width=335 align=left valign=top>[POI.Zone^Address]<br>[POI.Zone^PostalCode]</td>
<td width=20 align=left valign=top><b>OpeningHours:</b></td>
<td width=335 align=left valign=top>[POI.OpeningHours]</td>

<td width=20 align=left valign=top><b>Tel:</b></td>
<td width=335 align=left valign=top>[sibling(All:\';\'):POI.Tel]</td>}
<td width=20 align=left valign=top><b>Web Address:</b></td>
<td width=335 align=left valign=top>[POI.WebAddress]</td>
<td width=20 align=left valign=top><b>Cuisine:</b></td>
<td width=335 align=left valign=top>[sibling(All:\';\'):POI.Cuisine]</td>}
<tr><td colspan=3><hr align=center size=1 noshade></td>

Thanks in advance

With best regards,
On 4/4/07, Richard Managh <> wrote:
Hi PaingThu Chit,

For your first question look under Collection-specific formatting options on this page

There is a DocumentText formatstring, that you can modify to display your desired metadata when a person clicks on a link.

You might add metadata to it like [title] or [location] in some html structure, with whichever metadata names you have. (this is assuming you actually have [title] and [location] metadata, of course the names of your metadata items might be different.

If you meant that you want the links to open a new window, or tab in a users browser, you would need to modify the relevant format statement for the vertical list that i! s being displayed.

In this case, the vertical list in question might be Vlist (the default format statement for all vertical lists in a collection) or CL1VList (the more specific Vlist for first classifier defined in your collections collect.cfg file) or SearchVList. You would alter this either in the GLI or directly in your collect.cfg file.

You could add an <a> tag to the format statement, something like <a href="[href]" target="_blank">[title]</a> to ask the browser to open a new window when the user clicks on the links.  Notice that this link makes use of various formatstring items on the wiki page mentioned above. Note also you can display any item of metadata for the current document being displayed in a vertical list format statement by adding [metadata_name]. Obviously you replace the text "metadata_name" with the name of the metadata item you want to display.
(See http://www.w for more options for the html a tag's target attribute.)

To answer your search form question I did the following search using google.

site: "search form" normal advanced

It revealed the following text:

Using fielded searching

  1. Collections built with MGPP (the default indexer) provide the option of fielded searching. In the browser, go to the PREFERENCES page. You will notice that there is a Query style: option which enables you to switch between "normal" and "fielded" search. Change to fielded search now and click on the Search button. The search form has changed to a fielded form.
  1. You can specify which search form types are available for a particular collection, and which one is the default, using the SearchTypes format statement. In the Format panel select Format Features from the left-hand list. Select the SearchTypes format statement from the list of assigned formats, and set the contents to form. This will make only fielded searching available for this collection.

    Search type options include form and plain. You can specify one or both separated by a comma. If both are specified, the first one is used as the default: this is the one that the user will see when they first enter the collection.

Preview the collection again. Notice that the collection's home page no longer includes a query box. (This is because the search form is too big to fit here nicely.) To search, you have to click Search in the navigation bar. Note that the PREFERENCES page has changed so that the "normal" query style is no longer offered.

on this page.

This may not be exactly what you needed, but hopefully it helps.


DL Consulting
Greenstone Digital Library and Digitisation Specialists

PaingThu Chit wrote:
Hello Richard,
thanks alot for ur help.
I think I have to explain some more. I m doing the collection on tourism information.
when we do searching, we got a list of items that match input criteria. And then when we click on
the link, it will show the doc related to that link. For me, my collection have only images with metadata
set which stored all the necessary information. So when user click on the link, I want to open new page
and show the formated metadata. I think its like shopping cart search result and detail page. I dun have docs to display so I want to open new page and display the metadata information.
I have one more question. Some collections have 2 search forms. normal and  advance. would u pls
guide me how to do that?
with best regards,
On 3/29/07, Richard Managh <> wrote:
Hi PaingThu Chit,

You can use fielded searching for this. Add something like the following to your collect.cfg file:

buildtype       mgpp
If you already have the "buildtype mg" line, you need to change it to "buildtype mgpp" or "buildtype lucene" to support fielded searching

indexes         allfields text title description location
For mgpp, you need to specify the fields you want to search on.

levels          section document
You need to specify the granularity of the created indexes.

searchtype      form plain
This tells greenstone to display the fielded searching form by default on the search page.

That should cover questions 1 and 2. As for question 3, I'm not sure what you mean.

Hope this helps,

DL Consulting
Greenstone Digital Library and Digitisation Specialists

PaingThu Chit wrote:
hello all,
  I have some questions to asks.. These are:
1. I want to do the searching by  2 criteria .. like results must be like this and and must not be like that.
2. how am i support to change the condition type like OR, AND or NOT OR in my search page.
3. in my search page I show some general info such as title, description,location. and when I click on the title
   I want to open new pages with the detail metadata of the title.
Note: I dun have any documents like html, words or pdf. I only have images with metadata. so I want to populate the metadata on greenstone interface without using documents. I tried and still no idea how to do those. So pls guide me how to do those things.
Thanks in advance.
with best regards
greenstone-users mailing list

greenstone-users mailing list

Please find our Email Disclaimer here-->: