[EP-tech] Re: oai filters
Sebastien Francois
sf2 at ecs.soton.ac.uk
Tue Oct 23 16:20:40 BST 2012
On 23/10/12 15:08, Yuri wrote:
> Il 23/10/2012 15:55, Sebastien Francois ha scritto:
>> Hi Yuri,
>>
>> pong!
>>
>> I'm not sure you can use filters to filter items *out* (or perhaps this
>> was added in 3.3, I don't recall).
>>
>> So you might just need to set opposite values to your items: you want to
>> exclude items which has X in field Y ? Then set !X to all other items
>> and filter on !X (I recall doing that exact thing on a French
>> repository). You can then even have custom sets in OAI (perhaps that's
>> your aim).
>>
>> Hope this will help you,
>> Seb.
>>
>>
> do you have more details?
Say you want to filter *out* stuff where field "oai_set" = "hide"
(that's your Y = X).
You'll have a set of items that will have oai_set = "hide". Then also
flag the other items with (eg.) oai_set = "show" and filter on that
value in OAI.
Then in oai.pl:
$oai->{filters} = [
{ meta_fields => [ 'oai_set' ], value => 'show', match => 'EX' } ]
];
You see what I mean?
I suggest this approach because I don't think there is a "match"
operator in EPrints that can do "not equal to" (the opposite of match =>
'EX' on the above line).
Seb.
More information about the Eprints-tech
mailing list