john-hu / untitled

0 stars 0 forks source link

limit maximum 1k records #48

Closed john-hu closed 2 years ago

john-hu commented 2 years ago

A good search should be able to find the result less than 1k records. So, we should limit the maximum returning result to 1k records. If the size of a search is larger than 1k, we should just return 1k and tell user to add more keywords to have better search quality.

AngusHsu commented 2 years ago

The search_result['docs'] will only return data with size(length) 16, I think we can just add a warning message (if search_result['hits'] > 1000) to warn the user.