riak 2.0 pre11.1 doesn't start

2014-03-17 Thread Buri Arslon
Hi guys!

./riak start is giving me "wait_for_erlang" error. I had added a detailed
info here: https://github.com/basho/riak/issues/512

any hints?

thanks,
Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riak 2.0 pre11.1 doesn't start

2014-03-17 Thread Buri Arslon
Thanks, Michael.

I checked ports and made sure they were free. I even rebooted my server to
start from clean. Didn't help.


On Mon, Mar 17, 2014 at 3:07 PM, Michael Dillon
wrote:

> Best way to do a quick check to see if Riak started OK is to run
>
> netstat -lnp
>
> and see if something is listening on the Riak ports like 8089 or whatever
> you have changed it too. If something is listening, then the PID that is
> doing it is listed. Kill that PID and you have killed Riak and can start it
> normally.
>
> Of course it is better to use the normal way for starting and stopping
> Riak, and never use the -9 option on kill.
>
> Also, you really should be looking at log files to figure out problems.
> There are several in /var/log/riak
>
> Actually, now that I think about it, you probably cannot run riak console
> if riak is already running. Either start riak using "riak console" INSTEAD
> OF riak start, or use riak attach to connect to an already running one. But
> the messages that have already been displayed will not reappear. Look in
> the logs.
>
>
>
> On Mon, Mar 17, 2014 at 1:58 PM, Buri Arslon  wrote:
>
>> Hi guys!
>>
>> ./riak start is giving me "wait_for_erlang" error. I had added a detailed
>> info here: https://github.com/basho/riak/issues/512
>>
>> any hints?
>>
>> thanks,
>> Buriwoy
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
>
> --
> PageFreezer.com
> #200 - 311 Water Street
> Vancouver,  BC  V6B 1B8
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riak 2.0 pre11.1 doesn't start

2014-03-17 Thread Buri Arslon
Thanks, Seth.

No, I don't think there is something in my system that is using the same
port. I rebooted and checked ips and all riak default ports were free. I
started the old riak just to test. I stopped id and cleaned beam.smp, epmd,
etc.

I didn't change anything in the configs. After installing riak with "make
rel", I ran './rel/riak/bin/riak start' command.

I had downloaded the source from basho.com. Maybe I need to use github one?

thanks,
Buriwoy


On Mon, Mar 17, 2014 at 4:16 PM, Seth Thomas  wrote:

> Is there something else on the network trying to operate with the same
> name/IP? If you'd like I'm happy to look at the vm.args and app.config but
> I'm of the mind that there is something else in the environment that
> causing this error. That is to say I don't agree with the assertion this is
> 2.0 specific. In the GitHub issue it was mentioned that there is an older
> version in play - is this other ring running while you're firing up 2.0?
>
> Perhaps getting more information about the environment might help to
> figure out why you're encountering this error.
>
> On March 17, 2014 at 14:50:10, Buri Arslon (buri...@gmail.com) wrote:
>
> Thanks, Michael.
>
> I checked ports and made sure they were free. I even rebooted my server to
> start from clean. Didn't help.
>
>
> On Mon, Mar 17, 2014 at 3:07 PM, Michael Dillon <
> mdillon...@pagefreezer.com> wrote:
>
>> Best way to do a quick check to see if Riak started OK is to run
>>
>> netstat -lnp
>>
>> and see if something is listening on the Riak ports like 8089 or whatever
>> you have changed it too. If something is listening, then the PID that is
>> doing it is listed. Kill that PID and you have killed Riak and can start it
>> normally.
>>
>> Of course it is better to use the normal way for starting and stopping
>> Riak, and never use the -9 option on kill.
>>
>> Also, you really should be looking at log files to figure out problems.
>> There are several in /var/log/riak
>>
>> Actually, now that I think about it, you probably cannot run riak console
>> if riak is already running. Either start riak using "riak console" INSTEAD
>> OF riak start, or use riak attach to connect to an already running one. But
>> the messages that have already been displayed will not reappear. Look in
>> the logs.
>>
>>
>>
>>  On Mon, Mar 17, 2014 at 1:58 PM, Buri Arslon  wrote:
>>
>>>  Hi guys!
>>>
>>> ./riak start is giving me "wait_for_erlang" error. I had added a
>>> detailed info here: https://github.com/basho/riak/issues/512
>>>
>>> any hints?
>>>
>>> thanks,
>>> Buriwoy
>>>
>>>  ___
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>>
>> --
>>  PageFreezer.com
>> #200 - 311 Water Street
>> Vancouver,  BC  V6B 1B8
>>
>
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riak 2.0 pre11.1 doesn't start

2014-03-17 Thread Buri Arslon
Thanks guys! I was able to start the last build (riak-2.0.0pre15)


On Mon, Mar 17, 2014 at 4:56 PM, Seth Thomas  wrote:

> I'd try using an updated build and let us know if it's still an issue. My
> hunch is that it'll still be the same issue if in fact there is some Erlang
> VM local or remote holding onto that name/IP. If you want to ping me
> directly with the configuration directory (etc) contents, logs, and OS
> version specifics I'll see if I can reproduce.
>
> On March 17, 2014 at 15:36:25, Buri Arslon (buri...@gmail.com) wrote:
>
> Thanks, Seth.
>
> No, I don't think there is something in my system that is using the same
> port. I rebooted and checked ips and all riak default ports were free. I
> started the old riak just to test. I stopped id and cleaned beam.smp, epmd,
> etc.
>
> I didn't change anything in the configs. After installing riak with "make
> rel", I ran './rel/riak/bin/riak start' command.
>
> I had downloaded the source from basho.com. Maybe I need to use github
> one?
>
> thanks,
> Buriwoy
>
>
> On Mon, Mar 17, 2014 at 4:16 PM, Seth Thomas  wrote:
>
>>  Is there something else on the network trying to operate with the same
>> name/IP? If you'd like I'm happy to look at the vm.args and app.config but
>> I'm of the mind that there is something else in the environment that
>> causing this error. That is to say I don't agree with the assertion this is
>> 2.0 specific. In the GitHub issue it was mentioned that there is an older
>> version in play - is this other ring running while you're firing up 2.0?
>>
>>  Perhaps getting more information about the environment might help to
>> figure out why you're encountering this error.
>>
>> On March 17, 2014 at 14:50:10, Buri Arslon (buri...@gmail.com) wrote:
>>
>>  Thanks, Michael.
>>
>> I checked ports and made sure they were free. I even rebooted my server
>> to start from clean. Didn't help.
>>
>>
>> On Mon, Mar 17, 2014 at 3:07 PM, Michael Dillon <
>> mdillon...@pagefreezer.com> wrote:
>>
>>> Best way to do a quick check to see if Riak started OK is to run
>>>
>>> netstat -lnp
>>>
>>> and see if something is listening on the Riak ports like 8089 or
>>> whatever you have changed it too. If something is listening, then the PID
>>> that is doing it is listed. Kill that PID and you have killed Riak and can
>>> start it normally.
>>>
>>> Of course it is better to use the normal way for starting and stopping
>>> Riak, and never use the -9 option on kill.
>>>
>>> Also, you really should be looking at log files to figure out problems.
>>> There are several in /var/log/riak
>>>
>>> Actually, now that I think about it, you probably cannot run riak
>>> console if riak is already running. Either start riak using "riak console"
>>> INSTEAD OF riak start, or use riak attach to connect to an already running
>>> one. But the messages that have already been displayed will not reappear.
>>> Look in the logs.
>>>
>>>
>>>
>>>  On Mon, Mar 17, 2014 at 1:58 PM, Buri Arslon  wrote:
>>>
>>>>  Hi guys!
>>>>
>>>> ./riak start is giving me "wait_for_erlang" error. I had added a
>>>> detailed info here: https://github.com/basho/riak/issues/512
>>>>
>>>> any hints?
>>>>
>>>> thanks,
>>>> Buriwoy
>>>>
>>>>  ___
>>>> riak-users mailing list
>>>> riak-users@lists.basho.com
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>
>>>>
>>>
>>>
>>> --
>>>  PageFreezer.com
>>> #200 - 311 Water Street
>>> Vancouver,  BC  V6B 1B8
>>>
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Any docs on Yokozuna with erlang client?

2014-03-20 Thread Buri Arslon
Hi guys!

In yokozuna github page, I see only http examples. Do you have any docs for
erlang client?

thanks,
Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Any docs on Yokozuna with erlang client?

2014-03-20 Thread Buri Arslon
Thanks, Hector! Somehow, I missed that.


On Thu, Mar 20, 2014 at 11:44 AM, Hector Castro  wrote:

> Hey Buri,
>
> The snippets in our search documentation [0] have tabs for different
> languages (Ruby, Python, Erlang, etc).
>
> --
> Hector
>
> [0] http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
>
> On Thu, Mar 20, 2014 at 10:28 AM, Buri Arslon  wrote:
> > Hi guys!
> >
> > In yokozuna github page, I see only http examples. Do you have any docs
> for
> > erlang client?
> >
> > thanks,
> > Buriwoy
> >
> > ___
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> >
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


riak 2.0 erlang client issue

2014-03-21 Thread Buri Arslon
Hi guys!

I'm playing with Riak 2.0 pre15. I also updated riakc-erlang-client to the
latest. I'm getting an error. Any hints? Thanks!


ERROR:

---

(main@abc)5> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).

{ok,<0.255.0>}

(main@abc)6> riakc_pb_socket:ping(Pid).


=ERROR REPORT 21-Mar-2014::14:37:40 ===

** Generic server <0.255.0> terminating

** Last message in was {req,rpbpingreq,6}

