Skip to content
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

Multi-match query do not support match query options #462

Merged
merged 5 commits into from
Mar 15, 2014

Conversation

luiges90
Copy link
Contributor

According to elasticsearch documentation, the multi-match query support all other options in match query. However, the Elastica\Query\MultiMatch class do not support setting options of match query.

I have also directly make a multi-match query request to my local copy of elasticsearch server with match parameters and it seems working

{
  "query": {
    "multi_match": {
      "query": "red shirt",
      "fields": [
        "post_content^1",
        "post_title^10"
      ],
      "operator": "and"
    }
  }
}

While at the moment we could use setParam to directly set the data, it would be nice to have the Multi-match Query class support this, I think.

@ruflin
Copy link
Owner

ruflin commented Sep 16, 2013

Agree. Can you open a pull request with this addition?

@luiges90
Copy link
Contributor Author

Note: I haven't tested it, so there maybe bugs etc...

@ruflin
Copy link
Owner

ruflin commented Sep 20, 2013

Thx for the addition. Before we merge it, we need some tests to make sure it works. Also see pull request guidelines:

http://elastica.io/contribute/pull-request.html

@ruflin
Copy link
Owner

ruflin commented Oct 26, 2013

@luiges90 Any updates here?

@luiges90
Copy link
Contributor Author

Sorry, but I have stopped using PHP because I left the company. Anyone interested may take over my work. Thank you.

@ruflin
Copy link
Owner

ruflin commented Oct 26, 2013

Ok, thx for the update.

@OwlyCode
Copy link
Contributor

Hello there !

I needed to set the type of a multimatch query and came out using setParam to get it working (and it works fine). Even if getters/setters are just a shortcut, it helps to have them (auto-completion, readability, consistency of the code), is it planned to merge this PR ?

We could also add the types of multimatch as constants, like:

const MULTIMATCH_PHRASE = 'phrase';

What do you think ?

@ruflin
Copy link
Owner

ruflin commented Mar 12, 2014

@OwlyCode It is planned to merge this pull request but it still needs some additions (see comments above). I agree that we should introduce the constant. Perhaps you can take over the pull request and add the missing parts so we can merge it?

@OwlyCode
Copy link
Contributor

It's ok for me, I'll work on it in the coming days. ;-)

@ruflin
Copy link
Owner

ruflin commented Mar 13, 2014

Ok, let me know when you pushed the changes as I somehow don't get notifications for new commits.

@OwlyCode
Copy link
Contributor

I submitted a new PR as I couldn't push to this one (#569).

@ruflin ruflin merged commit 4b93ba2 into ruflin:master Mar 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants