Lucene3.0正式版于2009年11月25日發(fā)布了,2.X經(jīng)過(guò)多年終于有了大版本的升級了. 在Lucene 3 中,發(fā)生了較大的變化。Jdk的版本必須是jdk5以上,使用了5的泛型和匿名注釋.與上個(gè)版本2.9的使用方法是沒(méi)有明顯區別, QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, field,analyzer); 以前是沒(méi)有版本參數.
· Replace o.a.l.util.Parameter by Java 5 enums (see below).
· Add @Override annotations.
- TokenStream/AttributeSource: Now addAttribute()/getAttribute() return an instance of the requested attribute interface and no cast needed anymore (LUCENE-1855).
- NumericRangeQuery, NumericRangeFilter, and FieldCacheRangeFilter now have Integer, Long, Float, Double as type param (LUCENE-1857).
- Document.getFields() returns List<Fieldable>.
- Query.extractTerms(Set<Term>)
- CharArraySet and stop word sets in core/contrib
- PriorityQueue (LUCENE-1935)
- TopDocCollector
- DisjunctionMaxQuery (LUCENE-1984)
- MultiTermQueryWrapperFilter
- CloseableThreadLocal
- MapOfSets
- o.a.l.util.cache package
- lot’s of internal APIs of IndexWriter
相關(guān)文章:

