My bad for this second PR, but I also think it's better to separate concepts.
This PR is kind-of more invasive than the previous, it introduces pagination on search queries and, to not insert a score field in every entity, introduces a SearchEntity wrapper that leverages serde's flatten to be transparent on deserialization.
What I don't really like here is having inner field as public, since its fields are already accessible via Deref and DerefMut.
What do you think about it? Maybe an impl<T> Into<T> for SearchEntity<T> would be better?
My bad for this second PR, but I also think it's better to separate concepts. This PR is kind-of more invasive than the previous, it introduces pagination on search queries and, to not insert a
score
field in every entity, introduces aSearchEntity
wrapper that leverages serde's flatten to be transparent on deserialization.What I don't really like here is having
inner
field as public, since its fields are already accessible via Deref and DerefMut. What do you think about it? Maybe animpl<T> Into<T> for SearchEntity<T>
would be better?