Bugzilla – Attachment 26064 Details for
Bug 11069
increase title ranking in relevance when using QueryWeightFields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Attachment to Bug 11069 - increase title ranking in relevance when using QueryWeightFields
Bug-11069---increase-title-ranking-in-relevance-wh.patch (text/plain), 1.86 KB, created by
Jesse Maseto
on 2014-03-11 10:15:05 UTC
(
hide
)
Description:
Attachment to Bug 11069 - increase title ranking in relevance when using QueryWeightFields
Filename:
MIME Type:
Creator:
Jesse Maseto
Created:
2014-03-11 10:15:05 UTC
Size:
1.86 KB
patch
obsolete
>From 5ea0a0ed45e20d8dcade6f9826de9e01e913f226 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Thu, 17 Oct 2013 16:20:49 +0200 >Subject: [PATCH] Bug 11069 - increase title ranking in relevance when using QueryWeightFields > >When using QueryWeightFields to add ranking on a search without index, the search actually uses: > - rank 1 : Title-cover,ext : exact title-cover > - rank 2 : ti,ext : exact title > - rank 3 : Title-cover,phr : phrase title-cover > - rank >7 : queries without index >This relevance sets title as phrase in priority and then any index. > >This patch adds title as words list before search on any index, so that records with all searched terms in title, even not well ordered, are more relevant. > >Test plan : >- Enable QueryWeightFields syspref >- Perform a search, with sort by relevance, with two words ofen contained in title, but never one near the other. For example : 'History France' >=> Records with both words in title are first. For example : "Histoire de France" and "La France : 100 ans d'histoire" > >Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> >--- > C4/Search.pm | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 09c1951..cd47c8a 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -859,6 +859,7 @@ sub _build_weighted_query { > "Title-cover,ext,r1=\"$operand\""; # exact title-cover > $weighted_query .= " or ti,ext,r2=\"$operand\""; # exact title > $weighted_query .= " or Title-cover,phr,r3=\"$operand\""; # phrase title >+ $weighted_query .= " or ti,wrdl,r4=\"$operand\""; # words in title > #$weighted_query .= " or any,ext,r4=$operand"; # exact any > #$weighted_query .=" or kw,wrdl,r5=\"$operand\""; # word list any > $weighted_query .= " or wrdl,fuzzy,r8=\"$operand\"" >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11069
:
22028
|
26064
|
27303