** When Server state == {state,"127.0.0.1",8087,false,false,#Port<0.7205>,

   false,gen_tcp,undefined,

   {[],[]},

   1,[],infinity,undefined,undefined,undefined,

   undefined,[],100}

** Reason for termination ==

** {'module could not be loaded',

   [{riak_pb_messages,msg_code,[rpbpingreq],[]},

{riak_pb_codec,encode,1,[{file,"src/riak_pb_codec.erl"},{line,73}]},

{riakc_pb_socket,encode_request_message,1,

[{file,"src/riakc_pb_socket.erl"},{line,2094}]},

{riakc_pb_socket,send_request,2,

[{file,"src/riakc_pb_socket.erl"},{line,2077}]},

{riakc_pb_socket,handle_call,3,

[{file,"src/riakc_pb_socket.erl"},{line,1258}]},

{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},

{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}


=CRASH REPORT 21-Mar-2014::14:37:40 ===

  crasher:

initial call: riakc_pb_socket:init/1

pid: <0.255.0>

registered_name: []

exception exit: {undef,

[{riak_pb_messages,msg_code,[rpbpingreq],[]},

 {riak_pb_codec,encode,1,

 [{file,"src/riak_pb_codec.erl"},{line,73}]},

 {riakc_pb_socket,encode_request_message,1,


[{file,"src/riakc_pb_socket.erl"},{line,2094}]},

 {riakc_pb_socket,send_request,2,


[{file,"src/riakc_pb_socket.erl"},{line,2077}]},

 {riakc_pb_socket,handle_call,3,


[{file,"src/riakc_pb_socket.erl"},{line,1258}]},

 {gen_server,handle_msg,5,

 [{file,"gen_server.erl"},{line,585}]},

 {proc_lib,init_p_do_apply,3,

 [{file,"proc_lib.erl"},{line,239}]}]}

  in function  gen_server:terminate/6 (gen_server.erl, line 744)

ancestors: [<0.252.0>]

messages: []

links: [<0.252.0>,#Port<0.7205>]

dictionary: []

trap_exit: false

status: running

heap_size: 987

stack_size: 27

reductions: 540

  neighbours:

neighbour: [{pid,<0.252.0>},

  {registered_name,[]},

  {initial_call,{erlang,apply,2}},

  {current_function,{gen,do_call,4}},

  {ancestors,[]},

  {messages,[]},

  {links,[<0.33.0>,<0.255.0>]},

  {dictionary,[]},

  {trap_exit,false},

  {status,waiting},

  {heap_size,233},

  {stack_size,36},

  {reductions,1895}]

** exception exit: undef

 in function  riak_pb_messages:msg_code/1

called as riak_pb_messages:msg_code(rpbpingreq)

 in call from riak_pb_codec:encode/1 (src/riak_pb_codec.erl, line 73)

 in call from riakc_pb_socket:encode_request_message/1
(src/riakc_pb_socket.erl, line 2094)

 in call from riakc_pb_socket:send_request/2 (src/riakc_pb_socket.erl,
line 2077)

 in call from riakc_pb_socket:handle_call/3 (src/riakc_pb_socket.erl,
line 1258)

 in call from gen_server:handle_msg/5 (gen_server.erl, line 585)

 in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 239)
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riak 2.0 erlang client issue

2014-03-21 Thread Buri Arslon
Thanks, Sean!

It was because riak_pb wasn't installed correctly. My server is a vanilla
Ubuntu 12.04. I had to install these packages to build riak_bf:

protobuf > 2.5.0
python-setuptools
maven2

After building it, riak started working.

One note: even riak_pb says BUILD SUCCESSFUL, it ended with error. I'm not
sure if it is only my server related or not:

[INFO] Installing
com/basho/riak/protobuf/riak-pb/2.0.0.12-SNAPSHOT/riak-pb-2.0.0.12-SNAPSHOT.jar

[INFO] Writing OBR metadata

[INFO]


[INFO] BUILD SUCCESSFUL

[INFO]


[INFO] Total time: 56 seconds

[INFO] Finished at: Fri Mar 21 19:56:41 UTC 2014

[INFO] Final Memory: 37M/96M

[INFO]


==> C (compile)

make: *** [PROTOC-exists] Error 1







On Fri, Mar 21, 2014 at 8:58 AM, Sean Cribbs  wrote:

> Buri,
>
> riak_pb_messages is a module generated by rebar at build time. Do you have
> the latest riak_pb dependency? How did you build the client?
>
>
> On Fri, Mar 21, 2014 at 9:44 AM, Buri Arslon  wrote:
>
>> Hi guys!
>>
>> I'm playing with Riak 2.0 pre15. I also updated riakc-erlang-client to
>> the latest. I'm getting an error. Any hints? Thanks!
>>
>>
>> ERROR:
>>
>> ---
>>
>> (main@abc)5> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).
>>
>> {ok,<0.255.0>}
>>
>> (main@abc)6> riakc_pb_socket:ping(Pid).
>>
>>
>> =ERROR REPORT 21-Mar-2014::14:37:40 ===
>>
>> ** Generic server <0.255.0> terminating
>>
>> ** Last message in was {req,rpbpingreq,6}
>>
>> ** When Server state == {state,"127.0.0.1",8087,false,false,#Port<0.7205>,
>>
>>false,gen_tcp,undefined,
>>
>>{[],[]},
>>
>>
>> 1,[],infinity,undefined,undefined,undefined,
>>
>>undefined,[],100}
>>
>> ** Reason for termination ==
>>
>> ** {'module could not be loaded',
>>
>>[{riak_pb_messages,msg_code,[rpbpingreq],[]},
>>
>>
>> {riak_pb_codec,encode,1,[{file,"src/riak_pb_codec.erl"},{line,73}]},
>>
>> {riakc_pb_socket,encode_request_message,1,
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,2094}]},
>>
>> {riakc_pb_socket,send_request,2,
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,2077}]},
>>
>> {riakc_pb_socket,handle_call,3,
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,1258}]},
>>
>> {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
>>
>> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
>>
>>
>> =CRASH REPORT 21-Mar-2014::14:37:40 ===
>>
>>   crasher:
>>
>> initial call: riakc_pb_socket:init/1
>>
>> pid: <0.255.0>
>>
>> registered_name: []
>>
>> exception exit: {undef,
>>
>> [{riak_pb_messages,msg_code,[rpbpingreq],[]},
>>
>>  {riak_pb_codec,encode,1,
>>
>>  [{file,"src/riak_pb_codec.erl"},{line,73}]},
>>
>>  {riakc_pb_socket,encode_request_message,1,
>>
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,2094}]},
>>
>>  {riakc_pb_socket,send_request,2,
>>
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,2077}]},
>>
>>  {riakc_pb_socket,handle_call,3,
>>
>>
>> [{file,"src/riakc_pb_socket.erl"},{line,1258}]},
>>
>>  {gen_server,handle_msg,5,
>>
>>  [{file,"gen_server.erl"},{line,585}]},
>>
>>  {proc_lib,init_p_do_apply,3,
>>
>>  [{file,"proc_lib.erl"},{line,239}]}]}
>>
>>   in function  gen_server:terminate/6 (gen_server.erl, line 744)
>>
>> ancestors: [<0.252.0>]
>>
>> messages: []
>>
>> links: [<0.252.0>,#Port<0.7205>]
>>
>> dictionary: []
>>
>> trap_exit: false
>>
>> status: running
>>
>> heap_size: 987
&g

Riak 2.0 Solr schema directory

2014-03-21 Thread Buri Arslon
Hi guys!

Where does Riak store solr schemas (xml files)? I can't find in the docs:

http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/


Thanks,
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 Solr schema directory

2014-03-21 Thread Buri Arslon
I mean, where do I store my custom schemas?


On Fri, Mar 21, 2014 at 4:20 PM, Buri Arslon  wrote:

> Hi guys!
>
> Where does Riak store solr schemas (xml files)? I can't find in the docs:
>
> http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
> http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/
>
>
> Thanks,
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 Solr schema directory

2014-03-21 Thread Buri Arslon
I found this:

./lib/yokozuna-v0.14.0-41-gf1fd688/priv/default_schema.xml

is that the right directory to store custom schemas?


On Fri, Mar 21, 2014 at 4:26 PM, Buri Arslon  wrote:

> I mean, where do I store my custom schemas?
>
>
> On Fri, Mar 21, 2014 at 4:20 PM, Buri Arslon  wrote:
>
>> Hi guys!
>>
>> Where does Riak store solr schemas (xml files)? I can't find in the docs:
>>
>> http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
>> http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/
>>
>>
>> Thanks,
>> -- Buriwoy
>>
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 Solr schema directory

2014-03-21 Thread Buri Arslon
Thanks, Luke!


On Fri, Mar 21, 2014 at 6:04 PM, Luke Bakken  wrote:

> Hi Buri,
>
> You upload your XML schema file via an HTTP PUT request:
>
> curl -XPUT -iH 'Content-Type: application/xml' '
> http://localhost:8098/search/schema/my-test-schema' --data-binary
> @my-test-schema.xml
>
> Then, you can associate the schema with an index:
>
> curl -XPUT -iH 'Content-Type: application/json'
> http://localhost:8098/search/index/my-test-index -d
> '{"schema":"my-test-schema"}'
>
> --
> Luke Bakken
> CSE
> lbak...@basho.com
>
>
> On Fri, Mar 21, 2014 at 3:58 PM, Buri Arslon  wrote:
>
>> I found this:
>>
>> ./lib/yokozuna-v0.14.0-41-gf1fd688/priv/default_schema.xml
>>
>> is that the right directory to store custom schemas?
>>
>>
>> On Fri, Mar 21, 2014 at 4:26 PM, Buri Arslon  wrote:
>>
>>> I mean, where do I store my custom schemas?
>>>
>>>
>>> On Fri, Mar 21, 2014 at 4:20 PM, Buri Arslon  wrote:
>>>
>>>> Hi guys!
>>>>
>>>> Where does Riak store solr schemas (xml files)? I can't find in the
>>>> docs:
>>>>
>>>> http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
>>>> http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/
>>>>
>>>>
>>>> Thanks,
>>>> -- Buriwoy
>>>>
>>>
>>>
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 Solr schema directory

2014-03-21 Thread Buri Arslon
is riakc_pb_socket:create_search_schema/3/4 erlang way of adding custom
schemas to Riak?


On Fri, Mar 21, 2014 at 11:05 PM, Buri Arslon  wrote:

> Thanks, Luke!
>
>
> On Fri, Mar 21, 2014 at 6:04 PM, Luke Bakken  wrote:
>
>> Hi Buri,
>>
>> You upload your XML schema file via an HTTP PUT request:
>>
>> curl -XPUT -iH 'Content-Type: application/xml' '
>> http://localhost:8098/search/schema/my-test-schema' --data-binary
>> @my-test-schema.xml
>>
>> Then, you can associate the schema with an index:
>>
>> curl -XPUT -iH 'Content-Type: application/json'
>> http://localhost:8098/search/index/my-test-index -d
>> '{"schema":"my-test-schema"}'
>>
>> --
>> Luke Bakken
>> CSE
>> lbak...@basho.com
>>
>>
>> On Fri, Mar 21, 2014 at 3:58 PM, Buri Arslon  wrote:
>>
>>> I found this:
>>>
>>> ./lib/yokozuna-v0.14.0-41-gf1fd688/priv/default_schema.xml
>>>
>>> is that the right directory to store custom schemas?
>>>
>>>
>>> On Fri, Mar 21, 2014 at 4:26 PM, Buri Arslon  wrote:
>>>
>>>> I mean, where do I store my custom schemas?
>>>>
>>>>
>>>> On Fri, Mar 21, 2014 at 4:20 PM, Buri Arslon  wrote:
>>>>
>>>>> Hi guys!
>>>>>
>>>>> Where does Riak store solr schemas (xml files)? I can't find in the
>>>>> docs:
>>>>>
>>>>> http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
>>>>> http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/
>>>>>
>>>>>
>>>>> Thanks,
>>>>> -- Buriwoy
>>>>>
>>>>
>>>>
>>>
>>> ___
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 Solr schema directory

2014-03-22 Thread Buri Arslon
Thanks!


On Sat, Mar 22, 2014 at 10:25 AM, Eric Redmond  wrote:

> Yes
> On Mar 21, 2014 10:24 PM, "Buri Arslon"  wrote:
>
>> is riakc_pb_socket:create_search_schema/3/4 erlang way of adding custom
>> schemas to Riak?
>>
>>
>> On Fri, Mar 21, 2014 at 11:05 PM, Buri Arslon  wrote:
>>
>>> Thanks, Luke!
>>>
>>>
>>> On Fri, Mar 21, 2014 at 6:04 PM, Luke Bakken  wrote:
>>>
>>>> Hi Buri,
>>>>
>>>> You upload your XML schema file via an HTTP PUT request:
>>>>
>>>> curl -XPUT -iH 'Content-Type: application/xml' '
>>>> http://localhost:8098/search/schema/my-test-schema' --data-binary
>>>> @my-test-schema.xml
>>>>
>>>> Then, you can associate the schema with an index:
>>>>
>>>> curl -XPUT -iH 'Content-Type: application/json'
>>>> http://localhost:8098/search/index/my-test-index -d
>>>> '{"schema":"my-test-schema"}'
>>>>
>>>> --
>>>> Luke Bakken
>>>> CSE
>>>> lbak...@basho.com
>>>>
>>>>
>>>> On Fri, Mar 21, 2014 at 3:58 PM, Buri Arslon  wrote:
>>>>
>>>>> I found this:
>>>>>
>>>>> ./lib/yokozuna-v0.14.0-41-gf1fd688/priv/default_schema.xml
>>>>>
>>>>> is that the right directory to store custom schemas?
>>>>>
>>>>>
>>>>> On Fri, Mar 21, 2014 at 4:26 PM, Buri Arslon wrote:
>>>>>
>>>>>> I mean, where do I store my custom schemas?
>>>>>>
>>>>>>
>>>>>> On Fri, Mar 21, 2014 at 4:20 PM, Buri Arslon wrote:
>>>>>>
>>>>>>> Hi guys!
>>>>>>>
>>>>>>> Where does Riak store solr schemas (xml files)? I can't find in the
>>>>>>> docs:
>>>>>>>
>>>>>>> http://docs.basho.com/riak/2.0.0pre11/dev/using/search/
>>>>>>> http://docs.basho.com/riak/2.0.0pre11/dev/advanced/search-schema/
>>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>> -- Buriwoy
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> ___
>>>>> riak-users mailing list
>>>>> riak-users@lists.basho.com
>>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>>
>>>>>
>>>>
>>>
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Search Index Not Found

2014-03-22 Thread Buri Arslon
Hi guys!

lkkI added custom schema and search index via erlang client.
riakc_pb_socket:list_search_indexes is giving this result:

{ok,[[{index,<<"business">>},

  {schema,<<"business">>},

  {n_val,3}]]}


But "get_search_index" is returning error:

{error,<<"notfound">>}


What am I doing wrong?


Thanks,

-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Search Index Not Found

2014-03-22 Thread Buri Arslon
another weird thing I noticed is that after I restart riak,
get_search_index returns {ok, Index}, but after a few seconds, it's going
back to {error, "notfound"}


On Sat, Mar 22, 2014 at 12:39 PM, Buri Arslon  wrote:

> Hi guys!
>
> lkkI added custom schema and search index via erlang client.
> riakc_pb_socket:list_search_indexes is giving this result:
>
> {ok,[[{index,<<"business">>},
>
>   {schema,<<"business">>},
>
>   {n_val,3}]]}
>
>
> But "get_search_index" is returning error:
>
> {error,<<"notfound">>}
>
>
> What am I doing wrong?
>
>
> Thanks,
>
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Search Index Not Found

2014-03-22 Thread Buri Arslon
thanks, Ryan!

yes, it was because an error in my solr schema. After correcting error, it
is working.


On Sat, Mar 22, 2014 at 2:06 PM, Ryan Zezeski  wrote:

>
> On Sat, Mar 22, 2014 at 2:57 PM, Buri Arslon  wrote:
>
>> another weird thing I noticed is that after I restart riak,
>> get_search_index returns {ok, Index}, but after a few seconds, it's going
>> back to {error, "notfound"}
>>
>>
> Do you see any errors related to that index in the solr.log file?
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


How to update custom solr schema?

2014-03-22 Thread Buri Arslon
Hey guys!

I modified my custom schema and tried these steps to update it in the riak:

1. Empty buckets
2. run "create_search_schema"
3. run "create_search_index"
4. stop and start riak

But it didn't work. Solr isn't picking up the new schema. What am I missing
here?


thanks,
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: How to update custom solr schema?

2014-03-22 Thread Buri Arslon
Never mind. Got some hints from here:
https://github.com/basho/yokozuna/issues/130


On Sat, Mar 22, 2014 at 10:15 PM, Buri Arslon  wrote:

> Hey guys!
>
> I modified my custom schema and tried these steps to update it in the riak:
>
> 1. Empty buckets
> 2. run "create_search_schema"
> 3. run "create_search_index"
> 4. stop and start riak
>
> But it didn't work. Solr isn't picking up the new schema. What am I
> missing here?
>
>
> thanks,
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


how to set eDisMax? Solr start and rows not working properly

2014-04-20 Thread Buri Arslon
Hi guys!

I searched the docs and the source code but wasn't able to find any info
about using edismax.

I have 2 questions:

1. How to set edismax parser?

2. Why are "start" and "rows" not working properly?

I have 4 records in riak bucket:

   B
   C
   A
   D


{sort, <<"field asc">>} returns correctly sorted records (A,B,C,D).

But [{sort, <<"field asc">>},{start,0},{rows,2}] is returning (C,D) while
I'm expecting (A,B).

Maybe I'm doing something wrong. Any hints?


Thanks,
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: how to set eDisMax? Solr start and rows not working properly

2014-04-23 Thread Buri Arslon
In solr schema, I can set defType (=edismax). Is it the only place I need
to modify to enable edismax?


On Sun, Apr 20, 2014 at 7:57 AM, Buri Arslon  wrote:

> Hi guys!
>
> I searched the docs and the source code but wasn't able to find any info
> about using edismax.
>
> I have 2 questions:
>
> 1. How to set edismax parser?
>
> 2. Why are "start" and "rows" not working properly?
>
> I have 4 records in riak bucket:
>
>B
>C
>A
>D
>
>
> {sort, <<"field asc">>} returns correctly sorted records (A,B,C,D).
>
> But [{sort, <<"field asc">>},{start,0},{rows,2}] is returning (C,D) while
> I'm expecting (A,B).
>
> Maybe I'm doing something wrong. Any hints?
>
>
> Thanks,
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: how to set eDisMax? Solr start and rows not working properly

2014-04-28 Thread Buri Arslon
I still wonder why offset limit doesn't work properly.


On Wed, Apr 23, 2014 at 8:31 AM, Buri Arslon  wrote:

> In solr schema, I can set defType (=edismax). Is it the only place I need
> to modify to enable edismax?
>
>
> On Sun, Apr 20, 2014 at 7:57 AM, Buri Arslon  wrote:
>
>> Hi guys!
>>
>> I searched the docs and the source code but wasn't able to find any info
>> about using edismax.
>>
>> I have 2 questions:
>>
>> 1. How to set edismax parser?
>>
>> 2. Why are "start" and "rows" not working properly?
>>
>> I have 4 records in riak bucket:
>>
>>B
>>C
>>A
>>D
>>
>>
>> {sort, <<"field asc">>} returns correctly sorted records (A,B,C,D).
>>
>> But [{sort, <<"field asc">>},{start,0},{rows,2}] is returning (C,D) while
>> I'm expecting (A,B).
>>
>> Maybe I'm doing something wrong. Any hints?
>>
>>
>> Thanks,
>> -- Buriwoy
>>
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: how to set eDisMax? Solr start and rows not working properly

2014-05-01 Thread Buri Arslon
Thanks!


On Thu, May 1, 2014 at 9:07 AM, Ryan Zezeski  wrote:

>
>
>
> On Sun, Apr 20, 2014 at 9:57 AM, Buri Arslon  wrote:
>
>> Hi guys!
>>
>> I searched the docs and the source code but wasn't able to find any info
>> about using edismax.
>>
>> I have 2 questions:
>>
>> 1. How to set edismax parser?
>>
>
> You can make use of LocalParams syntax in order to use different query
> parsers. For example:
>
> <<"{!edismax}my query">>
>
> http://wiki.apache.org/solr/QueryParser
> http://wiki.apache.org/solr/LocalParams
>
>
>>
>> 2. Why are "start" and "rows" not working properly?
>>
>
> I'll get back to your sort question when I have a chance to verify on
> my side.
>
> -Z
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: how to set eDisMax? Solr start and rows not working properly

2014-05-02 Thread Buri Arslon
btw, my riak version is: riak-riak-2.0.0pre15


On Thu, May 1, 2014 at 9:15 AM, Buri Arslon  wrote:

> Thanks!
>
>
> On Thu, May 1, 2014 at 9:07 AM, Ryan Zezeski  wrote:
>
>>
>>
>>
>> On Sun, Apr 20, 2014 at 9:57 AM, Buri Arslon  wrote:
>>
>>> Hi guys!
>>>
>>> I searched the docs and the source code but wasn't able to find any info
>>> about using edismax.
>>>
>>> I have 2 questions:
>>>
>>> 1. How to set edismax parser?
>>>
>>
>> You can make use of LocalParams syntax in order to use different query
>> parsers. For example:
>>
>> <<"{!edismax}my query">>
>>
>> http://wiki.apache.org/solr/QueryParser
>> http://wiki.apache.org/solr/LocalParams
>>
>>
>>>
>>> 2. Why are "start" and "rows" not working properly?
>>>
>>
>> I'll get back to your sort question when I have a chance to verify on
>> my side.
>>
>> -Z
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Riak 2.0 search isn't returning "stored=true" fields

2014-05-02 Thread Buri Arslon
I have a bucket type with custom index (schema). When I search, riak is
retuning correct results but there is no stored fields in the result.

I had another bucket type with custom search index, it's returning all
stored solr fields. But I forgot how I added this bucket type.

Do I need to add something to "props" to be able to retrieve all stored
fields with search results?


thanks,
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak 2.0 search isn't returning "stored=true" fields

2014-05-03 Thread Buri Arslon
Found it. The reason was I had created an index without a schema:

 iriak:create_search_index(<<"index_name">>).

but it should be created with custom schema:

 iriak:create_search_index(<<"index_name">>,<<"schema_name">>).




On Fri, May 2, 2014 at 4:53 PM, Buri Arslon  wrote:

> I have a bucket type with custom index (schema). When I search, riak is
> retuning correct results but there is no stored fields in the result.
>
> I had another bucket type with custom search index, it's returning all
> stored solr fields. But I forgot how I added this bucket type.
>
> Do I need to add something to "props" to be able to retrieve all stored
> fields with search results?
>
>
> thanks,
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: how to set eDisMax? Solr start and rows not working properly

2014-05-03 Thread Buri Arslon
Sorry, it was a mistake in my erlang code. Riak is awesome!


On Fri, May 2, 2014 at 8:14 AM, Buri Arslon  wrote:

> btw, my riak version is: riak-riak-2.0.0pre15
>
>
> On Thu, May 1, 2014 at 9:15 AM, Buri Arslon  wrote:
>
>> Thanks!
>>
>>
>> On Thu, May 1, 2014 at 9:07 AM, Ryan Zezeski  wrote:
>>
>>>
>>>
>>>
>>> On Sun, Apr 20, 2014 at 9:57 AM, Buri Arslon  wrote:
>>>
>>>> Hi guys!
>>>>
>>>> I searched the docs and the source code but wasn't able to find any
>>>> info about using edismax.
>>>>
>>>> I have 2 questions:
>>>>
>>>> 1. How to set edismax parser?
>>>>
>>>
>>> You can make use of LocalParams syntax in order to use different query
>>> parsers. For example:
>>>
>>> <<"{!edismax}my query">>
>>>
>>> http://wiki.apache.org/solr/QueryParser
>>> http://wiki.apache.org/solr/LocalParams
>>>
>>>
>>>>
>>>> 2. Why are "start" and "rows" not working properly?
>>>>
>>>
>>> I'll get back to your sort question when I have a chance to verify on
>>> my side.
>>>
>>> -Z
>>>
>>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


riakc_pb_socket:ping(Pid). giving error

2012-03-01 Thread Buri Arslon
Hi,

I'm using riak with erlang client and haproxy. start_link/2 was successful
but get_server_info is giving an error.

http://dpaste.com/709996/

I googled but wasn't able to find any solution. Any ideas?

Thanks,
Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: riakc_pb_socket:ping(Pid). giving error

2012-03-01 Thread Buri Arslon
Oh, never mind. It was haproxy config problem. Thanks!

On Thu, Mar 1, 2012 at 9:39 AM, Buri Arslon  wrote:

> Hi,
>
> I'm using riak with erlang client and haproxy. start_link/2 was successful
> but get_server_info is giving an error.
>
> http://dpaste.com/709996/
>
> I googled but wasn't able to find any solution. Any ideas?
>
> Thanks,
> Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Unicode String problem

2012-03-04 Thread Buri Arslon
Hi everybody!

I can't put unicode string to riak. I was following the riak-erlang-client
docs, and this doesn't work:

  Object = riakc_obj:new(<<"snippet">>, <<"odam">>, <<"Одамлардан тинглаб
хикоя">>).
 ** exception error: bad argument

I googled but couldn't find anything meaningful about this issue. So, I'd
be very grateful if someone could refer me
to relevant documentation or give me some hints to solve the problem.

Thanks!
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Unicode String problem

2012-03-06 Thread Buri Arslon
Hi Igor,

Actually, utf8 value converted by unicode:characters_to_binary() was
successfully processed by riak. So:

  >Object = riakc_obj:new(<<"snippet">>, undefined,
unicode:characters_to_binary("одамлардан тинглаб хикоя")).
  >riakc_pb_socket:put(Pid, Object)

was accepted.

Thanks,
-- Buriwoy

On Mon, Mar 5, 2012 at 11:25 PM, Igor Karymov  wrote:

> You can't use unicode expression this way from console.
> Try the same expression writen in the erlang module.
>
> 2012/3/5 Steve Vinoski 
>
>>
>>
>> On Sun, Mar 4, 2012 at 4:51 PM, Buri Arslon  wrote:
>>
>>> Hi everybody!
>>>
>>> I can't put unicode string to riak. I was following the
>>> riak-erlang-client docs, and this doesn't work:
>>>
>>>   Object = riakc_obj:new(<<"snippet">>, <<"odam">>, <<"Одамлардан
>>> тинглаб хикоя">>).
>>>  ** exception error: bad argument
>>>
>>> I googled but couldn't find anything meaningful about this issue. So,
>>> I'd be very grateful if someone could refer me
>>> to relevant documentation or give me some hints to solve the problem.
>>>
>>
>> Have a look at the Erlang unicode module:
>>
>> http://www.erlang.org/doc/man/unicode.html
>>
>> You probably need to use unicode:characters_to_binary to generate a valid
>> binary for the value you're trying to store in riak.
>>
>> --steve
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Blog riak design

2012-03-06 Thread Buri Arslon
Hi,

I'm very new to NoSQL/KV database systems. Sean's webinar "Schema Design
for Riak" http://vimeo.com/17604126 gave me some idea about how to move to
kv database, but I feel I need some more advice/docs to fully grasp this
new concept for me.

I was thinking about developing a blog application using Riak. Which schema
would be most effective for that kind of application (regular blog: content
+ comments):

  bucket_blogs -> blog content;
  bucket_blogs_comments -> comments for the blogs in the bucket_blogs

or,

  bucket_blogs -> JSON("blog": <>, "comments": <>)?

 The second option seems less effective if number of comments grow
significantly. But I'm not sure. Any hints? Ideas?

Thanks!
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Blog riak design

2012-03-07 Thread Buri Arslon
I have another crazy idea :) What if I create a bucket for each blog's
comments? So, riak/blog_bucket/blog_01 and comments go to
riak/blog_01_comments?

Any ideas?
-- Buriwoy

On Tue, Mar 6, 2012 at 10:07 AM, Buri Arslon  wrote:

> Hi,
>
> I'm very new to NoSQL/KV database systems. Sean's webinar "Schema Design
> for Riak" http://vimeo.com/17604126 gave me some idea about how to move
> to kv database, but I feel I need some more advice/docs to fully grasp this
> new concept for me.
>
> I was thinking about developing a blog application using Riak. Which
> schema would be most effective for that kind of application (regular blog:
> content + comments):
>
>   bucket_blogs -> blog content;
>   bucket_blogs_comments -> comments for the blogs in the bucket_blogs
>
> or,
>
>   bucket_blogs -> JSON("blog": <>, "comments": <>)?
>
>  The second option seems less effective if number of comments grow
> significantly. But I'm not sure. Any hints? Ideas?
>
> Thanks!
> -- Buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Blog riak design

2012-03-07 Thread Buri Arslon
Thanks, Jeff:

I really appreciate your answer. The second option (separate buckets) looks
more effective for my pet project as I hope each post will have a lot of
comments.

Thanks again,
-- Buriwoy

On Wed, Mar 7, 2012 at 10:41 AM, Jeff Kirkell wrote:

> Buriwoy,
>
> I apologize in advance as I tend to write daily long replies. You have a
> couple options and I can provide some of the insight I have learned up till
> now but confusing answer is you can do both of what you wrote.
>
> You can have a bucket which is just called posts that also contains the
> comments or threads of comments (bad example as this could nest) like so
>
> {data : "'name':'My Blog Post', 'detail':'my long blog post information',
> 'comments': [{'from': 'someone', text:'test'}], {'from': 'someone else',
> 'text': 'more comments'} "}
>
> As long as you can format it, you can store it. In talking with people
> that deal with large amounts of data who are general NoSQL experts
> (Cassandra which is also a Dynamo derivative) they strongly push to not
> keep relationships in the same object. I will say that it really depends on
> what you are trying to do since, if you just have simple data, it is fine.
>
> The better approach is to have a separate bucket called "posts" and
> another called "comments" You can then use secondary indexes as an option
> to link the two together. Basically, you take the unique identifier of the
> post object and you make it a index header so you can get the comments
> based on the post object. With the comments bucket, I would probably just
> store the chain of comments together so if someone replies the a comment,
> all that goes into the actual comment's object instead of having to manage
> some form of hierarchy data.
>
> At the end of the day I basically built a solution that uses both of your
> original options at the same time.
>
> Hopefully that provides some insight into the flexibility.
>
> Jeff
>
> On Wed, Mar 7, 2012 at 12:03 PM, Buri Arslon  wrote:
>
>> I have another crazy idea :) What if I create a bucket for each blog's
>> comments? So, riak/blog_bucket/blog_01 and comments go to
>> riak/blog_01_comments?
>>
>> Any ideas?
>> -- Buriwoy
>>
>> On Tue, Mar 6, 2012 at 10:07 AM, Buri Arslon  wrote:
>>
>>> Hi,
>>>
>>> I'm very new to NoSQL/KV database systems. Sean's webinar "Schema Design
>>> for Riak" http://vimeo.com/17604126 gave me some idea about how to move
>>> to kv database, but I feel I need some more advice/docs to fully grasp this
>>> new concept for me.
>>>
>>> I was thinking about developing a blog application using Riak. Which
>>> schema would be most effective for that kind of application (regular blog:
>>> content + comments):
>>>
>>>   bucket_blogs -> blog content;
>>>   bucket_blogs_comments -> comments for the blogs in the bucket_blogs
>>>
>>> or,
>>>
>>>   bucket_blogs -> JSON("blog": <>, "comments":
>>> <>)?
>>>
>>>  The second option seems less effective if number of comments grow
>>> significantly. But I'm not sure. Any hints? Ideas?
>>>
>>> Thanks!
>>> -- Buriwoy
>>>
>>
>>
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Can't find docs/tutorial on secondary indexes for riak-erlang-client

2012-03-11 Thread Buri Arslon
Hi everybody,

I can't find any tutorial or docs on secondary indexes. Here (
http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-October/005952.html)
it was stated that the docs would be updated but I can't find it.

I just wanted a doc which explains how to use secondary indexes with native
erlang client. Riak docs have examples for http api but not for erlang
client.

Can anyone refer me to appropriate docs/tutorials?

Thanks,
-- Buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Can't find docs/tutorial on secondary indexes for riak-erlang-client

2012-03-11 Thread Buri Arslon
Thanks for your reply Jeremiah!

I guess I am "greener" than you :)

Before posting to the list, I looked through riak documentation, the list.
I did find some postings on the subject but almost all of'em were questions
than answers. The answers I could find were so ambiguous that I wasn't able
to use them.

I've tried riakc_obj:update_metadata but got this error:
http://dpaste.com/715011/

So, I hoped to find a working example. I'm too new to Erlang to read the
source and solve my problems.

Thanks again,
-- Buriwoy

On Sun, Mar 11, 2012 at 12:46 PM, Jeremiah Peschka <
jeremiah.pesc...@gmail.com> wrote:

> Howdy Buri,
>
> I'm not an Erlang expert, or even something remotely resembling competent
> with Erlang, however, I believe I have tracked down what you're looking for.
>
> You can use one of the riakc_pb_socket:get_index functions to pull back
> data from an index. If you look at the source on the methods, you'll see
> that they're just wrappers around a MapReduce call. As far as setting the
> values... I think you'll have to make a call to riakc_obj:update_metadata
> and add the index metadata in by hand, but I could be wrong on that one.
>
> If I'm wrong, hopefully someone on the list will correct my Erlang-y
> ignorance.
>
> get_index/4 [1]
> get_index/5 [3]
> get_index/6 [2]
> get_index/7 [4]
>
>
>
> [1]:
> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L677
> [2]:
> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L695
> [3]:
> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L714
> [4]:
> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L732
> ---
> Jeremiah Peschka - Managing Director, Brent Ozar PLF, LLC
> Microsoft SQL Server MVP
>
> On Mar 11, 2012, at 11:06 AM, Buri Arslon wrote:
>
> > Hi everybody,
> >
> > I can't find any tutorial or docs on secondary indexes. Here (
> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-October/005952.html)
> it was stated that the docs would be updated but I can't find it.
> >
> > I just wanted a doc which explains how to use secondary indexes with
> native erlang client. Riak docs have examples for http api but not for
> erlang client.
> >
> > Can anyone refer me to appropriate docs/tutorials?
> >
> > Thanks,
> > -- Buriwoy
> > ___
> > riak-users mailing list
> > riak-users@lists.basho.com
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Can't find docs/tutorial on secondary indexes for riak-erlang-client

