Riak indexing issue with PBClient

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Riak indexing issue with PBClient

vijayakumar
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
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Riak indexing issue with PBClient

Sean Cribbs-2
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 <[hidden email]> 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
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




--
Sean Cribbs <[hidden email]>
Developer Advocate
Basho Technologies, Inc.


_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Reply | Threaded
Open this post in threaded view
|

Re: Riak indexing issue with PBClient

Dan Reverri
In reply to this post by vijayakumar
How are you determining that the "accountid" field is not being indexed? Do you have a short code snippet that shows how you are submitting the data with the Java client?

Thanks,
Dan

Daniel Reverri
Developer Advocate
Basho Technologies, Inc.
[hidden email]


On Tue, Sep 20, 2011 at 4:39 AM, vijayakumar <[hidden email]> 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
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



_______________________________________________
riak-users mailing list
[hidden email]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com