#8737 - make elastic fetch 100 inner hits instead of the default 3.
This commit is contained in:
parent
3d367b0589
commit
dfa2f0cd38
|
@ -146,7 +146,7 @@ public class DatasetRepository extends ElasticRepository<Dataset, DatasetCriteri
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NestedQueryBuilder nestedQueryBuilder = QueryBuilders.nestedQuery("datasets", boolQuery, ScoreMode.Avg).innerHit(new InnerHitBuilder().setFetchSourceContext(new FetchSourceContext(true, new String[]{"datasets.tags"}, null)));
|
NestedQueryBuilder nestedQueryBuilder = QueryBuilders.nestedQuery("datasets", boolQuery, ScoreMode.Avg).innerHit(new InnerHitBuilder().setFetchSourceContext(new FetchSourceContext(true, new String[]{"datasets.tags"}, null)).setSize(this.environment.getProperty("elasticsearch.innerHitsSize", Integer.class)));
|
||||||
searchSourceBuilder.query(nestedQueryBuilder)/*.from(criteria.getOffset())*/.fetchSource("datasets.tags", null);
|
searchSourceBuilder.query(nestedQueryBuilder)/*.from(criteria.getOffset())*/.fetchSource("datasets.tags", null);
|
||||||
/*if (criteria.getSize() > 0) {
|
/*if (criteria.getSize() > 0) {
|
||||||
searchSourceBuilder.size(criteria.getSize());
|
searchSourceBuilder.size(criteria.getSize());
|
||||||
|
@ -206,7 +206,7 @@ public class DatasetRepository extends ElasticRepository<Dataset, DatasetCriteri
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NestedQueryBuilder nestedQueryBuilder = QueryBuilders.nestedQuery("datasets", boolQuery, ScoreMode.None).innerHit(new InnerHitBuilder().setFetchSourceContext(new FetchSourceContext(true, new String[]{"datasets.id"}, null)));
|
NestedQueryBuilder nestedQueryBuilder = QueryBuilders.nestedQuery("datasets", boolQuery, ScoreMode.None).innerHit(new InnerHitBuilder().setFetchSourceContext(new FetchSourceContext(true, new String[]{"datasets.id"}, null)).setSize(this.environment.getProperty("elasticsearch.innerHitsSize", Integer.class)));
|
||||||
searchSourceBuilder.query(nestedQueryBuilder)/*.from(criteria.getOffset()).size(criteria.getSize())*/.fetchSource("datasets.id", null);
|
searchSourceBuilder.query(nestedQueryBuilder)/*.from(criteria.getOffset()).size(criteria.getSize())*/.fetchSource("datasets.id", null);
|
||||||
sortBuilders.forEach(searchSourceBuilder::sort);
|
sortBuilders.forEach(searchSourceBuilder::sort);
|
||||||
searchRequest.source(searchSourceBuilder);
|
searchRequest.source(searchSourceBuilder);
|
||||||
|
|
|
@ -14,6 +14,7 @@ elasticsearch.port = 9200
|
||||||
elasticsearch.username=elastic
|
elasticsearch.username=elastic
|
||||||
elasticsearch.password=
|
elasticsearch.password=
|
||||||
elasticsearch.index=dmps
|
elasticsearch.index=dmps
|
||||||
|
elasticsearch.innerHitsSize=100
|
||||||
|
|
||||||
####################ELK OVERRIDES CONFIGURATIONS##########
|
####################ELK OVERRIDES CONFIGURATIONS##########
|
||||||
http-logger.server-address = http://localhost:31311
|
http-logger.server-address = http://localhost:31311
|
||||||
|
|
|
@ -14,6 +14,7 @@ elasticsearch.index=dmps
|
||||||
elasticsearch.usingssl=false
|
elasticsearch.usingssl=false
|
||||||
elasticsearch.certPath=
|
elasticsearch.certPath=
|
||||||
elasticsearch.certKey=
|
elasticsearch.certKey=
|
||||||
|
elasticsearch.innerHitsSize=100
|
||||||
|
|
||||||
####################ELK OVERRIDES CONFIGURATIONS##########
|
####################ELK OVERRIDES CONFIGURATIONS##########
|
||||||
#http-logger.server-address = http://logstash:31311
|
#http-logger.server-address = http://logstash:31311
|
||||||
|
|
|
@ -11,6 +11,7 @@ elasticsearch.port = 9200
|
||||||
elasticsearch.username=elastic
|
elasticsearch.username=elastic
|
||||||
elasticsearch.password=
|
elasticsearch.password=
|
||||||
elasticsearch.index=dmps
|
elasticsearch.index=dmps
|
||||||
|
elasticsearch.innerHitsSize=100
|
||||||
|
|
||||||
####################PDF OVERRIDES CONFIGURATIONS##########
|
####################PDF OVERRIDES CONFIGURATIONS##########
|
||||||
pdf.converter.url=http://docsbox-web/
|
pdf.converter.url=http://docsbox-web/
|
||||||
|
|
|
@ -46,6 +46,7 @@ elasticsearch.index=
|
||||||
elasticsearch.usingssl=false
|
elasticsearch.usingssl=false
|
||||||
elasticsearch.certPath=
|
elasticsearch.certPath=
|
||||||
elasticsearch.certKey=
|
elasticsearch.certKey=
|
||||||
|
elasticsearch.innerHitsSize=100
|
||||||
|
|
||||||
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
|
||||||
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
configuration.externalUrls=externalUrls/ExternalUrls.xml
|
||||||
|
|
Loading…
Reference in New Issue