Commit c0913274 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch '307-support-inverse-filters' into 'master'

Resolve "Support inverse filters"

Closes #307

See merge request genesys-pgr/genesys-server!207
parents 8d6888b1 1022cb8a
......@@ -20,13 +20,14 @@ import static org.genesys.catalog.model.vocab.QControlledVocabulary.controlledVo
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.model.QPartner;
import org.genesys.catalog.model.vocab.ControlledVocabulary;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
import com.querydsl.jpa.JPAExpressions;
public class ControlledVocabularyFilter extends UuidModelFilter {
public class ControlledVocabularyFilter extends UuidModelFilter<ControlledVocabularyFilter, ControlledVocabulary> {
/** The owner. */
public PartnerFilter owner;
......@@ -47,7 +48,7 @@ public class ControlledVocabularyFilter extends UuidModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(controlledVocabulary._super, and);
super.buildQuery(controlledVocabulary, controlledVocabulary._super, and);
if (published != null) {
and.and(controlledVocabulary.published.eq(published));
......
......@@ -24,6 +24,7 @@ import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.model.dataset.Dataset;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -35,7 +36,7 @@ import org.genesys2.server.model.PublishState;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DatasetFilter extends UuidModelFilter {
public class DatasetFilter extends UuidModelFilter<DatasetFilter, Dataset> {
/** Any text. */
public String _text;
......@@ -70,7 +71,7 @@ public class DatasetFilter extends UuidModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(dataset._super, and);
super.buildQuery(dataset, dataset._super, and);
if (state != null && !state.isEmpty()) {
and.and(dataset.state.in(state));
......
......@@ -40,7 +40,7 @@ import org.genesys2.server.model.PublishState;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DescriptorFilter extends UuidModelFilter {
public class DescriptorFilter extends UuidModelFilter<DescriptorFilter, Descriptor> {
/** Any text. */
public String _text;
......@@ -101,7 +101,7 @@ public class DescriptorFilter extends UuidModelFilter {
public Predicate buildQuery(final QDescriptor descriptorPath) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(descriptorPath._super, and);
super.buildQuery(descriptorPath, descriptorPath._super, and);
if (crop != null && !crop.isEmpty()) {
and.and(descriptorPath.crop.in(crop));
......
......@@ -23,6 +23,7 @@ import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.model.traits.DescriptorList;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -34,7 +35,7 @@ import org.genesys2.server.model.PublishState;
* @author Andrey Lugovskoy
* @author Matija Obreza
*/
public class DescriptorListFilter extends UuidModelFilter {
public class DescriptorListFilter extends UuidModelFilter<DescriptorListFilter, DescriptorList> {
/** Any text. */
public String _text;
......@@ -67,7 +68,7 @@ public class DescriptorListFilter extends UuidModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(descriptorList._super, and);
super.buildQuery(descriptorList, descriptorList._super, and);
if (crop != null && !crop.isEmpty()) {
and.and(descriptorList.crop.in(crop));
......
......@@ -22,6 +22,7 @@ import java.util.Set;
import org.apache.commons.collections4.CollectionUtils;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys.catalog.model.Partner;
import org.genesys.catalog.model.QPartner;
import com.querydsl.core.BooleanBuilder;
......@@ -32,7 +33,7 @@ import com.querydsl.core.types.Predicate;
*
* @author Andrey Lugovskoy.
*/
public class PartnerFilter extends UuidModelFilter {
public class PartnerFilter extends UuidModelFilter<PartnerFilter, Partner> {
/** The short name. */
public Set<String> shortName;
......@@ -57,7 +58,7 @@ public class PartnerFilter extends UuidModelFilter {
public Predicate buildQuery(final QPartner partnerPath) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(partnerPath._super, and);
super.buildQuery(partnerPath, partnerPath._super, and);
if (CollectionUtils.isNotEmpty(shortName)) {
and.and(partnerPath.shortName.in(shortName));
......
......@@ -3,6 +3,7 @@ package org.genesys2.server.component.elastic;
import static com.google.common.collect.Lists.*;
import static org.elasticsearch.index.query.QueryBuilders.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
......@@ -35,11 +36,15 @@ import com.querydsl.core.types.Visitor;
public class ElasticQueryBuilder implements Visitor<Void, Void> {
private static Logger LOG = LoggerFactory.getLogger(ElasticQueryBuilder.class);
private BoolQueryBuilder root = QueryBuilders.boolQuery();
private final List<QueryBuilder> mustClauses = new ArrayList<>();
private final List<QueryBuilder> mustNotClauses = new ArrayList<>();
private final ElasticQueryBuilder self = this;
public QueryBuilder getQuery() {
BoolQueryBuilder root = QueryBuilders.boolQuery();
mustClauses.forEach(must -> root.filter(must));
mustNotClauses.forEach(mustNot -> root.mustNot(mustNot));
return root;
}
......@@ -116,6 +121,29 @@ public class ElasticQueryBuilder implements Visitor<Void, Void> {
Expression<?> a1 = args.get(1);
handleLike(operator, a0, a1);
} else if (operator == Ops.NOT) {
LOG.debug("{}: {}", operator, args);
for (Expression<?> expr : args) {
printExpression(operator + ".. ", expr);
}
Expression<?> notExp = args.get(0);
handleNot(notExp);
} else if (operator == Ops.IS_NOT_NULL) {
LOG.debug("{}: {}", operator, args);
for (Expression<?> expr : args) {
printExpression(operator + ".. ", expr);
}
Path<?> path = (Path<?>) args.get(0);
PathMetadata pmd = path.getMetadata();
mustClauses.add(existsQuery(customizedPath(pmd.getParent().toString() + "." + pmd.getName())));
} else if (operator == Ops.IS_NULL) {
LOG.debug("{}: {}", operator, args);
for (Expression<?> expr : args) {
printExpression(operator + ".. ", expr);
}
Path<?> path = (Path<?>) args.get(0);
PathMetadata pmd = path.getMetadata();
mustNotClauses.add(existsQuery(customizedPath(pmd.getParent().toString() + "." + pmd.getName())));
} else {
LOG.error("Op {}: {}", operator, args);
}
......@@ -124,15 +152,22 @@ public class ElasticQueryBuilder implements Visitor<Void, Void> {
// printExpression("a1: " + type.getName() + " " + operator, a1);
}
private void handleNot(Expression<?> notExp) {
LOG.debug("NOT expr: {}", notExp);
ElasticQueryBuilder notBuilder = new ElasticQueryBuilder();
notExp.accept(notBuilder, null);
notBuilder.mustClauses.forEach(mustNot -> mustNotClauses.add(mustNot));
}
private void handleLike(Operator operator, Path<?> path, Expression<?> val) {
PathMetadata pmd = path.getMetadata();
// SimpleQueryStringBuilder qsq = simpleQueryStringQuery( +":" + toValue(val));
if (operator == Ops.STARTS_WITH) {
MatchQueryBuilder matchPrefixQuery = matchPhrasePrefixQuery(customizedPath(pmd.getParent().toString() + "." + pmd.getName()), toValue(val));
root.filter(matchPrefixQuery);
mustClauses.add(matchPrefixQuery);
} else if (operator == Ops.STRING_CONTAINS) {
MatchQueryBuilder matchPrefixQuery = matchPhraseQuery(customizedPath(pmd.getParent().toString() + "." + pmd.getName()), toValue(val));
root.filter(matchPrefixQuery);
mustClauses.add(matchPrefixQuery);
} else {
throw new RuntimeException("Unsupported ES handleLike operator: " + operator);
}
......@@ -155,16 +190,16 @@ public class ElasticQueryBuilder implements Visitor<Void, Void> {
} else if (operator == Ops.LOE) {
rq.lte(toValue(val1));
}
root.filter(rq);
mustClauses.add(rq);
}
private void handleEquals(Path<?> path, Expression<?> value) {
PathMetadata pmd = path.getMetadata();
if (pmd.getPathType() == PathType.COLLECTION_ANY) {
LOG.error("Path ANY for {}={}", pmd.getParent(), value);
root.filter(termsQuery(customizedPath(pmd.getParent().toString()), toValues(value)));
mustClauses.add(termsQuery(customizedPath(pmd.getParent().toString()), toValues(value)));
} else {
root.filter(termsQuery(customizedPath(getParentPath(pmd.getParent()) + "." + pmd.getName()), toValues(value)));
mustClauses.add(termsQuery(customizedPath(getParentPath(pmd.getParent()) + "." + pmd.getName()), toValues(value)));
}
}
......
......@@ -30,7 +30,7 @@ import com.querydsl.core.types.Predicate;
/**
* Filters for {@link AccessionCollect}
*/
public class AccessionCollectFilter extends BasicModelFilter {
public class AccessionCollectFilter extends BasicModelFilter<AccessionCollectFilter, AccessionCollect> {
/** The date. */
public StringFilter date;
......@@ -61,7 +61,7 @@ public class AccessionCollectFilter extends BasicModelFilter {
*/
public Predicate buildQuery(QAccessionCollect collect) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(collect._super, and);
super.buildQuery(collect, collect._super, and);
if (date != null) {
and.and(date.buildQuery(collect.collDate));
......
......@@ -33,7 +33,7 @@ import com.querydsl.core.types.Predicate;
/**
* Filters for {@link Accession}
*/
public class AccessionFilter extends UuidModelFilter {
public class AccessionFilter extends UuidModelFilter<AccessionFilter, Accession> {
/** The historic. */
/// Include historic
......@@ -94,7 +94,7 @@ public class AccessionFilter extends UuidModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(accession._super._super, and);
super.buildQuery(accession, accession._super._super, and);
if (taxa != null) {
and.and(taxa.buildQuery(accession.taxonomy));
......
......@@ -19,6 +19,7 @@ import static org.genesys2.server.model.genesys.QAccessionGeo.accessionGeo;
import org.genesys.blocks.model.filters.BasicModelFilter;
import org.genesys.blocks.model.filters.NumberFilter;
import org.genesys2.server.model.genesys.AccessionGeo;
import org.genesys2.server.model.genesys.QAccessionGeo;
import com.querydsl.core.BooleanBuilder;
......@@ -27,7 +28,7 @@ import com.querydsl.core.types.Predicate;
/**
* The Class CountryFilter.
*/
public class AccessionGeoFilter extends BasicModelFilter {
public class AccessionGeoFilter extends BasicModelFilter<AccessionGeoFilter, AccessionGeo> {
/** The longitude. */
public NumberFilter<Double> longitude;
......@@ -55,7 +56,7 @@ public class AccessionGeoFilter extends BasicModelFilter {
*/
public Predicate buildQuery(QAccessionGeo accessiongeo) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(accessiongeo._super, and);
super.buildQuery(accessiongeo, accessiongeo._super, and);
if (longitude != null) {
and.and(longitude.buildQuery(accessiongeo.longitude));
......
......@@ -20,6 +20,7 @@ import static org.genesys2.server.model.impl.QCountry.country;
import java.util.Set;
import org.genesys.blocks.model.filters.BasicModelFilter;
import org.genesys2.server.model.impl.Country;
import org.genesys2.server.model.impl.QCountry;
import com.querydsl.core.BooleanBuilder;
......@@ -29,7 +30,7 @@ import com.querydsl.core.types.Predicate;
/**
* The Class CountryFilter.
*/
public class CountryFilter extends BasicModelFilter {
public class CountryFilter extends BasicModelFilter<CountryFilter, Country> {
/** The iso 3. */
public Set<String> iso3;
......@@ -51,7 +52,7 @@ public class CountryFilter extends BasicModelFilter {
*/
public Predicate buildQuery(QCountry country) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(country._super, and);
super.buildQuery(country, country._super, and);
if (iso3 != null && !iso3.isEmpty()) {
and.and(country.code3.in(iso3));
......
......@@ -31,7 +31,7 @@ import com.querydsl.core.types.Predicate;
/**
* Filter for {@link FaoInstitute}.
*/
public class InstituteFilter extends BasicModelFilter {
public class InstituteFilter extends BasicModelFilter<InstituteFilter, FaoInstitute> {
/** The code. */
public Set<String> code;
......@@ -62,7 +62,7 @@ public class InstituteFilter extends BasicModelFilter {
*/
public Predicate buildQuery(QFaoInstitute institute) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(institute._super, and);
super.buildQuery(institute, institute._super, and);
if (code != null && !code.isEmpty()) {
and.and(institute.code.in(code));
......
......@@ -33,7 +33,7 @@ import com.querydsl.core.types.Predicate;
/**
* Filter for {@link MaterialRequest}.
*/
public class MaterialRequestFilter extends AuditedVersionedModelFilter {
public class MaterialRequestFilter extends AuditedVersionedModelFilter<MaterialRequestFilter, MaterialRequest> {
/** The identifiers. */
public Set<UUID> uuid;
......@@ -64,7 +64,7 @@ public class MaterialRequestFilter extends AuditedVersionedModelFilter {
*/
public Predicate buildQuery(QMaterialRequest materialRequest) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(materialRequest._super, and);
super.buildQuery(materialRequest, materialRequest._super, and);
if (uuid != null && !uuid.isEmpty()) {
and.and(materialRequest.uuid.in(uuid.stream().map(u -> u== null ? null : u.toString()).collect(Collectors.toSet())));
......
......@@ -33,7 +33,7 @@ import com.querydsl.core.types.Predicate;
/**
* Filter for {@link MaterialSubRequest}.
*/
public class MaterialSubRequestFilter extends AuditedVersionedModelFilter {
public class MaterialSubRequestFilter extends AuditedVersionedModelFilter<MaterialSubRequestFilter, MaterialSubRequest> {
/** The identifiers. */
public Set<UUID> uuid;
......@@ -64,7 +64,7 @@ public class MaterialSubRequestFilter extends AuditedVersionedModelFilter {
*/
public Predicate buildQuery(QMaterialSubRequest materialSubRequest) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(materialSubRequest._super, and);
super.buildQuery(materialSubRequest, materialSubRequest._super, and);
if (uuid != null && !uuid.isEmpty()) {
and.and(materialSubRequest.uuid.in(uuid.stream().map(u -> u== null ? null : u.toString()).collect(Collectors.toSet())));
......
......@@ -21,6 +21,7 @@ import java.util.Set;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys.blocks.model.filters.UuidModelFilter;
import org.genesys2.server.model.impl.Subset;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -31,7 +32,7 @@ import com.querydsl.core.types.Predicate;
*
* @author Maxym Borodenko
*/
public class SubsetFilter extends UuidModelFilter {
public class SubsetFilter extends UuidModelFilter<SubsetFilter, Subset> {
/** The published. */
public Boolean published;
......@@ -61,7 +62,7 @@ public class SubsetFilter extends UuidModelFilter {
*/
public Predicate buildQuery() {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(subset._super, and);
super.buildQuery(subset, subset._super, and);
if ((institutes != null) && !institutes.isEmpty()) {
and.and(subset.institute.code.in(institutes));
......
......@@ -22,6 +22,7 @@ import java.util.Set;
import org.genesys.blocks.model.filters.AuditedVersionedModelFilter;
import org.genesys.blocks.model.filters.StringFilter;
import org.genesys2.server.model.genesys.QTaxonomy2;
import org.genesys2.server.model.genesys.Taxonomy2;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Predicate;
......@@ -30,7 +31,7 @@ import com.querydsl.core.types.Predicate;
/**
* The Class TaxonomyFilter.
*/
public class TaxonomyFilter extends AuditedVersionedModelFilter {
public class TaxonomyFilter extends AuditedVersionedModelFilter<TaxonomyFilter, Taxonomy2> {
/** The genus. */
public Set<String> genus;
......@@ -61,7 +62,7 @@ public class TaxonomyFilter extends AuditedVersionedModelFilter {
*/
public BooleanBuilder buildQuery(final QTaxonomy2 taxonomy) {
final BooleanBuilder and = new BooleanBuilder();
super.buildQuery(taxonomy2._super._super, and);
super.buildQuery(taxonomy2, taxonomy2._super._super, and);
if (genus != null && !genus.isEmpty()) {
and.and(taxonomy.genus.in(genus));
......
package org.genesys.test.simpletest;
import static com.google.common.collect.Sets.*;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.*;
import org.genesys2.server.component.elastic.ElasticQueryBuilder;
import org.genesys2.server.service.FilterConstants;
import org.genesys2.server.service.filter.AccessionFilter;
import org.genesys2.server.service.filter.TaxonomyFilter;
import org.genesys2.server.service.impl.FilterHandler;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilter;
import org.genesys2.server.service.impl.FilterHandler.AppliedFilters;
......@@ -43,7 +45,7 @@ public class AccessionFilterTest {
filter.addFilterValue(new FilterHandler.LiteralValueFilter("cassava"));
af = AccessionFilter.convert(filters);
assertThat(af.crop, is("banana"));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
......@@ -66,7 +68,6 @@ public class AccessionFilterTest {
filter.addFilterValue(new FilterHandler.LiteralValueFilter("cassava"));
af = AccessionFilter.convert(filters);
assertThat(af.cropName, is("banana"));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
......@@ -83,7 +84,6 @@ public class AccessionFilterTest {
LOG.debug("-> {}", pretty.writeValueAsString(af));
assertThat(af.holder, notNullValue());
assertThat(af.holder.code, contains("INS003"));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
......@@ -99,7 +99,6 @@ public class AccessionFilterTest {
AccessionFilter af = AccessionFilter.convert(filters);
assertThat(af.holder, notNullValue());
assertThat(af.holder.code, containsInAnyOrder("INS003", "INS099"));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
......@@ -115,7 +114,6 @@ public class AccessionFilterTest {
AccessionFilter af = AccessionFilter.convert(filters);
assertThat(af.origin, notNullValue());
assertThat(af.origin.iso3, containsInAnyOrder("CIV", "NGA"));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
......@@ -148,7 +146,7 @@ public class AccessionFilterTest {
filter.addFilterValue(new FilterHandler.LiteralValueFilter(40));
af = AccessionFilter.convert(filters);
assertThat(af.storage, containsInAnyOrder(10, 12, 40));
esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
......@@ -163,7 +161,7 @@ public class AccessionFilterTest {
AccessionFilter af = AccessionFilter.convert(filters);
assertThat(af.available, notNullValue());
assertThat(af.available, is(true));
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
......@@ -176,13 +174,12 @@ public class AccessionFilterTest {
esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
filter.addFilterValue(new FilterHandler.LiteralValueFilter(true));
LOG.debug("-> {}", pretty.writeValueAsString(filter.getValues()));
af = AccessionFilter.convert(filters);
assertThat(af.available, nullValue());
}
@Test
public void testMlsStatusFilter() throws JsonProcessingException {
......@@ -209,7 +206,6 @@ public class AccessionFilterTest {
assertThat(af.mlsStatus, nullValue());
}
@Test
public void testGeoFilter() throws JsonProcessingException {
AppliedFilters filters = new AppliedFilters();
......@@ -253,7 +249,7 @@ public class AccessionFilterTest {
assertThat(af.geo.elevation, notNullValue());
assertThat(af.geo.elevation.between[0], is(-20d));
assertThat(af.geo.elevation.between[1], is(30d));
esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
......@@ -265,10 +261,51 @@ public class AccessionFilterTest {
assertThat(af.geo.elevation, notNullValue());
assertThat(af.geo.elevation.between[0], is(-10d));
assertThat(af.geo.elevation.between[1], is(40d));
esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.info("=>\n{}", esQb.getQuery());
}
@Test
public void testNegativeFilter() {
AccessionFilter af = new AccessionFilter();
af.taxa = new TaxonomyFilter();
af.taxa.genus = newHashSet("Manihot");
af.NOT = new AccessionFilter();
af.NOT.available = true;
LOG.debug("Q: " + af.buildQuery());
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.debug("curl -XGET 'localhost:9200/accession_read/_count?pretty' -d '{ \"query\": " + esQb.getQuery() + " }'");
}
@Test
public void testIsNullFilter() {
AccessionFilter af = new AccessionFilter();
af.taxa = new TaxonomyFilter();
af.taxa.genus = newHashSet("Manihot");
af.NULL = newHashSet("available");
LOG.debug("Q: " + af.buildQuery());
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.debug("curl -XGET 'localhost:9200/accession_read/_count?pretty' -d '{ \"query\": " + esQb.getQuery() + " }'");
}
@Test
public void testNotIsNullFilter() {
AccessionFilter af = new AccessionFilter();
af.taxa = new TaxonomyFilter();
af.taxa.genus = newHashSet("Manihot");
af.NOTNULL = newHashSet("available");
LOG.debug("Q: " + af.buildQuery());
ElasticQueryBuilder esQb = new ElasticQueryBuilder();
af.buildQuery().accept(esQb, null);
LOG.debug("curl -XGET 'localhost:9200/accession_read/_count?pretty' -d '{ \"query\": " + esQb.getQuery() + " }'");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment