-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MatchPhrase and MatchPhrasePrefix classes #599
Comments
Good question. In the documentation there are 2 ways of doing it: Either through the model or through the type. So in case we do additional classes, I would suggest that it is only a mapper for the Match query which calls the functions. What is your take on this? |
I forgot about the 2nd way of doing it, but it sounds fine to me. |
We should only choose the second one, in case it simplifies things. Can you open a pull request with one of the two? |
Any update on this? I'm looking for a way to use match_phrase_prefix as well |
@yellow1912 There is not pull request for it yet. Do you have time to contribute it? |
Im not familiar with the standards set but I will fork and try. |
Cool. Let me know if you need some help. |
To use the second way, just do: $match = new Query\Match();
$match->setFieldQuery($field, $phrase);
$match->setFieldType($field, 'phrase'); Do you really want classes proxy for that ? |
@Jmoati The main reason for the proxy method is probably as most engineers who use Elastica just expect it as there are objects for most of the queries. If you have time to open a pull request, that would be nice. |
I think the library is most useful when it matches the documented way of doing it - and if there are two ways of doing the same thing I would prefer that be replicated in the library (obviously with a proxy method). |
Also there is no method to set slop without having a class for that.
|
@ruflin - I'll try. |
@yehosef Thx |
@ruflin Can you please close this issue ? |
Came up to using these features and realise Elastica didn't have the classes for them.
Features defined in ES here:
Worth adding new classes for these?
The text was updated successfully, but these errors were encountered: