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

When using Elastic Search, only the first 10 patients are returned #453

Closed
mnorbeck opened this issue May 11, 2016 · 6 comments
Closed

When using Elastic Search, only the first 10 patients are returned #453

mnorbeck opened this issue May 11, 2016 · 6 comments
Labels
🐛bug issue/pull request that documents/fixes a bug

Comments

@mnorbeck
Copy link

Expectation is that the entire result set is returned, OR a message to the user letting them know how many were returned, out of the total set

Currently, only the first 10 are being returned (not sure what order)

Using the beta site, search for Ralph. Locate Ralph Glick id = 0063. Search again for Glick. That record is not returned. @jkleinsc did a first pass eval on the issue.

MacOX, Chrome

@tangollama tangollama added 🐛bug issue/pull request that documents/fixes a bug help wanted indicates that an issue is open for contributions labels Jun 26, 2016
@tangollama
Copy link
Member

@jkleinsc this is yours.

@donaldwasserman
Copy link
Contributor

So i've been cruising around looking at how to best contribute. If you don't specify a size option, it returns a max of 10 results by default. If this is still and issue i'd be happy to dig through the application adapter to add in some sort of configurable size parameter.

Unless I'm way off here...

@jkleinsc jkleinsc removed their assignment Oct 6, 2016
@jkleinsc
Copy link
Member

jkleinsc commented Oct 6, 2016

@donaldwasserman it is yours if you want to tackle it. You are correct that the search returns a max of 10 results by default and we just need to pass along a size parameter. The only other caveat is that the search gets proxied via this: https://github.com/HospitalRun/hospitalrun-server-routes/blob/master/routes/20-searchproxy.js

If ElasticSearch isn't configured, this proxy performs a search directly against couchdb so to do so it grabs the query parameters out of the search url. The code there may have to be adjusted to filter out the size parameter.

@donaldwasserman
Copy link
Contributor

Cool - this is a really neat project and a really well-constructed application.

I was going to go with a sensible default of 100. Is that too much? Should it be configurable application-wide as well as per query?

@jkleinsc
Copy link
Member

jkleinsc commented Oct 7, 2016

@donaldwasserman I think we should default it to 25, which is our current page limit. Ideally we would make search work with paging, but I'm not sure how much work that would take.

@donaldwasserman
Copy link
Contributor

I'll update my PR.

Elastic search has some pagination stuff built in, but I've only used it with various php libraries that handled pagination for me.

I can explore that in some sort of future thing.

@jkleinsc jkleinsc removed the help wanted indicates that an issue is open for contributions label Oct 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants