All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.wz2cool.elasticsearch.query.builder.MatchPhrasePrefixExtQueryBuilder Maven / Gradle / Ivy

package com.github.wz2cool.elasticsearch.query.builder;

import com.github.wz2cool.elasticsearch.helper.CommonsHelper;
import com.github.wz2cool.elasticsearch.lambda.GetStringPropertyFunction;
import org.elasticsearch.index.query.MatchPhrasePrefixQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;

public class MatchPhrasePrefixExtQueryBuilder implements ExtQueryBuilder {

    private final MatchPhrasePrefixQueryBuilder matchPhrasePrefixQueryBuilder;

    public MatchPhrasePrefixExtQueryBuilder(GetStringPropertyFunction getPropertyFunc, String text) {
        String propertyName = CommonsHelper.getPropertyName(getPropertyFunc);
        this.matchPhrasePrefixQueryBuilder = new MatchPhrasePrefixQueryBuilder(propertyName, text);
    }

    @Override
    public QueryBuilder build() {
        return this.matchPhrasePrefixQueryBuilder;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy