RiakSearch with java-client

Luke Bakken lbakken at basho.com
Wed Dec 17 10:07:22 EST 2014


Hi Santi,

Do you have any error in your Riak log files? They'll be located in
/var/log/riak or dev*/log (if you're using a devrel). In particular,
look in the solr.log file.
--
Luke Bakken
Engineer / CSE
lbakken at basho.com


On Mon, Dec 15, 2014 at 2:08 AM, Santi Kumar <santi at veradocs.com> wrote:
> 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
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>




More information about the riak-users mailing list