CouchDB Lucene How to URL Encode Query containing Minus (-)
- by Peter
I'd like to query text containing a minus (-) Sign, e.g.
foo-bar
with a couchdb lucene fulltext query.
Following lucene rules I'd have to escape the minus, resulting in
foo\-bar
Last I'd have to urlencode the backslash resulting in
foo%5C-bar
So the complete url would be:
http://127.0.0.1:5984/_fti/local/db/_design/foo/by_subject?q=foo%5C-bar
Neither works. The result is always split in two phrases
"q":"default:foo default:bar"
Leading to documents containing only foo or bar being found also.
Thanks for your help!