Original Pull Request #2516
Closes #2515
This commit is contained in:
Peter-Josef Meisch 2023-04-03 20:20:13 +02:00 committed by GitHub
parent a5fb7a3c76
commit ed1c416cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -226,7 +226,7 @@ public class BaseQuery implements Query {
}
/**
* Set Ids for a multi-get request with on this query.
* Set Ids for a multi-get request run with this query. Not used in any other searches.
*
* @param ids list of id values
*/
@ -255,7 +255,7 @@ public class BaseQuery implements Query {
}
/**
* Set Ids with routing values for a multi-get request set on this query.
* Set Ids with routing values for a multi-get request run with this query. Not used in any other searches.
*
* @param idsWithRouting list of id values, must not be {@literal null}
* @since 4.3

View File

@ -250,6 +250,11 @@ public abstract class BaseQueryBuilder<Q extends BaseQuery, SELF extends BaseQue
return self();
}
/**
* Set Ids for a multi-get request run with this query. Not used in any other searches.
*
* @param ids list of id values
*/
public SELF withIds(String... ids) {
this.ids.clear();
@ -257,6 +262,11 @@ public abstract class BaseQueryBuilder<Q extends BaseQuery, SELF extends BaseQue
return self();
}
/**
* Set Ids for a multi-get request run with this query. Not used in any other searches.
*
* @param ids list of id values
*/
public SELF withIds(Collection<String> ids) {
Assert.notNull(ids, "ids must not be null");
@ -372,6 +382,12 @@ public abstract class BaseQueryBuilder<Q extends BaseQuery, SELF extends BaseQue
return self();
}
/**
* Set Ids with routing values for a multi-get request run with this query. Not used in any other searches.
*
* @param idsWithRouting list of id values, must not be {@literal null}
* @since 4.3
*/
public SELF withIdsWithRouting(List<Query.IdWithRouting> idsWithRouting) {
Assert.notNull(idsWithRouting, "idsWithRouting must not be null");