Hi
I'm tying to use Riak Search 2.0 with java client. Couldn't find any good
documentation around that so I'm trying on my own. I've created my own
custom schema and want to setup this to my index. While executing the
StoreSchema command, was getting below error with some message bits.
com.basho.riak.client.core.netty.RiakResponseException: Error processing
incoming message: error:function_clause:xxxxxxx
Here is how I'm adding the Custom schema and adding index. Let me know If
I'm doing something wrong
public static void buildSearchIndex(String bucketName,String indexName)
throws Exception{
InputStream systemResourceAsStream =
ClassLoader.getSystemResourceAsStream("./veradocs-solr-schema.xml");
String schema = IOUtils.toString(systemResourceAsStream,"UTF-8");
RiakClient client = RiakClientUtil.getClient();
YokozunaSchema yschema = new YokozunaSchema("veradocs-rs", schema);
StoreSchema storeSchemaOp = new StoreSchema.Builder(yschema).build();
client.execute(storeSchemaOp);
YokozunaIndex vdIndex = new YokozunaIndex(indexName,schema);
StoreIndex storeIndex =
new StoreIndex.Builder(vdIndex).build();
client.execute(storeIndex);
Namespace catsBucket = new Namespace(bucketName);
StoreBucketProperties storeBucketProps = new
StoreBucketProperties.Builder(catsBucket)
.withSearchIndex(indexName)
.build();
RiakFuture<Void,Namespace> executeAsync = client.executeAsync(
storeBucketProps);
executeAsync.get();
}
Thanks
Santi
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com