polyfractal / sherlock

MIT License
119 stars 28 forks source link

Updated readme.md #65

Open vmadman opened 11 years ago

vmadman commented 11 years ago

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.

vmadman commented 11 years ago

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

polyfractal commented 11 years ago

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 commented 10 years ago

lgtm.