Hi Germain, Did you change the fields to "dynamic_field" in the schema?
Thanks, Dan Daniel Reverri Developer Advocate Basho Technologies, Inc. [email protected] On Tue, Jul 5, 2011 at 9:51 AM, Germain Maurice < [email protected]> 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. > [email protected] > > > On Tue, Jul 5, 2011 at 7:05 AM, Germain Maurice < > [email protected]> 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@N00", >> "favedate":"1309539453"} >> ,{"nsid":"33233619@N02", >> "favedate":"1309539169"}] >> , ... >> Here is the answer of the index : >> >> {"responseHeader":{"status":0,"QTime":2,"params":{"q":"fans_data_nsid:83786678@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 >> [email protected] >> 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 > [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
