Re: [greenstone-users] History and fielded search

From Rene Schrama
DateThu, 04 Dec 2003 16:55:19 +0100
Subject Re: [greenstone-users] History and fielded search
Hi Katherine,

I couldn't think of a generic solution either so I made something that
fits my personal preferences. It works for me but I can't guarantee that
it will work for anyone else.

Summary of changes:

1. Simple form search: check for existence of ZZ (allfields), clear the
form, select ZZ in topmost field selection box, put history item in
topmost search box.
2. All search types: replace history item instead of appending it.

Rene


function inputQuery(value) {
var i;
if ("0" == "0") { // text search
document.QueryForm.q.value = value;
}
else {
if ("_cgiargqf_" == "1") { // advanced query
document.QueryForm.q.value = value;
updateq();
}
else { // simple form search
for (i=0; i<document.QueryForm.fqf[0].options.length; i++) {
if (document.QueryForm.fqf[0].options[i].value == "ZZ") {
clearfqf();
clearfqv();
document.QueryForm.fqf[0].options[i].selected = true;
document.QueryForm.fqv[0].value = value;
updatefqf();
updatefqv();
}
}
}
}
}


>>> Katherine Don <kjdon@cs.waikato.ac.nz> 20-11-2003 20:52:09 >>>
Hi Rene

You are right, the history stuff does not work with simple fielded
search. In the other search cases, when you click on a history item,
the
search terms are _added_ to the current query, they don't replace it
with
the old query. With this model of using history terms, it was unclear
what should happen for simple form search, so we never implemented
anything.
Adding search history terms to the current query is done using
javascript
- if you can write javascript you can implement something yourself.
There's a
_historypagescriptextra_
macro in the query.dm file, with an empty space for simple form
searching.

Alternatively, if you have a clear idea about what should happen, you
can
let us know and we can have a go at adding it in.

regards,
Katherine Don

Rene Schrama wrote:

> Can you try something for me please?
>
> - enable history (preferences)
> - enter text in at least 2 search fields
> - click Begin Search button
> - click Clear Form button
> - click the tiny square on the left of the corresponding history
item
>
> What happens now?
>
> BTW, I have "searchtype form plain" in collect.cfg.
>
> TIA
>
> Rene
>
> >>> "Thiagarajan, Rajendran (Cognizant)"
<TRajendr@chn.cognizant.com>
> 19-11-2003 10:34:38 >>>
> yes i'm using search form in simple mode, along with 4 fields...but
> here history part working fine.
>
> Regards,
> Rajendran T
> Cognizant Technology Solutions India Pvt. Ltd.
> Email: trajendr@chn.cognizant.com
> Phone: +91-44-28585690
> Ext: 5110
>
> -----Original Message-----
> From: Rene Schrama [mailto:Rene.Schrama@niwi.knaw.nl]
> Sent: Wednesday, November 19, 2003 2:56 PM
> To: Thiagarajan, Rajendran (Cognizant)
> Cc: greenstone-users@list.scms.waikato.ac.nz
> Subject: RE: [greenstone-users] History and fielded search
>
> Are you using Form Search? I am using Form Search with Form Type =
> Simple and 4 fields. It does work with Form Type = Advanced, in that
> case the history item is copied to the text box at the bottom.
Nothing
> happens when using Form Type = Simple. Maybe this is not currently
> possible because the query would have to be split up over several
> boxes
> (that's my theory anyway).
>
> Rene
>
> >>> "Thiagarajan, Rajendran (Cognizant)"
<TRajendr@chn.cognizant.com>
> 19-11-2003 09:36:59 >>>
>
> but rene its finely works with my xp system.
>
> Regards,
> Rajendran T
> Cognizant Technology Solutions India Pvt. Ltd.
> Email: trajendr@chn.cognizant.com
> Phone: +91-44-28585690
> Ext: 5110
>
> -----Original Message-----
> From: Rene Schrama [mailto:Rene.Schrama@niwi.knaw.nl]
> Sent: Wednesday, November 19, 2003 1:55 PM
> To: greenstone-users@list.scms.waikato.ac.nz
> Subject: [greenstone-users] History and fielded search
>
> Hi,
>
> I noticed that history items cannot be reused with fielded search
> (nothing happens when I click on the icon). Is this a known problem
> and
> will it be fixed in a future versioni?
> (XP, 2.40)
>
> Rene
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users
>
> _______________________________________________
> greenstone-users mailing list
> greenstone-users@list.scms.waikato.ac.nz
> https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users