qs.copyTo(qsPerGroup); qsPerGroup.query = new Query(); qsPerGroup.query.booleanClauses = new ArrayList<>(2);
qs.copyTo(spec);
qs.copyTo(spec);
@Override public void handleGet(Operation get) { QuerySpecification clonedSpec = new QuerySpecification(); // shallow copy specification this.spec.copyTo(clonedSpec); QueryTask task = QueryTask.create(clonedSpec); task.documentKind = KIND; task.documentSelfLink = this.documentSelfLink; task.documentExpirationTimeMicros = this.documentExpirationTimeMicros; task.taskInfo.stage = TaskStage.CREATED; task.taskInfo.isDirect = true; task.indexLink = this.indexLink; task.nodeSelectorLink = this.nodeSelectorPath; // the client can supply a URI parameter to modify the result limit. This // only affects the current GET operation and not the page service itself and any // future GETs from other clients. The generated nextPageLink, for this GET, will // of course be different than other operations with the original limit Integer limit = UriUtils.getODataLimitParamValue(get.getUri()); if (limit != null) { task.querySpec.resultLimit = limit; } forwardToLucene(task, get); }
@Override public void handleGet(Operation get) { QuerySpecification clonedSpec = new QuerySpecification(); // shallow copy specification this.spec.copyTo(clonedSpec); QueryTask task = QueryTask.create(clonedSpec); task.documentKind = KIND; task.documentSelfLink = this.documentSelfLink; task.documentExpirationTimeMicros = this.documentExpirationTimeMicros; task.taskInfo.stage = TaskStage.CREATED; task.taskInfo.isDirect = true; task.indexLink = this.indexLink; task.nodeSelectorLink = this.nodeSelectorPath; // the client can supply a URI parameter to modify the result limit. This // only affects the current GET operation and not the page service itself and any // future GETs from other clients. The generated nextPageLink, for this GET, will // of course be different than other operations with the original limit Integer limit = UriUtils.getODataLimitParamValue(get.getUri()); if (limit != null) { task.querySpec.resultLimit = limit; } forwardToPostgres(task, get); }