
com.basho.riak.client.api.commands.mapreduce.SearchMapReduce Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of riak-client Show documentation
Show all versions of riak-client Show documentation
HttpClient-based client for Riak
package com.basho.riak.client.api.commands.mapreduce;
public class SearchMapReduce extends MapReduce
{
protected SearchMapReduce(SearchInput input, Builder builder)
{
super(input, builder);
}
public static class Builder extends MapReduce.Builder
{
private String index;
private String query;
@Override
protected Builder self()
{
return this;
}
public Builder withIndex(String index)
{
this.index = index;
return this;
}
public Builder withQuery(String query)
{
this.query = query;
return this;
}
public SearchMapReduce build()
{
if (index == null)
{
throw new IllegalStateException("An index must be specified");
}
if (query == null)
{
throw new IllegalStateException("A query must be specified");
}
return new SearchMapReduce(new SearchInput(index, query), this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy