jkuester commented on issue #5453:
URL: https://github.com/apache/couchdb/issues/5453#issuecomment-2702262176
I am testing with docs that all have this set of fields (with random values):
```json
{
"_id": "03476254-7ca0-457c-b39f-7266516e8717",
"_rev": "1-0cd9bf8a77a686db365d58c41ccf61f7",
"type": "person",
"name": "malcolm",
"short_name": "Alex",
"date_of_birth": "1992-3-5",
"date_of_birth_method": "",
"ephemeral_dob": {
"dob_calendar": "1992-3-5",
"dob_method": "",
"dob_approx": "1992-04-03T17:44:27.928Z",
"dob_raw": "1992-3-5",
"dob_iso": "1992-3-5"
},
"sex": "male",
"phone": "+254755818055",
"phone_alternate": "",
"role": "patient",
"external_id": "",
"notes": "",
"meta": {
"created_by": "medic",
"created_by_person_uuid": "",
"created_by_place_uuid": ""
},
"reported_date": 1739891502334
}
```
Playing around with this some more, I think the error is related to the
_number of hits_ found for the query and the `limit` for the query.
With an empty DB, the query works fine. As I start adding docs with the
above structure one-by-one the query still works. However, once I pass `25`
docs, I start getting that `badarith` error. There is some variability in the
behavior in that I have seen the error for less than `25`, but I have never had
a successful query with more than 25 hits. (And I suspect the variability
might be caused by my rough test setup. I am just purging docs between tests,
not actually destroying and recreating the whole db...)
So, once I have `>25` hits in the DB, the query is always failing.
_However_, if I specify an actual `limit` on the query _that is `<24`,_ the
query works fine no matter how many hits are in the DB! But, if I set a
`limit` that is `>=24`, I get the error again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]