2012-03-11 Thread Buri Arslon
I have some clue how to add secondary index but data types are confusing
for me:

  > ObjNew = riakc_obj:new(<<"test_users">>, <<"adm">>, <<"My value">>).
  > Index = [ <<"field1_bin">>, <<"my_index">>].
  > Meta = dict:store(<<"index">>, Index, dict:new()).
  > ObjNewMeta = riakc_obj:update_metadata(ObjNew, Meta).
  > riakc_pb_socket:put(Pid, ObjNewMeta).
 ** exception exit: {noproc,
   {gen_server,call,
   [<0.124.0>,
{req,

{rpbputreq,<<"test_users">>,<<"adm">>,undefined,
{rpbcontent,<<"My
value">>,undefined,undefined,

undefined,undefined,undefined,undefined,undefined,undefined,
[{rpbpair,<<"field"...>>,[...]}]},

undefined,undefined,undefined,undefined,undefined,undefined,
undefined},
6},
infinity]}}
      in function  gen_server:call/3 (gen_server.erl, line 188)

So, I don't know what the problem is. I can only guess that index data type
may not be correct, but it's just guess.

Any ideas?
-- Buriwoy

On Sun, Mar 11, 2012 at 1:05 PM, Buri Arslon  wrote:

> Thanks for your reply Jeremiah!
>
> I guess I am "greener" than you :)
>
> Before posting to the list, I looked through riak documentation, the list.
> I did find some postings on the subject but almost all of'em were questions
> than answers. The answers I could find were so ambiguous that I wasn't able
> to use them.
>
> I've tried riakc_obj:update_metadata but got this error:
> http://dpaste.com/715011/
>
> So, I hoped to find a working example. I'm too new to Erlang to read the
> source and solve my problems.
>
> Thanks again,
> -- Buriwoy
>
>
> On Sun, Mar 11, 2012 at 12:46 PM, Jeremiah Peschka <
> jeremiah.pesc...@gmail.com> wrote:
>
>> Howdy Buri,
>>
>> I'm not an Erlang expert, or even something remotely resembling competent
>> with Erlang, however, I believe I have tracked down what you're looking for.
>>
>> You can use one of the riakc_pb_socket:get_index functions to pull back
>> data from an index. If you look at the source on the methods, you'll see
>> that they're just wrappers around a MapReduce call. As far as setting the
>> values... I think you'll have to make a call to riakc_obj:update_metadata
>> and add the index metadata in by hand, but I could be wrong on that one.
>>
>> If I'm wrong, hopefully someone on the list will correct my Erlang-y
>> ignorance.
>>
>> get_index/4 [1]
>> get_index/5 [3]
>> get_index/6 [2]
>> get_index/7 [4]
>>
>>
>>
>> [1]:
>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L677
>> [2]:
>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L695
>> [3]:
>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L714
>> [4]:
>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L732
>> ---
>> Jeremiah Peschka - Managing Director, Brent Ozar PLF, LLC
>> Microsoft SQL Server MVP
>>
>> On Mar 11, 2012, at 11:06 AM, Buri Arslon wrote:
>>
>> > Hi everybody,
>> >
>> > I can't find any tutorial or docs on secondary indexes. Here (
>> http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-October/005952.html)
>> it was stated that the docs would be updated but I can't find it.
>> >
>> > I just wanted a doc which explains how to use secondary indexes with
>> native erlang client. Riak docs have examples for http api but not for
>> erlang client.
>> >
>> > Can anyone refer me to appropriate docs/tutorials?
>> >
>> > Thanks,
>> > -- Buriwoy
>> > ___
>> > riak-users mailing list
>> > riak-users@lists.basho.com
>> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Can't find docs/tutorial on secondary indexes for riak-erlang-client

