EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07349
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Searching for null/unset values
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Searching for null/unset values
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Wed, 4 Jul 2018 13:49:26 +0000
Hi All, Can anyone validate this for me? On this page:
https://wiki.eprints.org/w/API:EPrints/Search#add_field (generated from perldoc in EPrints::Search), the following statement is made for the value: "value - value to match against (for EX matches, NULL = is_null!)" This has always seemed very cryptic/unhelpful to me - but I've never needed to get a null search working - until now. Experimentation has led to the following which seems to work (example: searching buffer for items with no date): my $ds = $session->dataset( "buffer" ); my $searchexp = $ds->prepare_search(); $searchexp->add_field( fields => [ $ds->field( 'date' ), ], value => undef, match => "EX", ); -the 'value => undef,' being the critical piece. Before I add this to the Wiki, can anyone else confirm this is correct? Cheers, John |
- Follow-Ups:
- [EP-tech] Searching for null/unset values
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Searching for null/unset values
- References:
- [EP-tech] Searching for null/unset values
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Searching for null/unset values
- Prev by Date: [EP-tech] Import by DOI in ORCID plugin
- Next by Date: [EP-tech] Revision History Summary View
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):