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

Paging of results #68

Closed
AlienDave opened this issue Aug 18, 2015 · 1 comment
Closed

Paging of results #68

AlienDave opened this issue Aug 18, 2015 · 1 comment

Comments

@AlienDave
Copy link

In OSS PHP's "previous version" documentation, it talks about pagination of results.
Why is this absent from the current version?
Or, if it isn't, where's the documentation on how to use it?

@arjunkariyadan
Copy link

This is still available on the current version. You can use start() and rows() method in the request object to do the pagination.

$request = new OpenSearchServer\Search\Field\Search();
$request->index('index_name')
//set some search fields
->searchFields(array('content', 'url'))
->start(0)
->rows(20)
//set a specific different search field with Term & Phrase, term boost = 5 and phrase boost = 10
->searchField('title', OpenSearchServer\Search\Field\Search::SEARCH_MODE_TERM_AND_PHRASE, 5, 10)
$results = $oss_api->submit($request);

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

No branches or pull requests

2 participants