[Koha-devel] Better weigthing for specific indexes ?

Jared Camins-Esakov jcamins at cpbibliography.com
Wed Oct 24 16:06:14 CEST 2012


Mathieu,

> Hello
> I think I have found a little bug, but I am not sure of it.

You have. Quite a big bug, actually.

> in C4/Search.pm (sub _build_weighted_query), I found this :
>
> 826         $weighted_query .= " $index,ext,r1=\"$operand\"";    # exact
index
> 827           #$weighted_query .= " or (title-sort-az=0 or
$index,startswithnt,st-word,r3=$operand #)";
> 828         $weighted_query .= " or $index,phr,r3=\"$operand\"";    #
phrase index
> 829         $weighted_query .=
> 830           " or $index,rt,wrdl,r3=\"$operand\"";    # word list index
>
> So Word list index is on the same plane as Phrase index.
> I suppose if we define Phrase index as r2, the weighting would be more
accurate?

Possibly. The assumption behind the current weighting is that patrons often
do not enter the entire title (or author, publisher, whatever) of a book. I
think I prefer your assumption, which is that if a patron does enter the
entire field, they want to see that result first.

> I don't know how zebra is working internally, so could somebody confirm
please ?

Unfortunately, this change will not have as much impact as we might like.
Phrase indexes are used only for complete-subfield searches, which actually
come into play only rarely. So the term we're discussing turning into r2
may in fact already be a no-op. I'd say it's definitely worth trying,
though.

Regards,
Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20121024/c3a2d40a/attachment-0001.htm>


More information about the Koha-devel mailing list