koha-zebra
[Top][All Lists]
Advanced

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

Re: [Koha-zebra] firstinfield and position attributes usage


From: Adam Dickmeiss
Subject: Re: [Koha-zebra] firstinfield and position attributes usage
Date: Mon, 11 Jun 2007 09:08:44 +0200
User-agent: Icedove 1.5.0.10 (X11/20070329)

Henri-Damien LAURENT wrote:
Hi,
I have problems using firstinfield and position attributes and then
querying with @attr 3=1.
Indeed, some users would find it cool to search anatomy only with the
beginning of the phrase.


First of all, I wonder how I can define a custom index and use it.
It seems that using completeness attribute implies @attr 6=1 if 0 @attr
6=2 or @attr 6=1.
position is not defined in you documentation.
firstinfield seems to be used along with it.

I tried to define :

index h
completeness 0
position 1
firstinfield 1
charmap sort-string-utf.chr

in default.idx and
used it in record.abs :
melm 250$a Heading, Heading:h, Heading:s

and queried my base as such :
f @and @attr "1=Authority/format-id" @attr 5=100 MSC  @attr "1=Heading"
@attr 3=1 An

Answer was :
ERROR 119

Your index named 'h' is not used for "normal" searches. The structure and sometimes the completeness attribute tell _what_ index type to use. If no structure is given .. and completeness is omitted or set to 1 (incomplete subfield) then index 'w' is used. Not your index 'h'. The error message suggests that firstinfield is not enabled for your index 'w'.

You can either just enable firstinfield for 'w' .. It's already enabled for 'w' in tab/default.idx that comes with Zebra 2.0. But probably you don't use that.

You can also just specify that you want to use index 'h' in your query by using structure=h (@attr 4=h). This structure hack requires Zebra 2.0.14.

/ Adam


Is there something I missed ?






reply via email to

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