LibreCat / Catmandu-Store-MongoDB

A searchable store backed by MongoDB
https://metacpan.org/pod/Catmandu::Store::MongoDB
4 stars 2 forks source link

parameter limit has different meaning in MongoDB than in Catmandu::Bag's search #16

Closed nicolasfranck closed 3 years ago

nicolasfranck commented 3 years ago

According to the documentation of the method limit in MongoDB, a limit of 0 is interpreted as infinity. This is different from what we're used to, when you compare it to implementations for Solr or DBI, where limit = 0 actually returns no results.

Fix this in Catmandu::Store::MongoDB::Bag#search? i.e. delete last hit manually before returning?