[Zebralist] date comparison syntax in pqf?

Oleg Kolobov okolobov at hcei.tsc.ru
Thu May 29 14:44:59 CEST 2008


В чт, 29/05/2008 в 11:49 +1200, Walter McGinnis пишет:
> Hi,
> 
> I'm putting together a bridge between the OAI Ruby Gem's repository  
> functionality and a ZOOM interface to OAI DC records.
> 
> Things are going quite well generally.  I know how to sort my results  
> by an index on oai_datestamp (e.g. get latest or earliest record), but  
> I'm getting caught in some datetime comparisons.  It seems like @attr  
> 2=x is the key, but experiencing a couple things that leave me  
> scratching my head.
> 
> If I only have 0,d,s indexes on oai_timestamp index and I try a query  
> like " f @attr 2=1 @attr 1=1012 2008-05-29" I get this:
> 
> Diagnostic message(s) from database:
>      [114] Unsupported Use attribute -- v2 addinfo '1012'

Probably it is server-side things. What kind of server are using?

For current version of Zebra we have to use structure attribute in a
query

        @attr 4=3 for a index type '0'
        @attr 4=5 for a index type 'd'
        
and the query type like this

        f @attr 2=1 @attr 1=1012 @4=3 "2008-05-29"
or 
        f @attr 2=1 @attr 1=1012 @4=5 "2008-05-29"


-- Oleg
        



> 
> If I add a w index and rebuild my indexes, I can do " f @attr 2=1  
> @attr 1=1012 2008-05-29" and get results that I expect.  Seems a  
> little weird that I have to add an word index for this to work.   
> Alternatives?





> 
> Things break again if I add time to the query like so:
> 
>   Z> f @attr 2=5 @attr 1=1012 '2008-05-29 11:31:49'
> f @attr 2=5 @attr 1=1012 '2008-05-29 11:31:49'
>                                                  ^
> Prefix query error: extra token (code 1)
> 
> If I escape the colons, I still get the same error.
> 
> I definitely feel like I'm missing a better way or a crucial detail.   
> Please enlighten me!
> 
> Cheers,
> Walter
> 
> _______________________________________________
> Zebralist mailing list
> Zebralist at lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/zebralist




More information about the Zebralist mailing list