Riak Search Production Configuration

Nirav Shah niravishah at yahoo.com
Thu Feb 5 15:18:32 EST 2015


Hi Luc,Thanks for the response. 
Here are the steps i performed on my application start up. I am using the default bucket type in my application

1. Create Custom Schema
         String schema = Source.fromInputStream(inputStream, "UTF-8").mkString(); (inputStream comes from a                 schema file that i read)                YokozunaSchema yokozunaSchema = new YokozunaSchema("test", schema.toString());        StoreSchema storeSchema = new StoreSchema.Builder(yokozunaSchema).build();        riakClient.execute(storeSchema);

2. Post creation of Schema 
    I created Index for my Object based on the required fields as mentioned in the Riak Search docs  and other fields     as mapped to my object. I have only few fields set to be Indexed and Stored from my object as i only want to     search on them 
        YokozunaIndex yokozunaIndex = new YokozunaIndex("test_idx", "test");        StoreIndex storeIndex = new StoreIndex.Builder(yokozunaIndex).build();        riakClient.execute(storeIndex);

3. Set Bucket Properties 
    I than associate my bucket to the Index as part of the same application start up. Before i attach Index to my     bucket, i verify if it has already been attached using a Fetch        StoreBucketProperties sbp =                new StoreBucketProperties.Builder(namespace)                        .withAllowMulti(false)                        .withLastWriteWins(true)                        .withSearchIndex("test_idx")                        .build();        riakClient.execute(sbp);
                            
Regards,Nirav                                                
      From: Luc Perkins <lperkins at basho.com>
 To: Nirav Shah <niravishah at yahoo.com> 
Cc: Shawn Debnath <shawn at debnath.net>; "riak-users at lists.basho.com" <riak-users at lists.basho.com> 
 Sent: Thursday, February 5, 2015 11:04 AM
 Subject: Re: Riak Search Production Configuration
   
Nirav,
Could you possibly detail the steps you used to upload the schema, adjust the bucket properties, etc.? That would help us identify the issue.
Luc
On Thu, Feb 5, 2015 at 9:42 AM, Nirav Shah <niravishah at yahoo.com> wrote:



Hi Shawn,Thanks for the response. To give you some background
1. We are using custom schema with default bucket type2. I have the search set to on:)3. I have associated BucketProperties/Index to my buckets..4. What i am seeing is, i am getting data back, but for some reason i am not getting the entire set. When i query RIAK i see the data, however when i query the solr indexes, its missing that data. At this point, i don't know what can cause this  and am looking for people who might have faced similar issues.
My default config is just changing search=on in riak.conf, changed the JVM settings in riak.conf for Solr. 

Would appreciate any pointers and best practice around settings for Riak Search and AAE in production cluster that i should add that folks have running in production cluster. 


Regards,Nirav

      From: Shawn Debnath <shawn at debnath.net>
 To: Nirav Shah <niravishah at yahoo.com>; "riak-users at lists.basho.com" <riak-users at lists.basho.com> 
 Sent: Thursday, February 5, 2015 9:13 AM
 Subject: Re: Riak Search Production Configuration
   
Hi Nirav,
About your last point. Just yesterday I started playing with Search 2.0 (solr) and riak. Basho did a good job at integrating the solr platform but docs are sometimes misleading. One thing I found out was the using the default schema provided by Basho, if you are using CRDTs, your fields are suffixed with _register, _counter, _set. This link (http://docs.basho.com/riak/latest/dev/search/search-data-types/) has a good set of examples but best is to experiment. I ended up diving into the data dir of solar and grep’ed for parts of my field names to figure out what it actually was. When running queries, solr/riak will not let you know that fields are incorrect, it just doesn’t have any data for those so it returns no search results.
Good luck.
Shawn
PS. Be sure to have search=on in riak.conf :)


On 2/5/15, 7:34 AM, "Nirav Shah" <niravishah at yahoo.com> wrote:

Hi All,Just wanted to check what kind of configuration settings does everyone use in production clustered environment for Riak Search/AAE and if someone can share some experience over it? We currently have a 2g memory allocated to Solr and are currently just using the default parameters from riak.conf.  
What we have seen so far is that there is data in RIAK but somehow, Solr/Riak search does not return it. I am trying to find out what can cause this and am i missing some kind of configuration settings. 


Any response would be appreciated.  

Regards,Nirav


   
_______________________________________________
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/20150205/af7004ca/attachment-0002.html>


More information about the riak-users mailing list