Merge branch stable-2.12 into stable-2.13
* stable-2.12: Print proper name for QuerySource tasks in show-queue command Change-Id: I45cd82e26bcd07249d3dc4dede97874fa71c8d6c
This commit is contained in:
@@ -252,7 +252,7 @@ public class LuceneChangeIndex implements ChangeIndex {
|
|||||||
if (!Sets.intersection(statuses, CLOSED_STATUSES).isEmpty()) {
|
if (!Sets.intersection(statuses, CLOSED_STATUSES).isEmpty()) {
|
||||||
indexes.add(closedIndex);
|
indexes.add(closedIndex);
|
||||||
}
|
}
|
||||||
return new QuerySource(indexes, queryBuilder.toQuery(p), opts, getSort());
|
return new QuerySource(indexes, p, opts, getSort());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -274,14 +274,19 @@ public class LuceneChangeIndex implements ChangeIndex {
|
|||||||
|
|
||||||
private class QuerySource implements ChangeDataSource {
|
private class QuerySource implements ChangeDataSource {
|
||||||
private final List<ChangeSubIndex> indexes;
|
private final List<ChangeSubIndex> indexes;
|
||||||
|
private final Predicate<ChangeData> predicate;
|
||||||
private final Query query;
|
private final Query query;
|
||||||
private final QueryOptions opts;
|
private final QueryOptions opts;
|
||||||
private final Sort sort;
|
private final Sort sort;
|
||||||
|
|
||||||
private QuerySource(List<ChangeSubIndex> indexes, Query query, QueryOptions opts,
|
|
||||||
Sort sort) {
|
private QuerySource(List<ChangeSubIndex> indexes,
|
||||||
|
Predicate<ChangeData> predicate, QueryOptions opts, Sort sort)
|
||||||
|
throws QueryParseException {
|
||||||
this.indexes = indexes;
|
this.indexes = indexes;
|
||||||
this.query = checkNotNull(query, "null query from Lucene");
|
this.predicate = predicate;
|
||||||
|
this.query = checkNotNull(queryBuilder.toQuery(predicate),
|
||||||
|
"null query from Lucene");
|
||||||
this.opts = opts;
|
this.opts = opts;
|
||||||
this.sort = sort;
|
this.sort = sort;
|
||||||
}
|
}
|
||||||
@@ -298,7 +303,7 @@ public class LuceneChangeIndex implements ChangeIndex {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return query.toString();
|
return predicate.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -315,6 +320,11 @@ public class LuceneChangeIndex implements ChangeIndex {
|
|||||||
public List<Document> call() throws IOException {
|
public List<Document> call() throws IOException {
|
||||||
return doRead(fields);
|
return doRead(fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return predicate.toString();
|
||||||
|
}
|
||||||
}), fields);
|
}), fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user