Skip to content

Commit

Permalink
Make MeilisearchTemplate.class have two constructors.
Browse files Browse the repository at this point in the history
Original Pull Request #93
Closes #92
  • Loading branch information
junghoon-vans authored Aug 30, 2023
1 parent 13baa3a commit f1a57bb
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ public class MeilisearchTemplate implements MeilisearchOperations {
private final MeilisearchClient client;
private final MeilisearchConverter meilisearchConverter;

public MeilisearchTemplate(MeilisearchClient client, @Nullable MeilisearchConverter meilisearchConverter) {
public MeilisearchTemplate(MeilisearchClient client) {
this.client = client;
this.meilisearchConverter = meilisearchConverter != null ? meilisearchConverter
: new MappingMeilisearchConverter(new SimpleMeilisearchMappingContext());
this.meilisearchConverter = new MappingMeilisearchConverter(new SimpleMeilisearchMappingContext());
}

public MeilisearchTemplate(MeilisearchClient client, MeilisearchConverter meilisearchConverter) {
this.client = client;
this.meilisearchConverter = meilisearchConverter;
}

@Override
Expand Down

0 comments on commit f1a57bb

Please sign in to comment.