Skip to content

Conversation

vmadman
Copy link

@vmadman vmadman commented Jun 22, 2013

The boolean query example used the query() method, which does not exist. Instead, it should use the queryBuilder() method. Additionally, if you pass a single parameter to must(), should(), or must_not().. then it will be iterated as though it is an array of classes that implement \Sherlock\components\QueryInterface.

Therefore, you cannot pass a Term() or Match() class directly to the must(), should(), or must_not() method as previously shown, but must wrap them in an array or pass multiple classes/queries.

The boolean query example used the query() method, which does not exist.  Instead, it should use the queryBuilder() method.  Additionally, if you pass a *single* parameter to must(), should(), or must_not().. then it will be iterated as though it is an array of class that implement \Sherlock\components\QueryInterface.

Therefore, you cannot pass a Term() or Match() class directly to the must(), chould(), or must_not() method as previously shown.
@vmadman
Copy link
Author

vmadman commented Jun 22, 2013

Sorry if I'm just being dumb here. I suspect that query() was replaced by queryBuilder() at some point?

@polyfractal
Copy link
Owner

Gah, sorry for letting this hang...I'm out of town at the moment. The Readme is definitely wrong (the name did indeed change from query to queryBuilder.

Sounds like a bug for must/should/must_not. I'll investigate when I get home

@wangxiaomo
Copy link

lgtm.

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