koha-zebra
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Koha-zebra] Koha Zebra Searching Report (from NPL)


From: Sebastian Hammer
Subject: Re: [Koha-zebra] Koha Zebra Searching Report (from NPL)
Date: Thu, 23 Mar 2006 08:28:42 -0500
User-agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)

Mike Taylor wrote:

Date: Wed, 22 Mar 2006 22:43:40 -0500
From: Sebastian Hammer <address@hidden>

Can't do XOR today. I suppose it would be a possible new feature,
but I've frankly never heard of it in an ILS.. can a XOR b be
mapped to (a OR b) NOT (a AND b) ?  or am I just showing my fading
math skills to ill effect, here?
Yep, that's the correct mapping. Voyager's where NPL originally
saw the XOR function.
Ok. It can be faked in the front-end then, or implemented deeper in
the guts of Zebra.

... but the real question is, can anyone thing of _any_ use-case for
this?  I admit I've not tried very hard, but I can't imagine any
scenario in which I'd say, oh no, I don't want to see records that
have _both_ those terms!

I've looked high and low for documentation on the ranking
algorithms in Zebra but haven't found much more than a few
sentences in the official docs and some list messages ...
It isn't documented beyond what's in the code, AFAIK.

Marc might have something.

In fact, to index 245$a, you'd have to write something like
        xelm /*/address@hidden/address@hidden     title
[...]
however, none of these mechanisms allows you to construct phrase
indexes that span multiple subfields.. and they don't allow you to
do cool stuff like extract a date from the guts of 008...

Really?  Surely it would be possible to write an XPath expression that
does this?
Not unlikely, but not one that Zebra can grok, AFAIK. It only implements a subset of XPATH.

Well, in Zebra 1.4, XSLT comes to the rescue, in a way that only
XSLT can do it, with lots of angular brackets and much verbosity....

... which is _way_ easier to write than TCL :-) ...
Well, I've found it so. YMMV.

for instance, in an XSLT index filter,

melm 245$a title:w

becomes

<xsl:template match="marc:record/marc:address@hidden'245']/marc:address@hidden'a']">
 <z:index name="title"type="w">
   <xsl:value-of select="."/>
 </z:index>
</xsl:template>

Eek.

I think that "Eek" only scratches the surface, here.  :-)

But: talk about power and generality!
Yep.

--Seb

_/|_     ___________________________________________________________________
/o ) \/  Mike Taylor  <address@hidden>  http://www.miketaylor.org.uk
)_v__/\  "Those who mourn for 'USENET like it was' should remember the
         original design estimates of maximum traffic volume: two articles
         per day" -- Steven Bellovin.



--
Sebastian Hammer, Index Data
address@hidden   www.indexdata.com
Ph: (603) 209-6853





reply via email to

[Prev in Thread] Current Thread [Next in Thread]