No results provided by Riak search, another !

Germain Maurice germain.maurice at linkfluence.net
Tue Jul 5 19:00:25 EDT 2011


Ok Dan, i have some news.

With
{dynamic_field, [
             {name, "*_nsid"},
or with
        {field, [
             {name, "fans_data_nsid"},
i'm able to query the index, however i have results with this query :
q=fans_data_nsid:837*
but no results with :
q=fans_data_nsid:83*
I remember it's an existing bug.

Thank you for your patience.

Le 05/07/11 23:36, Dan Reverri a écrit :
> You'll need to change the schema fields to "dymanic_field" in order to 
> use wildcards (*). Can you update the schema and test the issue again?
>
> Thanks,
> Dan
>
> Daniel Reverri
> Developer Advocate
> Basho Technologies, Inc.
> dan at basho.com <mailto:dan at basho.com>
>
>
> On Tue, Jul 5, 2011 at 2:13 PM, Germain Maurice 
> <germain.maurice at linkfluence.net 
> <mailto:germain.maurice at linkfluence.net>> wrote:
>
>     Hi Dan,
>
>     No, i didn't change it.
>
>
>     Le 05/07/11 19:17, Dan Reverri a écrit :
>>     Hi Germain,
>>
>>     Did you change the fields to "dynamic_field" in the schema?
>>
>>     Thanks,
>>     Dan
>>
>>     Daniel Reverri
>>     Developer Advocate
>>     Basho Technologies, Inc.
>>     dan at basho.com <mailto:dan at basho.com>
>>
>>
>>     On Tue, Jul 5, 2011 at 9:51 AM, Germain Maurice
>>     <germain.maurice at linkfluence.net
>>     <mailto:germain.maurice at linkfluence.net>> wrote:
>>
>>         Thanks Dan,
>>
>>         I changed the fields in the schema as this :
>>         - nsid -> *_nsid
>>         - favedate -> *_favedate
>>         - date_faved -> *_date_faved
>>
>>         In order to take it in account i did :
>>
>>         search-cmd set-schema photostest My.schema
>>         search-cmd clear-schema-cache
>>         and reindexing data (reading/writing the documents in their
>>         own place)
>>
>>         No change :(
>>         I tried to use the fields : fans_data_nsid, fans_data_favedate
>>         but no better result.
>>
>>         I'm using Riak Search 0.14.2
>>
>>         Just for checking :
>>         curl http://localhost:8098/riak/photostest
>>         {"props":{"precommit":[{"fun":"precommit","mod":"riak_search_kv_hook"}]...}
>>
>>         Le 05/07/11 18:27, Dan Reverri a écrit :
>>>         Hi Germain,
>>>
>>>         It looks like your document has nested fields which means
>>>         the schema you have defined won't match the fields produced
>>>         by the pre-commit hook. The pre-commit hook flattens JSON
>>>         documents using an underscore ("_") between nested fields
>>>         (e.g. fans_data_nsid); your schema should be using the
>>>         flattened field name.
>>>
>>>         Thanks,
>>>         Dan
>>>
>>>         Daniel Reverri
>>>         Developer Advocate
>>>         Basho Technologies, Inc.
>>>         dan at basho.com <mailto:dan at basho.com>
>>>
>>>
>>>         On Tue, Jul 5, 2011 at 7:05 AM, Germain Maurice
>>>         <germain.maurice at linkfluence.net
>>>         <mailto:germain.maurice at linkfluence.net>> wrote:
>>>
>>>             Hello everybody,
>>>
>>>             I have a problem with Riak Search. I tried to find the
>>>             solution by my own, i tried all the solutions i found
>>>             and no results.
>>>
>>>             Firstly, i tried to use it with the default schema, it
>>>             works but it indexes too much data.
>>>             So, i set my own schema as this :
>>>             {
>>>                schema,
>>>                [
>>>                    {version, "1.1"},
>>>                    {n_val, 1},
>>>                    {default_field, "nsid"},
>>>                    {analyzer_factory, {erlang, text_analyzers,
>>>             standard_analyzer_factory}}
>>>                ],
>>>                [
>>>                    {field, [
>>>                        {name, "favedate"},
>>>                        {type, string},
>>>                        {analyzer_factory, {erlang, text_analyzers,
>>>             standard_analyzer_factory}}
>>>                    ]},
>>>
>>>                    {field, [
>>>                        {name, "date_faved"},
>>>                        {type, string},
>>>                        {analyzer_factory, {erlang, text_analyzers,
>>>             standard_analyzer_factory}}
>>>                    ]},
>>>
>>>                    %% Everything else is skipped
>>>                    {dynamic_field, [
>>>                        {name, "*"},
>>>                        {skip, true}
>>>                    ]}
>>>                ]
>>>             }.
>>>
>>>             Hook on precommit of my buckets are ok.
>>>             I set the schema for each of my buckets as this :
>>>             "search-cmd set-schema photostest My.schema"
>>>             Did a "search-cmd clear-schema-cache" command.
>>>
>>>             I re-indexed all of my documents of the bucket however,
>>>             these documents are not indexed.
>>>             An example :
>>>
>>>             { "fans":{
>>>                "data":[{"nsid":"83786678 at N00",
>>>                        "favedate":"1309539453"}
>>>                          ,{"nsid":"33233619 at N02",
>>>                           "favedate":"1309539169"}]
>>>              , ...
>>>             Here is the answer of the index :
>>>             {"responseHeader":{"status":0,"QTime":2,"params":{"q":"fans_data_nsid:83786678 at N00","q.op":"or","filter":"","wt":"
>>>             json"}},"response":{"numFound":0,"start":0,"maxScore":"0.0","docs":[]}}
>>>
>>>
>>>             thank you !
>>>
>>>             -- 
>>>             Germain Maurice
>>>             Administrateur Système/Réseau
>>>             Tel : +33.(0)1.42.43.54.33
>>>
>>>             http://www.linkfluence.net
>>>
>>>
>>>             _______________________________________________
>>>             riak-users mailing list
>>>             riak-users at lists.basho.com
>>>             <mailto:riak-users at lists.basho.com>
>>>             http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>>
>>         -- 
>>         Germain Maurice
>>         Administrateur Système/Réseau
>>         Tel : +33.(0)1.42.43.54.33
>>
>>         http://www.linkfluence.net
>>
>>
>>         _______________________________________________
>>         riak-users mailing list
>>         riak-users at lists.basho.com <mailto:riak-users at lists.basho.com>
>>         http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
>
>     _______________________________________________
>     riak-users mailing list
>     riak-users at lists.basho.com <mailto: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/20110706/166a2851/attachment.html>


More information about the riak-users mailing list