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

September 30, 2009 · kanishi

Lucene là cái gì

Field.Keyword – The data is stored and indexed but not tokenized. This is most useful for data that should be stored unchanged such as a date. In fact, the Field.Keyword can take a Date object as input. Field.Text – The data is stored, indexed, and tokenized. Field.Text fields should not be used for large amounts of data such as the article itself because the index will get very large since it will contain a full copy of the article plus the tokenized version. Field.UnStored – The data is not stored but it is indexed and tokenized. Large amounts of data such as the text of the article should be placed in the index unstored. Field.UnIndexed – The data is stored but not indexed or tokenized. This is used with data that you want returned with the results of a search but you won’t actually be searching on this data. In our example, since we won’t allow searching for the URL there is no reason to index it but we want it returned to us when a search result is found. http://www.javaranch.com/journal/2004/04/Lucene.html ...

August 11, 2009 · kanishi