Also, I'm getting this with the list:
=ERROR REPORT==== 5-Jan-2011::11:20:29 ===
webmachine error: path="/solr/test/select"
{error,{error,badarg,
[{erlang,list_to_integer,["1971 2"]},
{riak_search_utils,to_integer,1},
{riak_indexed_doc,'-to_mochijson2/2-lc$^0/1-0-',2},
{riak_indexed_doc,'-to_mochijson2/2-lc$^0/1-0-',2},
{riak_indexed_doc,to_mochijson2,2},
{riak_solr_output,'-json_response/7-lc$^0/1-0-',2},
{riak_solr_output,json_response,7},
{riak_solr_searcher_wm,to_json,2}]}}
when I query Solr.
- Joe Lambert
[email protected]
+86 13656213284
On Wed, Jan 5, 2011 at 10:46 AM, Joseph Lambert
<[email protected]>wrote:
> I can definitely repeat this.
>
> It seems to work correctly with the array of integers consistently from the
> erlang console, but the second key in the array does not show using the solr
> interface. For example, [1971, 2] when indexed as integers will work from
> console with search:search(<<"test">>, <<"users:0000001971">>) and
> search:search(<<"test">>, <<"users:0000000002">>), but using http and the
> solr interface, only
>
>
> http://192.168.1.32:8098/solr/test/select?q=users%3A0000001971&start=0&rows=10&sort=lastUpdatedAt+desc&wt=json'
> will work (2 is the second key in the array).
>
> However, keys like:
>
> userData_viewedBy1559620_isDeleted
>
> do not work at all. It is getting extracted and indexed, but does not work
> when you search on that value from erlang console, http, or command line.
>
> Please tell me I made a mistake and should just kick myself :).
>
>
>
> - Joe Lambert
>
> [email protected]
>
>
> On Fri, Dec 31, 2010 at 4:18 PM, Joseph Lambert <
> [email protected]> wrote:
>
>> Seems that they are. I haven't repeated over large numbers of different
>> tests though
>>
>> example:
>>
>> search:search(<<"test">>, <<"users:0002619082">>).
>>
>> curl '
>> http://192.168.1.47:8098/solr/test/select?q=userData_viewedBy2619082_isDeleted%3Afalse&wt=json
>> '
>>
>> riak_search> s(users:0002619082).
>>
>> I've got a sinking feeling it's something I am doing wrong.
>>
>>
>> - Joe Lambert
>>
>> [email protected]
>> +86 13656213284
>>
>>
>> On Fri, Dec 31, 2010 at 4:10 PM, Dan Reverri <[email protected]> wrote:
>>
>>> 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.
>>> [email protected]
>>>
>>>
>>> On Thu, Dec 30, 2010 at 11:46 PM, Joseph Lambert <
>>> [email protected]> 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
>>>>
>>>> [email protected]
>>>> +86 13656213284
>>>>
>>>> _______________________________________________
>>>> riak-users mailing list
>>>> [email protected]
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>
>>>>
>>>
>>
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com