Hi,
I've made a "riak_test" bucket and inserted following:
Key | JSON data
bckt.insert("test0","{\"Src\":\"pen\", \"Trg\":\"cat\"}");
bckt.insert("test1","{\"Src\":\"penrose\", \"Trg\":\"caterpillar\"}");
bckt.insert("test2","{\"Src\":\"pending\", \"Trg\":\"cato\"}");
bckt.insert("test3","{\"Src\":\"march\", \"Trg\":\"doing\"}");
bckt.insert("test4","{\"Src\":\"marsh\", \"Trg\":\"swimming\"}");
bckt.insert("test5","{\"Src\":\"marmelade\", \"Trg\":\"trying\"}");
bckt.insert("test6","{\"Src\":\"john\", \"Trg\":\"play\"}");
I'm using SolrJ for accessing Riak through Solr interface in Java.
for query:
q = "Src:pe*"; // just PE
dl = test_bckt.find(q);
(Same response in browser
http://192.168.5.50:8098/solr/riak_test/select?q="Src":"pe*" - with and without
quotes)
I get (I'm outputting response and "none..."):
response =
{responseHeader={status=0,QTime=0,params={indent=on,start=0,q=Src:pe*,q.op=and,df=Src,wt=standard,version=1.1,rows=0}},
response={numFound=0,start=00.0,docs=[]}}
none...
but for query:
q = "Src:pen*"; // now PEN, "n" is added to the previous query
dl = test_bckt.find(q);
(Same response in browser
http://192.168.5.50:8098/solr/riak_test/select?q="Src":"pen*" - with and without
quotes)
I receive this:
response =
{responseHeader={status=0,QTime=73,params={indent=on,start=0,q=Src:pen*,q.op=and,df=Src,wt=standard,version=1.1,rows=3}},response={numFound=3,start=00.0,docs=[SolrDocument[{id=test2,
Src=pending, Trg=cato}], SolrDocument[{id=test1, Src=penrose, Trg=caterpillar}],
SolrDocument[{id=test0, Src=pen, Trg=cat}]]}}
SolrDocument[{id=test2, Src=pending, Trg=cato}]
SolrDocument[{id=test1, Src=penrose, Trg=caterpillar}]
SolrDocument[{id=test0, Src=pen, Trg=cat}]
Schema is
{field, [
{name, "Src"},
{type, string},
{analyzer_factory,
"com.basho.search.analysis.StandardAnalyzerFactory"}
]},
Same happens with
{analyzer_factory, {erlang, text_analyzers,
standard_analyzer_factory}}
Any ideas why queries do not return the same result?
vlatko
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com