See the Mailing Lists Page for how to subscribe and unsubscribe.
eprints_tech messages
Please note: this page shows emails that have been sent to the eprints_tech mailing list. Some of these may be spam emails we have failed to filter.
[EP-tech] Re: filter search words submitted fromt the search form
From: "Roman Chyla" <roman.chyla AT gmail.com>
Date: Fri, 16 May 2008 11:18:37 +0200
| Threading: | ↑ [EP-tech] filter search words submitted fromt the search form from roman.chyla AT gmail.com • This Message |
*** ↵ http://www.eprints.org/tech.php/id/%3Cea0115e90805160218r3a07ce8fh2c095d20f920e669%40mail.gmail.com%3E *** EPrints community wiki - http://wiki.eprints.org/ I hope my question don't bother anyone, I thought it is obvious that if EPrints does replace some values before they are indexed, there must be some routine that replaces in the same way input from users. Indeed, for a simple form, it is called from indexing.pl (unless I am mistaken), but this does not work for Advanced form (I remember somebody asking in the past why the search works from a simple form and not from the advanced form). It looks to me there are more inconsistencies, for instance, extract_words does not work for Creators (it is not called). And problems with unicode, I will post about that later. So, the solution to my particular problem (to fix values submitted from the user forms, both advanced and simple) was this: inside /cgi/search (after the session initilisation and you need use Encode('decode'); in your script if you want to decently handle unicode characters with Perl) my %makelc = ("q" => 1, "_fulltext_" => 1, ↵ "department" =>1, "keywords" => 1, "creators_name"=>1, ↵ "editors_name" => 1, "publication" => 1, "title" => 1, ↵ "abstract" => 1); foreach ($session->get_query->param) { if ($makelc{$_}) { my AT ret = (); foreach my $value ($session->get_query->param($_)) { push AT ret, lc decode('UTF-8', $value, 0); } $session->get_query->param($_, AT ret); } } unfortunately, I don't know how to return the original values back before the form is sent back r. On Thu, May 15, 2008 at 6:56 PM, Roman Chyla <roman.chyla AT gmail.com> ↵ wrote: > Hello, > > is there a way to filter query terms - ie. to allow for expansion or > take care of Voelker? > I can't find where this could be in the EPrints code. > Many thanks, > > roman >
[index] [prev] [next] [options] [help]





