-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
When using Elastic Search, only the first 10 patients are returned #453
Comments
@jkleinsc this is yours. |
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... |
@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. |
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? |
@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. |
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. |
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
The text was updated successfully, but these errors were encountered: