Skip to content

Commit

Permalink
Fixed Jackson getter/setter
Browse files Browse the repository at this point in the history
  • Loading branch information
concurrent-recursion committed Jun 19, 2023
1 parent 54a4cc7 commit 9eb8897
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
import co.elasticsearch.enterprisesearch.client.model.request.search.facet.Facet;
import co.elasticsearch.enterprisesearch.client.model.request.search.filter.Filter;
import co.elasticsearch.enterprisesearch.client.model.request.search.filter.Filters;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import lombok.AccessLevel;
Expand Down Expand Up @@ -86,12 +83,22 @@ public class SearchRequest {
* @param filters The filters to apply to the search
* @return the filters
*/
@JsonProperty("filters")
@Getter(AccessLevel.PACKAGE)
@Setter(AccessLevel.PACKAGE)
@Getter(AccessLevel.NONE)
@Setter(AccessLevel.NONE)
private Filter internalFilter;


@JsonSetter("filters")
void setFilter(Filter filter){
setFilters(filter);
}

@JsonGetter("filters")
Filter getFilter(){
return internalFilter;
}


@JsonIgnore
private Filters filters;

Expand Down

0 comments on commit 9eb8897

Please sign in to comment.