https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38749

--- Comment #4 from David Cook <[email protected]> ---
Elasticsearch... "kw,phr" doesn't actually do anything it seems. It just gets
stripped out of the query.

When I use Elasticsearch with Koha, I can't seem to get wildcards like * to
work instead of double quoted phrases.

According to the Internet... it's not clear whether or not wildcards should
work in phrase searches. Some things suggest yes and some things suggest no.

Koha query: kw,phr:"handb*"
Query sent to Elastic: (""handb*"")
0 results

Koha query: "hand*"
Query sent to Elastic: ("hand*")
2 results

Koha query: "handb*"
Query sent to Elastic: (""handb*"")
0 results

No idea why handb* gets bad double quoting whereas hand* is fine. Guessing we
have some code that goes off the term length or something...

Anyway, the following curl suggests that wildcards don't work in ES phrase
searches when using the ES DSL:

curl -u <username:password> -X POST "<ES server>" -H 'Content-Type:
application/json' -d '{"query": {"query_string": {"query":
"handb*","analyze_wildcard": true}}}'

(removed the ES server link so I don't get autobanned by BZ like usual)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to