org.nlpcn.es4sql.domain.From 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.domain;
/**
* Represents the from clause.
* Contains index and type which the
* query refer to.
*/
public class From {
private String index;
private String type;
private String alias;
/**
* Extract index and type from the 'from' string
* @param from The part after the FROM keyword.
*/
public From(String from) {
String[] parts = from.split("/");
this.index = parts[0].trim();
if (parts.length == 2) {
this.type = parts[1].trim();
}
}
public From(String from,String alias){
this(from);
this.alias = alias;
}
public String getIndex() {
return index ;
}
public void setIndex(String index) {
this.index = index;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy