Class IndexResponse
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.response.documents.IndexResponse
-
- All Implemented Interfaces:
ErrorableResponse,Iterable<IndexResult>
public class IndexResponse extends Object implements Iterable<IndexResult>, ErrorableResponse
-
-
Constructor Summary
Constructors Constructor Description IndexResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)voidforEach(Consumer<? super IndexResult> action)List<IndexResult>getDocuments()The results of the index operationList<IndexResult>getErrors()Gets a List of IndexResults that have an errorSet<String>getIds()Get a set containing all the ids returned by the index requestinthashCode()booleanisError()Checks if any of the results contain an error during document indexingIterator<IndexResult>iterator()IndexResponsesetDocuments(List<IndexResult> documents)The results of the index operationSpliterator<IndexResult>spliterator()StringtoString()
-
-
-
Method Detail
-
iterator
@NotNull public Iterator<IndexResult> iterator()
- Specified by:
iteratorin interfaceIterable<IndexResult>
-
spliterator
public Spliterator<IndexResult> spliterator()
- Specified by:
spliteratorin interfaceIterable<IndexResult>
-
forEach
public void forEach(Consumer<? super IndexResult> action)
- Specified by:
forEachin interfaceIterable<IndexResult>
-
isError
public boolean isError()
Checks if any of the results contain an error during document indexing- Specified by:
isErrorin interfaceErrorableResponse- Returns:
- true if there is an IndexResult with an error, otherwise false
-
getErrors
public List<IndexResult> getErrors()
Gets a List of IndexResults that have an error- Returns:
- A list of IndexResult objects that have an error
-
getIds
public Set<String> getIds()
Get a set containing all the ids returned by the index request- Returns:
- The ids from the IndexResult objects
-
getDocuments
public List<IndexResult> getDocuments()
The results of the index operation- Returns:
- the results
-
setDocuments
public IndexResponse setDocuments(List<IndexResult> documents)
The results of the index operation- Parameters:
documents- the results- Returns:
this.
-
-