2012-03-11 Thread Buri Arslon
After several hours of searching, trying, getting errors ... finally I was
able to insert secondary index with riak-erlang-client. Here is the code
which I successfully ran:

  %% Set some vars
   {Bucket, Key, Index} = {<<"test_users">>, <<"aldarkusa">>, [{"qayerda_bin",
"Qozoqta"}]}.

   %% Connect to riak
   {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).

   %% Create a new riak object
   Obj = riakc_obj:new(Bucket, Key, <<"Yomonlarni aldap yurgan
Aldarkusa">>).

   %% Create a new metadata with secondary index
   Meta = dict:store(<<"index">>, Index, dict:new()).

   %% Update the object we've created before
   NewObj = riakc_obj:update_metadata(Obj, Meta).

   %% Finally, put/insert the updated new object
   riakc_pb_socket:put(Pid, NewObj).


I think Basho should update/improve the documentation. Examples in Links
page (http://wiki.basho.com/Links.html) gave me some clues how to update
metadata but the examples themselves were outdated.

Another idea is to allow users to post their examples (community content).

Regards,
-- Buriwoy

On Sun, Mar 11, 2012 at 4:14 PM, Buri Arslon  wrote:

> I have some clue how to add secondary index but data types are confusing
> for me:
>
>   > ObjNew = riakc_obj:new(<<"test_users">>, <<"adm">>, <<"My value">>).
>   > Index = [ <<"field1_bin">>, <<"my_index">>].
>   > Meta = dict:store(<<"index">>, Index, dict:new()).
>   > ObjNewMeta = riakc_obj:update_metadata(ObjNew, Meta).
>   > riakc_pb_socket:put(Pid, ObjNewMeta).
>  ** exception exit: {noproc,
>{gen_server,call,
>[<0.124.0>,
> {req,
>
> {rpbputreq,<<"test_users">>,<<"adm">>,undefined,
> {rpbcontent,<<"My
> value">>,undefined,undefined,
>
> undefined,undefined,undefined,undefined,undefined,undefined,
> [{rpbpair,<<"field"...>>,[...]}]},
>
> undefined,undefined,undefined,undefined,undefined,undefined,
> undefined},
> 6},
> infinity]}}
>   in function  gen_server:call/3 (gen_server.erl, line 188)
>
> So, I don't know what the problem is. I can only guess that index data
> type may not be correct, but it's just guess.
>
> Any ideas?
> -- Buriwoy
>
> On Sun, Mar 11, 2012 at 1:05 PM, Buri Arslon  wrote:
>
>> Thanks for your reply Jeremiah!
>>
>> I guess I am "greener" than you :)
>>
>> Before posting to the list, I looked through riak documentation, the
>> list. I did find some postings on the subject but almost all of'em were
>> questions than answers. The answers I could find were so ambiguous that I
>> wasn't able to use them.
>>
>> I've tried riakc_obj:update_metadata but got this error:
>> http://dpaste.com/715011/
>>
>> So, I hoped to find a working example. I'm too new to Erlang to read the
>> source and solve my problems.
>>
>> Thanks again,
>> -- Buriwoy
>>
>>
>> On Sun, Mar 11, 2012 at 12:46 PM, Jeremiah Peschka <
>> jeremiah.pesc...@gmail.com> wrote:
>>
>>> Howdy Buri,
>>>
>>> I'm not an Erlang expert, or even something remotely resembling
>>> competent with Erlang, however, I believe I have tracked down what you're
>>> looking for.
>>>
>>> You can use one of the riakc_pb_socket:get_index functions to pull back
>>> data from an index. If you look at the source on the methods, you'll see
>>> that they're just wrappers around a MapReduce call. As far as setting the
>>> values... I think you'll have to make a call to riakc_obj:update_metadata
>>> and add the index metadata in by hand, but I could be wrong on that one.
>>>
>>> If I'm wrong, hopefully someone on the list will correct my Erlang-y
>>> ignorance.
>>>
>>> get_index/4 [1]
>>> get_index/5 [3]
>>> get_index/6 [2]
>>> get_index/7 [4]
>>>
>>>
>>>
>>> [1]:
>>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L677
>>> [2]:
>>> https://github.com/basho/riak-erlang-client/blob/master/src/riakc_pb_socket.erl#L695
>>> [3]:
>>> https://github.co

Fwd: Can't find docs/tutorial on secondary indexes for riak-erlang-client

2012-03-11 Thread Buri Arslon
-- Forwarded message --
From: Buri Arslon 
Date: Sun, Mar 11, 2012 at 11:47 PM
Subject: Re: Can't find docs/tutorial on secondary indexes for
riak-erlang-client
To: Mark Phillips 


No problem, Mark. I've submitted a new issue.
https://github.com/basho/riak_wiki/issues/265

By the way, thanks for the awesome Riak!
-- buriwoy


On Sun, Mar 11, 2012 at 11:26 PM, Mark Phillips  wrote:

> Hi Buriwoy,
>
> Sorry for the hassle with the docs. Good to hear you're up and running. I
> scanned the thread really quickly and it didn't look like you mentioned
>
> http://wiki.basho.com/Secondary-Indexes.html
>
> Assuming you've seen them, can you take 15 minutes and put together your
> thoughts on how to improve them in a wiki issue [1]. It shouldn't take
> anyone nearly this long to get up and running with any component of Riak.
> Our fault. Appreciate your help with fixing it.
>
> Mark
>
> 1 - https://github.com/basho/riak_wiki/issues/new
>
> On Mar 11, 2012, at 18:48, Buri Arslon  wrote:
>
> After several hours of searching, trying, getting errors ... finally I was
> able to insert secondary index with riak-erlang-client. Here is the code
> which I successfully ran:
>
>   %% Set some vars
>{Bucket, Key, Index} = {<<"test_users">>, <<"aldarkusa">>, [{"qayerda_bin",
> "Qozoqta"}]}.
>
>%% Connect to riak
>{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).
>
>%% Create a new riak object
>Obj = riakc_obj:new(Bucket, Key, <<"Yomonlarni aldap yurgan
> Aldarkusa">>).
>
>%% Create a new metadata with secondary index
>Meta = dict:store(<<"index">>, Index, dict:new()).
>
>%% Update the object we've created before
>NewObj = riakc_obj:update_metadata(Obj, Meta).
>
>%% Finally, put/insert the updated new object
>riakc_pb_socket:put(Pid, NewObj).
>
>
> I think Basho should update/improve the documentation. Examples in Links
> page (http://wiki.basho.com/Links.html) gave me some clues how to update
> metadata but the examples themselves were outdated.
>
> Another idea is to allow users to post their examples (community content).
>
> Regards,
> -- Buriwoy
>
> On Sun, Mar 11, 2012 at 4:14 PM, Buri Arslon  wrote:
>
>> I have some clue how to add secondary index but data types are confusing
>> for me:
>>
>>   > ObjNew = riakc_obj:new(<<"test_users">>, <<"adm">>, <<"My value">>).
>>   > Index = [ <<"field1_bin">>, <<"my_index">>].
>>   > Meta = dict:store(<<"index">>, Index, dict:new()).
>>   > ObjNewMeta = riakc_obj:update_metadata(ObjNew, Meta).
>>   > riakc_pb_socket:put(Pid, ObjNewMeta).
>>  ** exception exit: {noproc,
>>{gen_server,call,
>>[<0.124.0>,
>> {req,
>>
>> {rpbputreq,<<"test_users">>,<<"adm">>,undefined,
>> {rpbcontent,<<"My
>> value">>,undefined,undefined,
>>
>> undefined,undefined,undefined,undefined,undefined,undefined,
>> [{rpbpair,<<"field"...>>,[...]}]},
>>
>> undefined,undefined,undefined,undefined,undefined,undefined,
>> undefined},
>> 6},
>> infinity]}}
>>   in function  gen_server:call/3 (gen_server.erl, line 188)
>>
>> So, I don't know what the problem is. I can only guess that index data
>> type may not be correct, but it's just guess.
>>
>> Any ideas?
>> -- Buriwoy
>>
>> On Sun, Mar 11, 2012 at 1:05 PM, Buri Arslon  wrote:
>>
>>> Thanks for your reply Jeremiah!
>>>
>>> I guess I am "greener" than you :)
>>>
>>> Before posting to the list, I looked through riak documentation, the
>>> list. I did find some postings on the subject but almost all of'em were
>>> questions than answers. The answers I could find were so ambiguous that I
>>> wasn't able to use them.
>>>
>>> I've tried riakc_obj:update_metadata but got this error:
>>> http://dpaste.com/715011/
>>>
>>> So, I hoped to find a working example. I'm too new to Erlang to read the
>>> source and solv

MapReduce: returned value can't be processed by riakc_obj:get_value

2012-03-27 Thread Buri Arslon
Hi everyone!

I was learning MapReduce in Riak and encountered some problems.

The map function that received Value wasn't able to process it by
riakc_obj:get_value. I checked the value and found out that it was not
proper riakc object.

riakc_obj:new() returns a tuple where first element is riakc_obj atom. But
the Value that the map function receives has 'r_object' atom.

What am I doing wrong? Are there any other built-in functions to process
the value in a map function?

Thanks!

-- buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: MapReduce: returned value can't be processed by riakc_obj:get_value

2012-03-27 Thread Buri Arslon
I think I got it :) I should use riak_object:get_value

Thanks anyway,
-- buriwoy

On Tue, Mar 27, 2012 at 4:38 PM, Buri Arslon  wrote:

> Hi everyone!
>
> I was learning MapReduce in Riak and encountered some problems.
>
> The map function that received Value wasn't able to process it by
> riakc_obj:get_value. I checked the value and found out that it was not
> proper riakc object.
>
> riakc_obj:new() returns a tuple where first element is riakc_obj atom. But
> the Value that the map function receives has 'r_object' atom.
>
> What am I doing wrong? Are there any other built-in functions to process
> the value in a map function?
>
> Thanks!
>
> -- buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Link or Secondary Indexes?

2012-03-29 Thread Buri Arslon
Hi,

While developing my pet project few questions came to my mind and I decided
to consult with you.

Which of them are more effective for recording relationships: Link or
Secondary Indexes?

1. Friend relationships: like Facebook friends?
2. Followed/follower relationships like in Twitter?
3. Member/Club relationship like fanpage in Facebook?
4. Like in Facebook?

Thanks,
-- buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Link or Secondary Indexes?

2012-03-29 Thread Buri Arslon
Kresten, Jeffrey: Thanks a lot for enlightenment!

This link was very helpful to understand what to use when.
http://wiki.basho.com/MapReduce-Search-2i-Comparison.html

The information I obtained pushed me to another question :) .

