jurismarches / luqum

A lucene query parser generating ElasticSearch queries and more !
Other
188 stars 40 forks source link

Fix ES query builder handling of empty phrases #8

Closed connec closed 7 years ago

connec commented 7 years ago

When removing quotes from a phrase, the ES query builder required a non-empty quoted string, and would raise a TypeError when presented with an empty one. Switching from a regex to a simple slice removing the first and last character from the phrase solves the problem.

Fixes #4.

Mayhaps this and #7 would merit a release :smile:

alexgarel commented 7 years ago

Perfect @connec, that's worth a release :-)