[Koha-bugs] [Bug 12430] Truncation disables relevance ranking (and has issues when using QueryParser)

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 17 06:46:17 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12430

--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
So the QueryParser actually acts a bit oddly as well.

In some cases, it will add the relevance attribute to a query with a couple
weighted fields, as defined in this section of queryparser.yaml:

relevance_bumps:
  keyword:
    titleext:
      enabled: 1
      bib1_mapping:
        biblioserver: 34
    titlekw:
      enabled: 1
      bib1_mapping:
        biblioserver: 20

If you type in "test" into the OPAC as a "Library catalog" search with
QueryAutoTruncate (or as test*), QueryParser will generate something like this:

@or @or @attr 1=1016 @attr 5=1 @attr 4=6 "test" @attr 9=20 @attr 2=102 @attr
5=1 @attr 4=6 "test" @attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "test"

Let me re-organize that a bit so it looks a bit more readable by humans...

@attr 1=1016 @attr 5=1 @attr 4=6 "test" 
@or
@attr 9=20 @attr 2=102 @attr 5=1 @attr 4=6 "test"
@or
@attr 9=34 @attr 2=102 @attr 5=1 @attr 4=6 "test"

Basically, it says it's doing a keyword (@attr 1=1016) wordlist (@attr 4=6)
search for a right truncated (@attr 5=1) "test" in 3 branches of this query. 

In two branches, it's looking for relevance (@attr 2=102) with weighted fields
(@attr 9=20) and (@attr 9=34) where the former is worth fewer points than the
latter in the ranking.

Source: http://www.indexdata.com/zebra/doc/administration-ranking.html

--

If you do a "Title" search for "test", you'll get the following:

@attr 1=4 @attr 5=1 @attr 4=6 "test"

(@attr 5=1 means 'right truncate', @attr 4=6 means 'wordlist', and @attr 1=4
means 'title')

Notice that we no longer have relevance ranking (via @attr 2=102) and no
weighted fields (@attr 9=VALUE)

--

So...it seems to me that relevance only works with QueryParser for
keywords...and even then in an unexpected way...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list