Hi Vijay,

For things like account IDs, which are not prose text, you should use the
whitespace or noop analyzers, not the standard analyzer. Generally the
standard analyzer will remove things that aren't words (punctuation, for
example) and stopwords (common ones like "the" or "a").

On Tue, Sep 20, 2011 at 6:39 AM, vijayakumar <[email protected]> wrote:

> Hi,
>
> RiakSearch fails to index non-default fields when the records are inserted
> into a bucket with java PBClient.
> For the below mentioned schema definition and sample record, indexing
> happens only for 'name' field and not for 'accountid'.
> However, the same succeeds when records are inserted via curl.  Help me
> out if I am missing anything else.
>
> Schema Defintion:
>
>     {
>     schema,
>     [
>         {version, "1.1"},
>         {default_field, "name"},
>         {default_op, "or"},
>         {n_val, 2},
>         {analyzer_factory, {erlang, text_analyzers,
> whitespace_analyzer_factory}}
>     ],
>     [
>         %% Parse the field in preparation for full-text searching.
>         {field, [
>             {name, "accountid"},
>             {required, true},
>             {analyzer_factory, {erlang, text_analyzers,
> standard_analyzer_factory}}
>         ]},
>  {field, [
>             {name, "name"},
>             {required, true},
>             {analyzer_factory, {erlang, text_analyzers,
> standard_analyzer_factory}}
>         ]},
>
>         {dynamic_field, [
>             {name, "*"},
>                         {skip, true}
>         ]}
>     ]
> }.
>
> Sample Record:
> {"accountid":"testaccount","name":"testapplication","status":"activated"}
>
>
> Thanks,
> Vijayakumar
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
>


-- 
Sean Cribbs <[email protected]>
Developer Advocate
Basho Technologies, Inc.
http://www.basho.com/
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to