[greenstone-users] Images appear in browse but not search

From ak19@cs.waikato.ac.nz
DateThu Mar 13 13:53:06 2008
Subject [greenstone-users] Images appear in browse but not search
In-Reply-To (bec39c5b0803120944i12daa20fi6782b5e5a1fff60-mail-gmail-com)
Hello Andy,

I've tried out a collection with a couple of images (and then later added
a few text files as well). I did encounter the same problem and even an
additional one: my filenames classifier was doing the same odd thing. You
are right that the format statement for the search results in search.xml
is not sufficient. I was able to adjust them from GLI to do what I wanted.

There are a couple of things I needed to do, perhaps it may help you as well:
(1) Open up GLI
(2) If you've not created the collection with your images yet, create one
and add all the images you want to it.
(3) Just check in your Design tab whether you already have the ImagePlug
in the list of Document Plugins. If not:
In GLI's Design tab, add the ImagePlug from the drop-down list at the bottom.
This step may be unnecessary for you, but it was required in my case as
the Greenstone 3 I have here was compiled from the latest source code and
didn't do it by default.
(4) The bit that applies to you:
- Go to the Format tab of GLI.
- Then in the left-hand pane, select Format Features.
- In the right-hand pane, go to the Choose Feature drop-down box. Here you
will see your Browse classifiers under drop-down items starting with "CL1"
and "CL2". In my case, I had to adjust CL1 but your browsing was working
fine, so we'll skip that. (Alternatively, you can copy the text of CL2
into that of CL1, if you want.)
- Choose "Search" in the "Choose Feature" drop-down box.
Select all the XML in the text-area part below and replace it.

I pasted the following there and it worked for me. Consider trying this
out with your collection as well:

<gsf:template match="documentNode">
<td valign="top">
<gsf:link type="document">
<gsf:icon type="document"/>
</gsf:link>
</td>
<td valign="top">
<gsf:metadata name="srclink"/>
<gsf:choose-metadata>
<gsf:metadata name="thumbicon"/>
<gsf:metadata name="srcicon"/>
</gsf:choose-metadata>
<gsf:metadata name="/srclink"/>
</td>
<td>
<gsf:switch>
<gsf:metadata name="Title" select="ancestors" separator=": "/>
<gsf:when test="exists">
<gsf:metadata name="Title" select="ancestors" separator=": "/> :
</gsf:when>
</gsf:switch>
<gsf:link type="document">
<gsf:metadata name="Title"/>
</gsf:link>
</td>
</gsf:template>
(5) Build the collection and view it in your browser.

Searching on image documents now return a preview of the thumbnail for me.
Try it out and tell me how it goes.

As you can see, the only bit different in the XML for the search from what
was there before I pasted it (and the only difference between the above
and your search.xml) is this portion:
<td valign="top">
<gsf:metadata name="srclink"/>
<gsf:choose-metadata>
<gsf:metadata name="thumbicon"/>
<gsf:metadata name="srcicon"/>
</gsf:choose-metadata>
<gsf:metadata name="/srclink"/>
</td>

The above extract might look familiar to you when compared with what is
already contained in the browse.xml you sent in your email. I got it from
the XML for my CL2 classifier in the Format tab of GLI.


Finally, I also included some text documents to my collection as a check.
After building it, I found that searching on the text documents did not
break anything (that's good). While searching on image documents still
returned a preview of the thumbnail which can be clicked to view the
image.

Regards,
Anupama


> Hello,
>
> I am testing Greenstone 3.03 on my Windows XP desktop (a localsite). I'm
> building a new test collection of 10 scanned images (using the GLI), just
> to
> figure out the functionality.
>
> I can use browsing classifiers to return results that display the
> thumbnails. But when I simply search - via dc.title, creator, or subject -
> I
> return blank documents.
> I know there is some problem with the search results not linking, but I
> can't figure it out.
>
>
> here is my search xml:
>
> <gsf:template match="documentNode">
> <td valign="top">
> <gsf:link type="document">
> <gsf:icon type="document"/>
> </gsf:link>
> </td>
> <td>
> <gsf:switch>
> <gsf:metadata name="Title" select="ancestors" separator=": "/>
> <gsf:when test="exists">
> <gsf:metadata name="Title" select="ancestors" separator=": "/>:
> </gsf:when>
> </gsf:switch>
> <gsf:link type="document">
> <gsf:metadata name="Title"/>
> </gsf:link>
> </td>
> </gsf:template>
>
>
>
>
>
> Here is my browse xml:
>
> <gsf:template match="documentNode">
> <td valign="top">
> <gsf:link type="document">
> <gsf:icon type="document"/>
> </gsf:link>
> </td>
> <td valign="top">
> <gsf:metadata name="srclink"/>
> <gsf:choose-metadata>
> <gsf:metadata name="thumbicon"/>
> <gsf:metadata name="srcicon"/>
> </gsf:choose-metadata>
> <gsf:metadata name="/srclink"/>
> </td>
> <td valign="top">
> <gsf:choose-metadata>
> <gsf:metadata name="dc.Title"/>
> <gsf:metadata name="exp.Title"/>
> <gsf:metadata name="Title"/>
> <gsf:default> Untitled
> </gsf:default>
> </gsf:choose-metadata>
> <gsf:switch>
> <gsf:metadata name="Source"/>
> <gsf:when test="exists">
> <br/>
> <i>(
> <gsf:metadata name="Source"/>)
> </i>
> </gsf:when>
> </gsf:switch>
> </td>
> </gsf:template>
> <gsf:template match="classifierNode">
> <td valign="top">
> <gsf:link type="classifier">
> <gsf:icon type="classifier"/>
> </gsf:link>
> </td>
> <td valign="top">
> <gsf:metadata name="srclink"/>
> <gsf:choose-metadata>
> <gsf:metadata name="thumbicon"/>
> <gsf:metadata name="srcicon"/>
> </gsf:choose-metadata>
> <gsf:metadata name="/srclink"/>
> </td>
> <td valign="top">
> <gsf:choose-metadata>
> <gsf:metadata name="dc.Title"/>
> <gsf:metadata name="exp.Title"/>
> <gsf:metadata name="Title"/>
> <gsf:default> Untitled
> </gsf:default>
> </gsf:choose-metadata>
> <gsf:switch>
> <gsf:metadata name="Source"/>
> <gsf:when test="exists">
> <br/>
> <i>(
> <gsf:metadata name="Source"/>)
> </i>
> </gsf:when>
> </gsf:switch>
> </td>
> </gsf:template>
> <gsf:template match="classifierNode" mode="horizontal">
> <gsf:link type="horizontal">
> <gsf:metadata name="Title"/>
> </gsf:link>
> </gsf:template>
>
>
> Thanks for any help.
>
> Andy Carter
> Digital Projects Manager
> Memphis Public Library
> _______________________________________________
> greenstone-users mailing list
> greenstone-users&#64;list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>