Q: Is it a good (or at least 'ok') practice to duplicate information in
order to get cheaper/faster queries?

i.e. If a user becomes a member of a group/fanpage I could store that
information both in 'users' and 'groups' bucket. If I want to get the
members of a particular group I query just one value/record in 'groups'
bucket. The only drawback that came to my mind is when you delete that
relationship you have to delete it from two buckets.

Another scenario might be to get last 20 comments by a user. Instead of
searching all posts/comments by author_name, I could just store the post or
comment key in the user object as a secondary index and set some limit,
say, 20 for <<"index">>, <<"last_posts_bin">>.

What do you think?

Thanks again,
-- buriwoy



On Thu, Mar 29, 2012 at 8:52 AM, Jeffrey Massung  wrote:

> Buriwoy,
>
> Neither is better (or worse) for "storing" those bits of information. The
> question is how you expect to use that data once it is stored. Let's take a
> look at friend relationships (note: I don't use Facebook, so I might be
> missing a subtle feature with this example)...
>
> Do you merely plan on following a list of friends to other pages quickly?
> For example, on your page, you see a list of your friends quickly, be able
> to click them, and go to their page? If so, the links are quite nice. Links
> are nice for being able to follow in a query as well. This is a good
> example of using links to perform link walking:
>
> http://basho.com/blog/technical/2010/02/24/link-walking-by-example/
>
> Or, do you plan on doing reverse lookups by friends? For example, do you
> want to say "find every who has Tony as a friend" and get a list of users?
> Note: this is not asking who is a friend of Tony (you'd just lookup Tony
> and get his list of friends). In this case 2i works nicely, as do other
> query methods: search, a general MapReduce, etc. But links would be an
> extremely poor choice.
>
> Does this help? This page might also be applicable to your question:
>
> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>
> If you plan on just doing MapReduce queries without 2i, and don't care
> about link walking, then just storing a typical JSON object and not using
> either is perfectly fine as well.
>
> --
> Jeffrey Massung
> Software Engineer
> j...@basho.com
>
> On Mar 29, 2012, at 8:29 AM, Buri Arslon wrote:
>
> Hi,
>
> While developing my pet project few questions came to my mind and I
> decided to consult with you.
>
> Which of them are more effective for recording relationships: Link or
> Secondary Indexes?
>
> 1. Friend relationships: like Facebook friends?
> 2. Followed/follower relationships like in Twitter?
> 3. Member/Club relationship like fanpage in Facebook?
> 4. Like in Facebook?
>
> Thanks,
> -- buriwoy
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Link or Secondary Indexes?

2012-03-29 Thread Buri Arslon
Thanks, Jeremiah. I didn't think about cache. I think cache is the way to
go in production.

-- buriwoy

On Thu, Mar 29, 2012 at 10:22 AM, Jeremiah Peschka <
jeremiah.pesc...@gmail.com> wrote:

> Cache everything you can, even if you're persisting that cache in the
> database. Data duplication is important when you want to make queries
> faster. Doing a simple GET is going to be much faster than a MapReduce.
>
> ---
> Jeremiah Peschka, Managing Director, Brent Ozar PLF, LLC
> Microsoft SQL Server MVP
>
> On Mar 29, 2012, at 8:51 AM, Buri Arslon  wrote:
>
> Kresten, Jeffrey: Thanks a lot for enlightenment!
>
> This link was very helpful to understand what to use when.
> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>
> The information I obtained pushed me to another question :) .
>
> Q: Is it a good (or at least 'ok') practice to duplicate information in
> order to get cheaper/faster queries?
>
> i.e. If a user becomes a member of a group/fanpage I could store that
> information both in 'users' and 'groups' bucket. If I want to get the
> members of a particular group I query just one value/record in 'groups'
> bucket. The only drawback that came to my mind is when you delete that
> relationship you have to delete it from two buckets.
>
> Another scenario might be to get last 20 comments by a user. Instead of
> searching all posts/comments by author_name, I could just store the post or
> comment key in the user object as a secondary index and set some limit,
> say, 20 for <<"index">>, <<"last_posts_bin">>.
>
> What do you think?
>
> Thanks again,
> -- buriwoy
>
>
>
> On Thu, Mar 29, 2012 at 8:52 AM, Jeffrey Massung  wrote:
>
>> Buriwoy,
>>
>> Neither is better (or worse) for "storing" those bits of information. The
>> question is how you expect to use that data once it is stored. Let's take a
>> look at friend relationships (note: I don't use Facebook, so I might be
>> missing a subtle feature with this example)...
>>
>> Do you merely plan on following a list of friends to other pages quickly?
>> For example, on your page, you see a list of your friends quickly, be able
>> to click them, and go to their page? If so, the links are quite nice. Links
>> are nice for being able to follow in a query as well. This is a good
>> example of using links to perform link walking:
>>
>> http://basho.com/blog/technical/2010/02/24/link-walking-by-example/
>>
>> Or, do you plan on doing reverse lookups by friends? For example, do you
>> want to say "find every who has Tony as a friend" and get a list of users?
>> Note: this is not asking who is a friend of Tony (you'd just lookup Tony
>> and get his list of friends). In this case 2i works nicely, as do other
>> query methods: search, a general MapReduce, etc. But links would be an
>> extremely poor choice.
>>
>> Does this help? This page might also be applicable to your question:
>>
>> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>>
>> If you plan on just doing MapReduce queries without 2i, and don't care
>> about link walking, then just storing a typical JSON object and not using
>> either is perfectly fine as well.
>>
>> --
>> Jeffrey Massung
>> Software Engineer
>> j...@basho.com
>>
>> On Mar 29, 2012, at 8:29 AM, Buri Arslon wrote:
>>
>> Hi,
>>
>> While developing my pet project few questions came to my mind and I
>> decided to consult with you.
>>
>> Which of them are more effective for recording relationships: Link or
>> Secondary Indexes?
>>
>> 1. Friend relationships: like Facebook friends?
>> 2. Followed/follower relationships like in Twitter?
>> 3. Member/Club relationship like fanpage in Facebook?
>> 4. Like in Facebook?
>>
>> Thanks,
>> -- buriwoy
>> ___
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>>
> ___
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Link or Secondary Indexes?

2012-03-29 Thread Buri Arslon
On Thu, Mar 29, 2012 at 1:21 PM, Buri Arslon  wrote:

> Thanks, Alexander. The metaphor was above my poor English, but I feel I
> got the point. :)
>
> -- buriwoy
>
>
> On Thu, Mar 29, 2012 at 1:03 PM, Alexander Sicular wrote:
>
>> Fat data is a dirty little secret amongst system architects. "nosql"
>> solutions are practically based on the concept. Denormalization leads to
>> data duplication all over the place. Disk is cheap. Like the kid at dunken
>> donuts handing munchkins out at closing time. Eat that shit up. Yes, you
>> might hate yourself the next day; there are costs to pay like
>> synchronizing/invalidation and everything is a tradeoff but often it is a
>> price worth paying... And munchkins are delicious.
>>
>> -alexander
>>
>> @siculars
>> http://siculars.posterous.com
>>
>> Sent from my rotary phone.
>> On Mar 29, 2012 11:51 AM, "Buri Arslon"  wrote:
>>
>>> Kresten, Jeffrey: Thanks a lot for enlightenment!
>>>
>>> This link was very helpful to understand what to use when.
>>> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>>>
>>> The information I obtained pushed me to another question :) .
>>>
>>> Q: Is it a good (or at least 'ok') practice to duplicate information in
>>> order to get cheaper/faster queries?
>>>
>>> i.e. If a user becomes a member of a group/fanpage I could store that
>>> information both in 'users' and 'groups' bucket. If I want to get the
>>> members of a particular group I query just one value/record in 'groups'
>>> bucket. The only drawback that came to my mind is when you delete that
>>> relationship you have to delete it from two buckets.
>>>
>>> Another scenario might be to get last 20 comments by a user. Instead of
>>> searching all posts/comments by author_name, I could just store the post or
>>> comment key in the user object as a secondary index and set some limit,
>>> say, 20 for <<"index">>, <<"last_posts_bin">>.
>>>
>>> What do you think?
>>>
>>> Thanks again,
>>> -- buriwoy
>>>
>>>
>>>
>>> On Thu, Mar 29, 2012 at 8:52 AM, Jeffrey Massung  wrote:
>>>
>>>> Buriwoy,
>>>>
>>>> Neither is better (or worse) for "storing" those bits of information.
>>>> The question is how you expect to use that data once it is stored. Let's
>>>> take a look at friend relationships (note: I don't use Facebook, so I might
>>>> be missing a subtle feature with this example)...
>>>>
>>>> Do you merely plan on following a list of friends to other pages
>>>> quickly? For example, on your page, you see a list of your friends quickly,
>>>> be able to click them, and go to their page? If so, the links are quite
>>>> nice. Links are nice for being able to follow in a query as well. This is a
>>>> good example of using links to perform link walking:
>>>>
>>>> http://basho.com/blog/technical/2010/02/24/link-walking-by-example/
>>>>
>>>> Or, do you plan on doing reverse lookups by friends? For example, do
>>>> you want to say "find every who has Tony as a friend" and get a list of
>>>> users? Note: this is not asking who is a friend of Tony (you'd just lookup
>>>> Tony and get his list of friends). In this case 2i works nicely, as do
>>>> other query methods: search, a general MapReduce, etc. But links would be
>>>> an extremely poor choice.
>>>>
>>>> Does this help? This page might also be applicable to your question:
>>>>
>>>> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>>>>
>>>> If you plan on just doing MapReduce queries without 2i, and don't care
>>>> about link walking, then just storing a typical JSON object and not using
>>>> either is perfectly fine as well.
>>>>
>>>> --
>>>> Jeffrey Massung
>>>> Software Engineer
>>>> j...@basho.com
>>>>
>>>> On Mar 29, 2012, at 8:29 AM, Buri Arslon wrote:
>>>>
>>>> Hi,
>>>>
>>>> While developing my pet project few questions came to my mind and I
>>>> decided to consult with you.
>>>>
>>>> Which of them are more effective for recording relationships: Link or
>>>> Secondary Indexes?
>>>>
>>>> 1. Friend relationships: like Facebook friends?
>>>> 2. Followed/follower relationships like in Twitter?
>>>> 3. Member/Club relationship like fanpage in Facebook?
>>>> 4. Like in Facebook?
>>>>
>>>> Thanks,
>>>> -- buriwoy
>>>> ___
>>>> riak-users mailing list
>>>> riak-users@lists.basho.com
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>
>>>>
>>>>
>>>
>>> ___
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Link or Secondary Indexes?

2012-03-29 Thread Buri Arslon
Oops! Accidentally send empty email :)

Thanks, Alexander. The metaphor was above my poor English, but I feel I got
the point. :)

-- buriwoy

On Thu, Mar 29, 2012 at 1:21 PM, Buri Arslon  wrote:

>
>
>
> On Thu, Mar 29, 2012 at 1:03 PM, Alexander Sicular wrote:
>
>> Fat data is a dirty little secret amongst system architects. "nosql"
>> solutions are practically based on the concept. Denormalization leads to
>> data duplication all over the place. Disk is cheap. Like the kid at dunken
>> donuts handing munchkins out at closing time. Eat that shit up. Yes, you
>> might hate yourself the next day; there are costs to pay like
>> synchronizing/invalidation and everything is a tradeoff but often it is a
>> price worth paying... And munchkins are delicious.
>>
>> -alexander
>>
>> @siculars
>> http://siculars.posterous.com
>>
>> Sent from my rotary phone.
>> On Mar 29, 2012 11:51 AM, "Buri Arslon"  wrote:
>>
>>> Kresten, Jeffrey: Thanks a lot for enlightenment!
>>>
>>> This link was very helpful to understand what to use when.
>>> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>>>
>>> The information I obtained pushed me to another question :) .
>>>
>>> Q: Is it a good (or at least 'ok') practice to duplicate information in
>>> order to get cheaper/faster queries?
>>>
>>> i.e. If a user becomes a member of a group/fanpage I could store that
>>> information both in 'users' and 'groups' bucket. If I want to get the
>>> members of a particular group I query just one value/record in 'groups'
>>> bucket. The only drawback that came to my mind is when you delete that
>>> relationship you have to delete it from two buckets.
>>>
>>> Another scenario might be to get last 20 comments by a user. Instead of
>>> searching all posts/comments by author_name, I could just store the post or
>>> comment key in the user object as a secondary index and set some limit,
>>> say, 20 for <<"index">>, <<"last_posts_bin">>.
>>>
>>> What do you think?
>>>
>>> Thanks again,
>>> -- buriwoy
>>>
>>>
>>>
>>> On Thu, Mar 29, 2012 at 8:52 AM, Jeffrey Massung  wrote:
>>>
>>>> Buriwoy,
>>>>
>>>> Neither is better (or worse) for "storing" those bits of information.
>>>> The question is how you expect to use that data once it is stored. Let's
>>>> take a look at friend relationships (note: I don't use Facebook, so I might
>>>> be missing a subtle feature with this example)...
>>>>
>>>> Do you merely plan on following a list of friends to other pages
>>>> quickly? For example, on your page, you see a list of your friends quickly,
>>>> be able to click them, and go to their page? If so, the links are quite
>>>> nice. Links are nice for being able to follow in a query as well. This is a
>>>> good example of using links to perform link walking:
>>>>
>>>> http://basho.com/blog/technical/2010/02/24/link-walking-by-example/
>>>>
>>>> Or, do you plan on doing reverse lookups by friends? For example, do
>>>> you want to say "find every who has Tony as a friend" and get a list of
>>>> users? Note: this is not asking who is a friend of Tony (you'd just lookup
>>>> Tony and get his list of friends). In this case 2i works nicely, as do
>>>> other query methods: search, a general MapReduce, etc. But links would be
>>>> an extremely poor choice.
>>>>
>>>> Does this help? This page might also be applicable to your question:
>>>>
>>>> http://wiki.basho.com/MapReduce-Search-2i-Comparison.html
>>>>
>>>> If you plan on just doing MapReduce queries without 2i, and don't care
>>>> about link walking, then just storing a typical JSON object and not using
>>>> either is perfectly fine as well.
>>>>
>>>> --
>>>> Jeffrey Massung
>>>> Software Engineer
>>>> j...@basho.com
>>>>
>>>> On Mar 29, 2012, at 8:29 AM, Buri Arslon wrote:
>>>>
>>>> Hi,
>>>>
>>>> While developing my pet project few questions came to my mind and I
>>>> decided to consult with you.
>>>>
>>>> Which of them are more effective for recording relationships: Link or
>>>> Secondary Indexes?
>>>>
>>>> 1. Friend relationships: like Facebook friends?
>>>> 2. Followed/follower relationships like in Twitter?
>>>> 3. Member/Club relationship like fanpage in Facebook?
>>>> 4. Like in Facebook?
>>>>
>>>> Thanks,
>>>> -- buriwoy
>>>> ___
>>>> riak-users mailing list
>>>> riak-users@lists.basho.com
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>
>>>>
>>>>
>>>
>>> ___
>>> riak-users mailing list
>>> riak-users@lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Riak Anomaly

2012-04-20 Thread Buri Arslon
Hi everybody,

Yesterday and today I've experienced anomaly in Riak DB.

:list_keys() is showing 2 keys. Each time I perform this it fetches two
keys but one of them is always different (different key, different value).
So, I guess there are three k/v stored in the DB.

Before that, I had deleted /data directory from all nodes (dev1, dev2,
dev3) to clean the DB.

I didn't change Riak nodes, the settings are identical with Fast Track
tutorial.

Any ideas to fix the problem?

Thanks,
--  buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak Adoption - What can we do better?

2012-04-20 Thread Buri Arslon
+2 for a book; O'Reilly would be nice
+1 for quality screencasts
+1 for a tutorial for newbies like Django has
+1 gui admin like pgadmin or mysqlmyadmin

I didn't read Mathias' book, but my impression from Table of Contents and
sample.pdf was that it's very easy-read, good to understand the concepts.
Some coupon/discount would be nice :)

My own imagination of a potential reader for "Riak: The Definitive Guide"
book is:

- He has some knowledge of RDBMS, but not guru
- Almost no knowledge about NoSQL.
- May migrate to Riak from SQL database, say mysql.
- May know some Erlang
- learns better by looking how it's done
- concept/theory should be followed by application of it.
- use cases (when it is more than appropriate to use Riak, and when not)
- schema examples
- O'Reilly book

It looks like I described myself, I'm afraid. :)

And the last point was my personal preference as I have 50% discount as a
member ;)

-- buriwoy
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Riak Anomaly

2012-04-20 Thread Buri Arslon
Another thing that I noticed:

  - /data directories aren't same size

/data directories in the cluster of (dev1, dev2, dev3) should be the same
size, right?

-- buriwoy

On Fri, Apr 20, 2012 at 8:53 AM, Buri Arslon  wrote:

> Hi everybody,
>
> Yesterday and today I've experienced anomaly in Riak DB.
>
> :list_keys() is showing 2 keys. Each time I perform this it fetches two
> keys but one of them is always different (different key, different value).
> So, I guess there are three k/v stored in the DB.
>
> Before that, I had deleted /data directory from all nodes (dev1, dev2,
> dev3) to clean the DB.
>
> I didn't change Riak nodes, the settings are identical with Fast Track
> tutorial.
>
> Any ideas to fix the problem?
>
> Thanks,
> --  buriwoy
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com