That explains why the queries behaved like 'OR's. Thanks! -- Tejus Parikh tejusparikh.com | @vi_jedi
On Saturday, May 14, 2011 at 2:40 PM, Dan Reverri wrote: > Hi Tejus, > > The boolean operators must be capitalized (AND, OR, NOT). If you retry your > searches with "AND" they will return the expected results. > > Also, thank you for the very well put together examples. > > Thanks, > Dan > > Daniel Reverri > Developer Advocate > Basho Technologies, Inc. > [email protected] > > > On Sat, May 14, 2011 at 9:28 AM, Tejus Parikh <[email protected]> wrote: > > I am considering using Riaksearch to replace a project that currently makes > > use of lucene. This project extensively uses 'AND' queries to return a very > > small subset of the total document store. Given that riaksearch provides a > > "solr" endpoint, I would have expected the queries to return the same > > results, but that does not appear to be the case. > > > > I created a simple test containing three documents (described here as xml): > > <doc> > > <field name="id">1</field> > > <field name="topping_text">strawberry</field> > > <field name="base_text">pastry</field> > > </doc> > > <doc> > > <field name="id">2</field> > > <field name="topping_text">blueberry</field> > > <field name="base_text">waffle</field> > > </doc> > > <doc> > > <field name="id">3</field> > > <field name="topping_text">strawberry</field> > > <field name="base_text">pancake</field> > > </doc> > > > > I ran a few queries against this set of docs: > > search-cmd search menu_index "topping_text:\"strawberry\"" > > ** This returns 2 documents > > > > search-cmd search menu_index "topping_text:\"strawberry\" and > > base_text:\"pastry\"" > > ** This returns 2 documents, I think it should only return menu_index/1 > > > > search-cmd search menu_index "topping_text:\"strawberry\" and > > base_text:\"waffles\"" > > ** This returns 3 documents, it shouldn't return any > > > > For comparions sake, I ran the same queries against lucene and retrieved > > the results I expected. > > > > I've uploaded my documents, the commands I used to create an index, and the > > sample lucene java code to: > > https://github.com/vijedi/Riak-Search--And--Query-Test > > > > Have I misinterpreted what is happening or is there a real difference here? > > > > Thanks! > > > > Tejus Parikh > > tejusparikh.com | @vi_jedi > > > > > > _______________________________________________ > > 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
