| From | Michael Dewsnip |
| Date | Tue, 07 Jun 2005 13:03:07 +1200 |
| Subject | Re: [greenstone-devel] Context Search? |
| In-Reply-To | (e1c4358d05060610285584eacd-mail-gmail-com) |
| Hi Bradley,
One thing you might have missed is escaping the query URL. "&" and ":"
&q=Wants&[Sufficiency]:SU you would need &q=Wants%26[Sufficiency]%3ASU Let me know if this doesn't solve your problem and I'll look into it
Regards, Michael
Bradley Wangia wrote: >I've followed the suggested steps outlined for context search to no avail
oopsThe requested page could not be found. Please use your browsers 'back' button or the above home button to return to the Greenstone Digital Library.>>macro, add eg >>_myqueryform_ >>then _myqueryform_ contains the content of the query form. >>document.dm is used for displaying documents and classifiers, so you >>need to test the d arg to make sure you are not in a document. >> >>You can decide what your query form looks like - look at the source of >>the plain query page (in a mgpp collection) for what it might look like. >>But the one thing you need is to add in the subject specification to the >>query. You will need to use javascript for this. >> >>you want the value of the node that is opened in the subject field. >>eg if you are open at a node titled "farming practice", you need >>[farming practice]:SU added to the query >>where SU is the short code for the dc.Subject index - you can check what >>the short code is by looking in index/build.cfg file in your collection. >> >>If you want the search to be on text, then the final query might look like >><keywords entered by user> & [farming practice]:SU >>or if you want the search to be on a different field, add the field >>specifier to the keywords: >>[<keywords entered by user>]:TI & [farming practice]:SU >>(this field must also be specified in the index specification) >>I think you also need b=1 as a hidden arg. >>and there might be others >> >>So, the last problem is how to get the value of the node thats open. I >>can't think of anyway to get this without editing the c++ source code. >>If you know javascript well, you may be able to get it by looking at the >>contents of the page and somehow working out which table row is the >>opened node. >>Otherwise, probably the easiest thing to do is to have the c++ code >>create a new macro, eg _currentnodevalue_, then you can use this in your >>search form: [_currentnodevalue_]:SU >> >>edit the file src/recpt/documentaction.cpp. In define_internal_macros >> >>add just after the following (about line 850) >> } else { >> if (!arg_cl.empty()) { >> >> if (get_info (arg_cl, collection, args["l"], metadata, false, >>collectproto, response, logout)) { >> text_t &title = response.docInfo[0].metadata["Title"].values[0]; >> disp.setmacro ("currentnodevalue", "document", title); >> } >> >>Then you'll need to recompile. see gsdl/Install.txt for details. >> >>So anyway, have a go, and let us know how you get on. >> >>Regards, >>Katherine Don >> >> >>Bradley Wangia wrote: >> >> >>>One of the user requirements for a digital library that I am building >>>is that the user should be able to browse the hierarchy and then once >>>they have narrowed down their list of possibilities, they can search >>>the documents in this part of the hierarchy for documents that contain >>>their keywords. >>> >>>I've been looking around at the collections that are out there and I >>>am yet to find anything other than global search. Is this >>>functionality available in greenstone? >>> >>>My intuition is that this may be possible but Im beginning to spend >>>too much time searching for how to do it. Any ideas/comments would be >>>greatly appreciated. >>> >>>bradley wangia >>>global development and environment institute >>>Tufts University >>> >>>_______________________________________________ >>>greenstone-devel mailing list >>>greenstone-devel@list.scms.waikato.ac.nz >>>https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel >>> >>> >>> > >_______________________________________________ >greenstone-devel mailing list >greenstone-devel@list.scms.waikato.ac.nz >https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-devel > > > | |