Closed emptyflash closed 5 years ago
Hi @emptyflash thanks for the PR.
Right now I'm on vacation but I will try to look into this next week.
On a quick glance your modifications looks ok to me.
Tests are failing because of pep8 / flake8 (make quality
to see problems)
Could you fix it ?
Definitely no rush, I'm also on vacation starting today :sunglasses:
Hey @alexgarel any update on this? I think this would be a minor version bump, so I went ahead and changed that in luqum/__init__.py
Sorry @emptyflash, I just let time goes !
The code is all good.
May I ask you a çtest for the use case you have (using multi_match) ? It will prevent breaking it later.
Also you may update the doc to propose "match_type" rather than "type", even if we keep backward compatibility.
Sorry for the delay @alexgarel, I updated the docs and added a test case. Let me know if there's anything I missed, or any more test cases I can add.
This solves a problem I had trying to use
multi_match
queries, figured I'd see if it made sense to merge it up stream.It enables setting up a field to be converted to a multi_match query in order to automatically query its subfields as well. E.g.:
muli_match
has a property calledtype
so I needed to rename the specialfield_option
type
case tomatch_type
. Ifmatch_type
isn't used it falls back totype
for backward compatibility.