bripkens / lucene

Node.js lib to transform: lucene query → syntax tree → lucene query
MIT License
72 stars 33 forks source link

Adding basic support for regex terms #27

Closed jlbernal closed 4 years ago

jlbernal commented 4 years ago

The Apache Lucene java library supports regular expression queries. The lucene regex queries we use on our backend are reported as invalid by this library.

I added support for regex terms and some tests. Its working for us, maybe it can help others as well. Let me know if if this implementation needs any work!

For Reference: https://lucene.apache.org/core/4_6_0/core/org/apache/lucene/search/RegexpQuery.html

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.6%) to 83.574% when pulling 8dbee7fe5557da4ec6900f17ec5710b2ffe6ae8f on MoebiusSolutions:feature/regexp-term-parse into 8f57c0a533408ddaf3c6a8b7e351483077691b04 on bripkens:master.

bripkens commented 4 years ago

Cool stuff, thank you @jlbernal! Merged via https://github.com/bripkens/lucene/commit/7240462dcaf45836ffdef85dd4b4a1dccb42b8c3 and published as lucene@2.1.0. Thank you for your contribution!