Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Read totals from SearchResult #140

Closed
igor-kupczynski opened this issue Jul 24, 2014 · 1 comment
Closed

Read totals from SearchResult #140

igor-kupczynski opened this issue Jul 24, 2014 · 1 comment
Milestone

Comments

@igor-kupczynski
Copy link
Contributor

Hi Jest Team,

In SearchResult there is the getHits method to extract matching documents. But is there a way to extract the total matching document count and max_score? In the json we have:

{
 (...),
"hits": {
    "total": 1,
    "max_score": 0.028130025,
    "hits": [(...)]
  }
}

If there is no other way than parsing json manually, do you think it makes sense to add such method to SearchResult?

E.g. something like SearchResult#getTotals which will return a DTO with total and max_score?

Thanks,
Igor

@kramer kramer closed this as completed in 93d46d4 Jul 29, 2014
@igor-kupczynski
Copy link
Contributor Author

Wow, that was quick :-) Thanks for the feature. Cheers!

@kramer kramer added this to the v0.1.3 milestone Sep 19, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants