@@ -, +, @@ results does not work for 'Keyword' and 'Keyword as phrase' you a list of results and 'Keyword as phrase' active, try to perform a search within search results with a term that should give you some results 'Keyword' and 'Keyword as phrase' in results --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -1119,6 +1119,15 @@ sub _fix_limit_special_cases { elsif ( $l =~ /^available$/ ) { push @new_lim, 'available:true'; } + elsif ( $l =~ /^\s*(kw\b[\w,-]*?):(.*)/) { + my ( $field, $term ) = ($1, $2); + if ( defined($field) && defined($term) && $field =~ /,phr$/) { + push @new_lim, "(\"$term\")"; + } + else { + push @new_lim, $term; + } + } else { my ( $field, $term ) = $l =~ /^\s*([\w,-]*?):(.*)/; $field =~ s/,phr$//; #We are quoting all the limits as phrase, this prevents from quoting again later --