Bugzilla – Attachment 93919 Details for
Bug 22997
Searching gives no results in auth_finder.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22997: Searching gives no results in auth_finder.pl
Bug-22997-Searching-gives-no-results-in-authfinder.patch (text/plain), 2.63 KB, created by
Martin Renvoize (ashimema)
on 2019-10-09 13:03:03 UTC
(
hide
)
Description:
Bug 22997: Searching gives no results in auth_finder.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-09 13:03:03 UTC
Size:
2.63 KB
patch
obsolete
>From f4480f932d3867322c16a98189675c115d08c54c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 28 May 2019 15:48:54 +0200 >Subject: [PATCH] Bug 22997: Searching gives no results in auth_finder.pl > >During cataloguing of an existing biblio, on an heading field, >the use of tag editor fills authorities finder with existing value : > Search main heading ($a only) > Search main heading >Default operator beeing 'contains'. > >Actually with Elasticsearch those search give no results. > >Example with heading : >200 > $a Casaubon > $b Isaac > $f 1559-1614 > >Call to Elasticsearch : > "query" : { > "bool" : { > "must" : [ > { > "query_string" : { > "query" : "Casaubon*", > "default_field" : "heading-main", > } > }, > { > "query_string" : { > "query" : "(Isaac*) AND (1559-1614*)", > "default_field" : "heading" > } > } > ] > } > }, > "sort" : [ > { > "heading__sort.phrase" : "asc" > } > ] > } > >Patch adds to "query_string" : > analyze_wildcard : true. > >Test plan : >1) Use Elasticsearch >2) Edit an existing biblio record >3) Use tag editor on a heading >4) Click search => You get correct results >5) Check also search in authorities-home.pl > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >index 68d09c70f4..3e63086730 100644 >--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm >@@ -376,11 +376,16 @@ sub build_authorities_query { > my $query = $self->_join_queries( @tokens ); > > if ($wh) { >- push @query_parts, { query_string => { default_field => $wh, query => $query } }; >+ push @query_parts, { query_string => { >+ default_field => $wh, >+ analyze_wildcard => JSON::true, >+ query => $query >+ } }; > } > else { > push @query_parts, { > query_string => { >+ analyze_wildcard => JSON::true, > query => $query, > fields => $self->_search_fields(), > } >-- >2.20.1
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 22997
:
90154
|
91095
|
92118
|
92119
|
93377
|
93378
|
93917
|
93918
| 93919 |
93920