org.nlpcn.es4sql.query.multi.ESMultiQueryActionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-sql Show documentation
Show all versions of elasticsearch-sql Show documentation
Query elasticsearch using SQL
package org.nlpcn.es4sql.query.multi;
import org.elasticsearch.client.Client;
import org.nlpcn.es4sql.exception.SqlParseException;
import org.nlpcn.es4sql.query.QueryAction;
/**
* Created by Eliran on 19/8/2016.
*/
public class ESMultiQueryActionFactory {
public static QueryAction createMultiQueryAction(Client client, MultiQuerySelect multiSelect) throws SqlParseException {
switch (multiSelect.getOperation()){
case UNION_ALL:
case UNION:
return new MultiQueryAction(client,multiSelect);
default:
throw new SqlParseException("only supports union and union all");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy