meilisearch-java icon indicating copy to clipboard operation
meilisearch-java copied to clipboard

Make the SearchRequest class a builder

Open alallema opened this issue 2 years ago • 0 comments

Description The class SearchRequest has many attributes and it's difficult to create initializers that will suit every possible case. It will be better to use builder instead.

Basic example

SearchRequest.builder()
    .q("")
    .offset(10)
    .limit(200)
    .cropLength(5)
    .cropMarker("…")
    .build();

alallema avatar Oct 13 '22 11:10 alallema