Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.0/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.1/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.2/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1872,9 +1872,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.4/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.5/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.6/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.0.7/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.1.1/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.1.3/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down
26 changes: 23 additions & 3 deletions content/riak/kv/2.1.4/developing/usage/secondary-indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1873,9 +1873,29 @@ The result:
It is also possible to stream results:

```java
/*
It is not currently possible to stream results using the Java client
*/
// Available in Riak Java Client 2.1.0 and later
int pollTimeoutMS = 200;
Namespace ns = new Namespace("indexes", "tweets");
String indexName = "hashtags";

BinIndexQuery indexQuery =
new BinIndexQuery.Builder(ns, indexName, "ri", "ru").build();

final RiakFuture<BinIndexQuery.StreamingResponse, BinIndexQuery> streamingFuture =
client.executeAsyncStreaming(indexQuery, pollTimeoutMS);

// For streaming commands, the future's value will be available before
// the future is complete, so you may begin to pull results from the
// provided iterator as soon as possible.
final BinIndexQuery.StreamingResponse streamingResponse = streamingFuture.get();

for (BinIndexQuery.Response.Entry e : streamingResponse)
{
// Do something with key...
}

streamingFuture.await();
Assert.assertTrue(streamingFuture.isDone());
```

```ruby
Expand Down