Lucene tập 2

Filed in Career 0 comments

http://lucene.apache.org/java/2_3_2/queryparsersyntax.html

Grouping

Lucene supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

To search for either “jakarta” or “apache” and “website” use the query:
(jakarta OR apache) AND website

This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.

rất hữu ích, hehe, nhờ có cái grouping này mà mình có thể xử lý được yêu cầu của sếp Giang một cách đỡ tốn công sức, hẹ hẹ :P

Posted by thaiph   @   30 September 2009 0 comments
Tags : ,

Share This Post

RSS Digg Twitter StumbleUpon Delicious Technorati

Related Posts

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Previous Post
«
Next Post
»
EXULT designed by ZENVERSE  |  In conjunction with Reseller Hosting from the #1 Web Hosting Provider - HostNexus.