Skip to content

repalced with queryBuilder() call #83

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The library interface is still under flux...this section will be updated once _S
->type("tweet")
->from(0)
->size(10)
->query(Sherlock::query()->Term()->field("message")
->query(Sherlock::queryBuilder()->Term()->field("message")
->term("ElasticSearch"));

//Execute the search and return results
Expand All @@ -108,17 +108,17 @@ The library interface is still under flux...this section will be updated once _S

//Let's try a more advanced query now.
//Each section is it's own variable to help show how everything fits together
$must = Sherlock::query()->Term()->field("message")
$must = Sherlock::queryBuilder()->Term()->field("message")
->term("ElasticSearch");

$should = Sherlock::query()->Match()->field("author")
$should = Sherlock::queryBuilder()->Match()->field("author")
->query("Zachary Tong")
->boost(2.5);

$must_not = Sherlock::query()->Term()->field("message")
$must_not = Sherlock::queryBuilder()->Term()->field("message")
->term("Solr");

$bool = Sherlock::query()->Bool->must($must)
$bool = Sherlock::queryBuilder()->Bool->must($must)
->should($should)
->must_not($must_not);
$request->query($bool);
Expand Down