EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #02531
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Search, for partial matches
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Search, for partial matches
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- Date: Tue, 21 Jan 2014 15:44:41 +0000
Perhaps your email field is of type "email" or "id" in which case an exact match is performed?
Try setting the "match" parameter to "IN" in your search (match is the 3rd argument of ->add_field)
Also how stuff is searched/indexed is defined in the metafield classes (e.g. look at MetaField/Email::get_index_codes) - look what's in your foo__rindex table to see what has been indexed.
Seb. On 21/01/14 15:21, Ian Stuart wrote:
I want to perform a search... however I want to search for a) all records where *part* of the field matches, and b) I do not want that search to be case-sensitive my $email = 'Ian'; my $ds = $session->get_repository->get_dataset('foo'); my $searchexp = EPrints::Search->new( session => $session, dataset => $ds, ); $searchexp->add_field( $ds->get_field('email'), $email ); warn $searchexp->render_description->toString; my $results = $searchexp->perform_search; warn "found " . $results->count . " records\n"; returns 0 matches, even though there is at least one user (me) with an email address of "ian.stuart@ed...." in the dataset foo Any suggestions? (as the dataset isn't part of the normal EPrints system, indexing worries me [and I don't know who to set it up either, but that's another story])
- References:
- [EP-tech] Search, for partial matches
- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- [EP-tech] Search, for partial matches
- Prev by Date: [EP-tech] Search, for partial matches
- Next by Date: [EP-tech] Re: Search, for partial matches
- Previous by thread: [EP-tech] Search, for partial matches
- Next by thread: [EP-tech] Re: Search, for partial matches
- Index(es):