EPrints Technical Mailing List Archive

Message: #03653


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: OR-linked search filters?


Am 08.12.2014 um 14:52 schrieb sf2:
Hi,

I think "match" takes one of EX EQ IN or SET. And merge one of ALL or ANY

Try IN?

Thank you Seb. Wondering why it worked that way for this long. :-)

Unfortunately, filters work non-hierarchically. Whatever "match" or "merge" may be set to, it relates to one field or couple of fields as listed in @$meta_fields independently from other filters. What I need is rather a general OAI filter working like that:

return $record if (
    first({ $_ eq $type } @SAFE_TYPE) # those types below
 || ( $type=~/^HD/ && first { $_ eq "340" } @subject )
);

I would humbly suggest to allow a sub-ref to filter setting if there is not another way yet. Sure this cannot be optimized on database level, but it is more flexible when needed.


Florian


Seb


Sent from Samsung Mobile



-------- Original message --------
From: Florian Heß <hess@ub.uni-heidelberg.de>
Date:
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] OR-linked search filters?


Hi,

we defined for our OAI interface the following filters:

$oai->{filters} = [

# Example: don't export any OAI records from before 2003.
          { meta_fields => [ "type" ], value=>"doctoralThesis
doctoralThesis.habil masterThesis bachelorThesis book Periodical article
bookPart preprint workingPaper conferenceObject lecture review patent
Sound MovingImage CartographicMaterial report", match => "ANY" },

          { meta_fields => [ "full_text_status" ],
            value => "public none",
            match => "ANY",
          },
];

In addition, we want to let through another existing type for abstracts
but only where the subjects contain 340 or "Law" in DDC terms. Is that
possible and how can I achieve that?


Regards
Florian

--
UB Heidelberg (Altstadt)
Plöck 107-109, 69117 HD
Abt. Informationstechnik
http://www.ub.uni-heidelberg.de/

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/



--
UB Heidelberg (Altstadt)
Plöck 107-109, 69117 HD
Abt. Informationstechnik
Tel. 06221 / 54 3550
http://www.ub.uni-heidelberg.de/