RiakSearch with java-client

Santi Kumar santi at veradocs.com
Wed Dec 17 11:57:04 EST 2014


I wiped out the data folder yesterday Luke, so I didn't have those log
files. I'll try that Storing the schema with the above code and send you
the stack

Thanks
Santi

On Wed, Dec 17, 2014 at 9:58 PM, Luke Bakken <lbakken at basho.com> wrote:
>
> Santi,
>
> The code you provided looks correct which is why I'm hoping that you
> can get an error message out of a log file.
>
> Another test would be to use HTTP to upload your schema and create the
> index. We may get more information that way.
>
> Uploading a schema via HTTP:
> http://docs.basho.com/riak/latest/dev/advanced/search-schema/
> Creating an index via HTTP:
> http://docs.basho.com/riak/latest/dev/using/search/#Simple-Setup
> --
> Luke Bakken
> Engineer / CSE
> lbakken at basho.com
>
>
> On Wed, Dec 17, 2014 at 8:17 AM, Santi Kumar <santi at veradocs.com> wrote:
> > Hi Luke,
> > Yes I couldn't capture it. Looks like the message that was sent to Riak
> has
> > wrong format, so it's relate to Message. I am not able to recollect now.
> It
> > displayed the complete message.
> >
> > If you can help me out with the the right way of using the Java Client
> api
> > that would be great. When I use StoreSchema with the schema content as
> the
> > string, this is happening. Is there any elegant way?
> >
> > Appreciate your help Luke
> >
> > Thanks
> > Santi
> >
> > On Wed, Dec 17, 2014 at 8:37 PM, Luke Bakken <lbakken at basho.com> wrote:
> >>
> >> 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
> >> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20141217/0a30d9f0/attachment.html>


More information about the riak-users mailing list