Career

Lucene tập 2

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ẹ😛

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s