Hi Mike, > Would you mind giving me a very quick example about how to use the > BooleanQuery with 2 fields? >
Have a look at the BooleanQuery test suite [1], where plenty of 2 field BooleanQuery instances are created. In your case, you will want to replace the BooleanClause::SHOULD parameter with BooleanClause::MUST (SHOULD will cause the query to match all documents which have either of the two fields, while MUST will require both). Generally, the test suite is a valuable source for code samples to use in own code. And if something is missing, feel free to send more test cases. Best regards, Isidor [1] http://clucene.git.sourceforge.net/git/gitweb.cgi?p=clucene/clucene;a=blob;f=src/test/search/test/search/TestBoolean.cpp;h=0ad11d87eec524eab41a279a5acbb85c39de59b0;hb=ec56f769465b3d51d5b9ceecf3a565d89b59e283 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ CLucene-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clucene-developers
