We are trying to abstract out complexity of Elasticsearch through a configuration and Lucene query language.
Right now this abstraction is quite leaky. For example if you declare labels as a text_lang field, you should query, eg. labels.en:"my query" to reach it. While you also specify which language you want to query with. There are a number of other problems of this type.
Most of those problems can be solved by using Lucene to modify the request on the fly, based upon field deficinition
### To be fixed
- [ ] replace text_lang field with right expression on the fly (eg labels: --> labels.en:)
- [ ] treat phrase match as word match (use all text search fields)
- [ ] explore using the synonyms feature of elasticsearch instead of injecting synonyms / or replace in terms query
- [ ] Add a fallback language for queries on certain fields (eg. product_name) corresponding to main product language
- [ ] Raise or at least warn if using an unknown field in a query (should catch labels_tasgs:en:fair-trade)
- [ ] labels_tags:"en:fair-trade" OR labels_tags:"en:eu-organic" should work (currently failing)
We are trying to abstract out complexity of Elasticsearch through a configuration and Lucene query language.
Right now this abstraction is quite leaky. For example if you declare labels as a text_lang field, you should query, eg. labels.en:"my query" to reach it. While you also specify which language you want to query with. There are a number of other problems of this type.
Most of those problems can be solved by using Lucene to modify the request on the fly, based upon field deficinition