Hello,

I a new comer on Riak.

I started to work with it and i faced with a strange behavior in case of
secondary index.

First of all I added many objects into RIak with the following queries :

curl -XPUT -H 'x-riak-index-contentid_bin: '1641/199095'' -H 'Content-Type:
application/json' -d '{        "permalink_url" : "
http://lemonde.fr/planete/article/2012/04/12/shell-a-detecte-une-nappe-de-petrole-dans-le-golfe-du-mexique_1684795_3244.html#xtor=RSS-3208";,
       "title" : "Shell a détecté une nappe de pétrole dans le golfe du
Mexique",        "content_id" : "1641/199095",        "publication_date" :
"2012-04-12T15:23:07.000Z"}' http://localhost:8098/riak/youmag/art1

curl -XPUT -H 'x-riak-index-contentid_bin: '390/203664'' -H 'Content-Type:
application/json' -d '{        "permalink_url" : "
http://auto-buzz.com/photos-officielles-citroen-concept-numero-9-542805.html";,
       "title" : "Les photos officielles du Concept Citroën Numéro 9",
   "content_id" : "390/203664",        "publication_date" :
"2012-04-13T07:54:56.000Z"}' http://localhost:8098/riak/youmag/art2

curl -XPUT -H 'x-riak-index-contentid_bin: '1570/204004'' -H 'Content-Type:
application/json' -d '{        "permalink_url" : "
http://latribune.fr/actualites/economie/france/20120413trib000693391/forte-augmentation-des-creations-d-entreprises-en-mars.html";,
       "title" : "Forte augmentation des créations d''entreprises en mars",
       "content_id" : "1570/204004",        "publication_date" :
"2012-04-13T08:19:14.000Z"}' http://localhost:8098/riak/youmag/art3

Queries above are an sample, i created more than 200 objects.

You will notice that each query create an secondary index called :
contentid_bin.

The strange behavior is when I search for one object by secondary index,
the result contain more than just the object pointed by the value of
secondary index.

below the query that i used to queried an indexed object :

curl http://127.0.0.1:8098/buckets/youmag/index/contentid_bin/390\/203664

the result should be :

keys : art2

The result i got :

keys : art2, art3 ,art1

i hope i am clear in my explanation

Many thanks for your help,

Best regards



Fabrice Sznajderman
G+ : http://gplus.to/fsznajderman,
Rédacteur sur Java - ʕ๏̮๏ʔ<https://plus.google.com/u/0/b/112440333946538821016/>
Communautés G+ : http://gplus.to/developpeurFR  -
http://gplus.to/JavaFRcommunity

Blog : http://blog.fsznajderman.fr <http://sznajderman.developpez.com>
Twitter : fsznajderman
photographie : http://photos.fsznajderman.fr
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to