]> git.koha-community.org Git - koha.git/commit
Bug 27070: Add cross_fields type to our searches
authorNick Clemens <nick@bywatersolutions.com>
Fri, 20 Nov 2020 19:11:10 +0000 (19:11 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sun, 17 Jan 2021 19:37:28 +0000 (20:37 +0100)
commite9558026b3ad428d2ceefb4d6604e5213eca0637
tree95e4b1cad6971a9bf8c7249c841c33e7a2cdb4c4
parent29d4cfbdb8c448db81338d301733d5b13fa353ec
Bug 27070: Add cross_fields type to our searches

This patch adds the 'cross_fields' type to our searches:
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-query-string-query.html#query-string-syntax

Without this patch the search terms seem to all require being in the same field when using Elasticsearch 6

To test:
0 - Set QueryAutoTruncate to 'only if * is added'
1 - Find a record with a title and publisher
2 - Search for a word form the title and confirm the record is returned
3 - Search for a work from the title and the publisher's name
4 - The record is not returned
5 - Apply patch
6 - Repeat #3
7 - The record is returned

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 03f15d13c5bb931c03aa1487a3887bdaa034b06f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 4c4d8fbdfd31c67169e403cba998350c22b7f8c4)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm