Hi Joseph,

Are these results consistently reproducible? Can you provide the full
queries you are using?

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
d...@basho.com


On Thu, Dec 30, 2010 at 11:46 PM, Joseph Lambert <joseph.g.lamb...@gmail.com
> wrote:

> Hello,
>
> I'm having a bit of a problem with k/v indexing and json objects in Riak
> Search 0.13.0. I have JSON objects of this format:
>
> {
>     "id" : 1,
>     "users" : [1559620, 2619082],
>     "userData" : {
>         "viewedBy1559620" : {
>             "isDeleted" : "false"
>         }
>         "viewedBy2619082" : {
>             "isDeleted" : "false"
>         }
>     }
> }
>
> My indexing schema is (also have tried with DefaulAnalyzerFactory):
>
> {
>         schema,
>         [
>                 {version, "0.0.3"},
>                 {default_field, "id"},
>                 {default_op, "and"},
>                 {n_val, 2},
>                 {analyzer_factory,
> "com.basho.search.analysis.WhitespaceAnalyzerFactory"}
>         ],
>         [
>                 {field, [
>                         {name, "id"},
>                         {type, integer}
>                 ]},
>                 {field, [
>                         {name, "users"},
>                         {type, integer}
>                 ]},
>                 {dynamic_field, [
>                     {name, "userData*isDeleted"},
>                     {type, string}
>                 ]},
>                 {dynamic_field, [
>                         {name, "*"},
>                         {required, false},
>                         {skip, true}
>                 ]}
>         ]
> }.
>
>
> The appropriate fields are extracted by the extractor and this is the index
> created by both factories:
>
> {riak_idx_doc,<<"test">>,
>               <<"6e3833626637965f1df837b63cdcc34b">>,
>               [{<<"id">>,<<"6e3833626637965f1df837b63cdcc34b">>,
>                 [{<<"6e3833626637965f1df837b63cdcc34b">>,[0]}]},
>                {<<"userData_viewedBy1559620_isDeleted">>,<<"false">>,
>                 [{<<"false">>,[0]}]},
>                {<<"userData_viewedBy2619082_isDeleted">>,<<"false">>,
>                 [{<<"false">>,[0]}]},
>                {<<"users">>,<<"1559620 2619082">>,
>                 [{<<"0002619082">>,[1]},{<<"0001559620">>,[0]}]}],
>               [],[],true}
>
> The problem comes when I am searching. If I run the following searches
> 1.) users:0001559620
> 2.) users:0002619082
> 3.) userData_viewedBy1559620_isDeleted:false
> 4.) userData_viewedBy2619082_isDeleted:false
>
> I get these results:
>
> using search:search from the riak console:
> 1.) works
> 2.) works
> 3.) does not work
> 4.) works
>
> The same queries from http using the solr interface (properly url encoded,
> I swear):
> 1.) does not work
> 2.) works
> 3.) does not work
> 4.) does not work
>
> Now, from the interactive shell:
> 1.) does not work
> 2.) works
> 3.) works
> 4.) does not work
>
>
> Can anyone help explain to me where I am going wrong?
>
> - Joe Lambert
>
> joseph.g.lamb...@gmail.com
> +86 13656213284
>
> _______________________________________________
> 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

Reply via email to