package com.arms.egovframework.javaservice.esframework.esquery.filter;

import org.opensearch.index.query.AbstractQueryBuilder;
import org.opensearch.index.query.ExistsQueryBuilder;
import org.opensearch.index.query.QueryBuilders;

public class ExistsQueryFilter extends Filter<ExistsQueryBuilder> {

    private ExistsQueryBuilder existsQueryBuilder;

    public ExistsQueryFilter(String name) {
        if (name != null) {
            this.existsQueryBuilder = QueryBuilders.existsQuery(name);
        }
    }

    @Override
    public AbstractQueryBuilder<ExistsQueryBuilder> abstractQueryBuilder() {
        return existsQueryBuilder;
    }
}
