[Yazlist] Position attribute searching

Oleg Kolobov okolobov at hcei.tsc.ru
Sat Jul 29 10:14:41 CEST 2006


Hi John,

В пт, 28/07/2006 в 14:42 -0700, John Durno пишет:
> Hi,
> 
> I'm having problems getting position attribute searching (3=1, first in 
> field) working. I'm using yaz-client (yaz version 2.2.12) connecting to 
> Zebra 1.3.34.
> 
> Right now it appears that the position attribute has no effect at all on 
> the search results. The search 'f @attr 1=4 lincoln' returns the same 
> results as the search 'f @attr 1=4 @attr 3=1 lincoln'.
> 
> Titles returned from both searches include:
> 245 10 $a Lincoln Steffens / $c Russell M. Horton. --
> 245 10 $a Lincoln and his generals.
> 245 10 $a Abraham Lincoln, $b the prairie years / $c by Carl Sandburg.
> 245 00 $a Abraham Lincoln / $c by David D. Anderson.
> 
> Unless I'm misunderstanding the concept, I would have expected the first 
> search to return all 4 titles, and the second search (with the position 
> attribute) to only return the first two.
> 
> Any help with this would be much appreciated. I run both the client and 
> server, so if it's possible to configure this at all, I should be able 
> to make it work.

There is a method to get @3=1 @6=1 behavior from Zebra, which offered by
Olga Baranova (Olga.Baranova at usu.ru).

The position of a field has not no effect in Zebra at the moment, and an
idea release 'first in field' via completeness attribute (complete field
6=3) and truncation attributes. Need rewrite query like

a) if the truncation use in query:

        @1=4 @3=1 @5=1 @6=1 {term} => \
        @1=4 @3=1 @5=1 @6=3 {term}
        
b) if the truncation not use in query:

        @1=4 @3=1 @5=100 @6=1 => \
        @or @1=4 @3=1 @5=100 @6=3 {term} @1=4 @3=1 @4=1 @5=101 @6=3
        {term #}
        
Here {term #} is term+' '+'#'.

So, the query we have to rewrite to

@or @1=4 @3=1 @5=100 @6=3 { lincoln } \
@1=4 @3=1 @4=1 @5=101 @6=3 {lincoln #}

Best regards,
Oleg


> 
> thank you,
> John
> 




More information about the Yazlist mailing list