Lucene4.6至 Lucene6.6的每个迭代对API的改动
由于项目需求,需要将Lucene4.6升级到Lucene6.6,因此我对这之间的所有重要的API改动做了搜集;特别重要的改变加粗显示。
Lucene4.7改动:
LUCENE-5405: Make ShingleAnalzyerWrapper.getWrappedAnalyzer() public final
(gsingers)
LUCENE-5395: The
SpatialArgsParser now only reads WKT, no more "lat, lon" etc. but
it's easy to override the parseShape method if you wish.
Lucene4.8改动:
- LUCENE-5516: MergeScheduler#merge()
now accepts a MergeTrigger as well as a boolean that indicates if a new merge
was found in the caller thread before the scheduler was called.
(Simon Willnauer) - LUCENE-5487: Separated bulk scorer (new Weight.bulkScorer method)
from normal scoring (Weight.scorer) for those queries that can do bulk scoring
more efficiently, e.g. BooleanQuery in some cases. This also simplified the
Weight.scorer API by removing the two confusing booleans.
Lucene4.9改动:
- ·LUCENE-5725:
MoreLikeThis#like now accepts multiple values per field. The pre-existing
method has been deprecated in favor of a variable arguments for the like text.
(Alex Ksikes via Simon Willnauer) - ·LUCENE-5711: MergePolicy
accepts an IndexWriter instance on each method rather than holding state
against a single IndexWriter instance. - ·LUCENE-5640:
The Token class was deprecated. Since Lucene 2.9, TokenStreams are using
Attributes, Token is no longer used.
(Uwe Schindler, Robert Muir) - ·LUCENE-5678:
IndexOutput no longer allows seeking, so it is no longer required to use
RandomAccessFile to write Indexes. Lucene now uses standard FileOutputStream
wrapped with OutputStreamIndexOutput to write index data. BufferedIndexOutput
was removed, because buffering and checksumming is provided by
FilterOutputStreams, provided by the JDK.
Lucene5.0改动:
LUCENE-4924: DocIdSetIterator.docID() must now return -1 when the iterator is not
positioned. This change affects all classes that inherit from DocIdSetIterator,
including DocsEnum and DocsAndPositionsEnum.
(Adrien Grand)
LUCENE-5388: Remove Reader from
Tokenizer's constructor and from Analyzer's createComponents. TokenStreams now
always get their input via setReader.
(Benson Margulies via Robert Muir - pull request #16)
LUCENE-5527: The Collector API has been refactored to use a
dedicated(专用的) Collector per leaf.
(Shikhar Bhushan, Adrien Grand)
LUCENE-5702: The FieldComparator API has been refactor to a
per-leaf API, just like Collectors.
(Adrien Grand)
LUCENE-4246: IndexWriter.close now always closes, even if it
throws an exception. The new IndexWriterConfig.setCommitOnClose (default true)
determines whether close() should commit before closing.
LUCENE-5569: *AtomicReader/AtomicReaderContext have been renamed to *LeafReader/LeafReaderContext.
LUCENE-6021:FixedBitSet.nextSetBit
now returns DocIdSetIterator.NO_MORE_DOCS instead of -1 when there are no more
bits which are set.
(Adrien Grand)
LUCENE-6084: IndexOutput's
constructor now requires a String resourceDescription so its toString is sane
(Robert Muir, Mike McCandless)
LUCENE-6121:
CachingTokenFilter.reset() now propagates to its input if called before
incrementToken(). You must call reset() now on this filter instead of doing it
a-priori on the input(), which previously didn't work.
(David Smiley, Robert Muir)
LUCENE-6165: IndexWriter.addIndexes(IndexReader...) changed to
addIndexes(CodecReader...)
(Robert Muir)
Lucene5.1改动:
LUCENE-6218, LUCENE-6220: Add
Collector.needsScores() and needsScores parameter to Query.createWeight().
(Robert Muir, Adrien Grand)
LUCENE-4524, LUCENE-6246, LUCENE-6256, LUCENE-6271:
Merge
DocsEnum and DocsAndPositionsEnum into a single PostingsEnum iterator.
TermsEnum.docs() and TermsEnum.docsAndPositions() are replaced by
TermsEnum.postings().
LUCENE-6270:
Replaced TermsFilter with TermsQuery, use a QueryWrapperFilter(TermsQuery)
instead.
(Adrien Grand)
LUCENE-6272: Scorer
extends DocSetIdIterator rather than DocsEnum
(Alan Woodward)
LUCENE-6286: Removed IndexSearcher methods that take a
Filter object. A BooleanQuery with a filter clause must be used instead.
(Adrien Grand)
LUCENE-6300:
PrefixFilter, TermRangeFilter and NumericRangeFilter have been removed. Use
PrefixQuery, TermRangeQuery and NumericRangeQuery instead.
(Adrien Grand)
LUCENE-6303:
Replaced FilterCache with QueryCache and CachingWrapperFilter with
CachingWrapperQuery.
(Adrien Grand)
Lucene5.2改动:
- LUCENE-6377:
SearcherFactory#newSearcher now accepts the previous reader to simplify warming
logic during opening new searchers.
(Simon Willnauer) - LUCENE-6410:
Removed unused "reuse" parameter to Terms.iterator.
(Robert Muir, Mike McCandless)
Lucene5.3改动:
- LUCENE-6552:
Add MergePolicy.OneMerge.getMergeInfo and rename setInfo to setMergeInfo
(Simon Willnauer, Mike McCandless) - LUCENE-6583:
FilteredQuery is deprecated and will be removed in 6.0. It should be replaced
with a BooleanQuery which handle the
query as a MUST clause and the filter as a FILTER clause.
(Adrien Grand) - LUCENE-6553: The postings, spans and scorer APIs no
longer take an acceptDocs parameter. Live docs are now always checked on top of
these APIs.
(Adrien Grand) - LUCENE-6643:
GroupingSearch from lucene/grouping was changed to take a Query object to
define groups instead of a Filter.
(Adrien Grand) - LUCENE-6648:
All lucene/facet APIs now take Query
objects where they used to take Filter objects.
(Adrien Grand) - LUCENE-6531:
PhraseQuery is now immutable and can be built using the PhraseQuery.Builder
class.
(Adrien Grand) - LUCENE-6570:
BooleanQuery is now immutable and can be
built using the BooleanQuery.Builder class.
(Adrien Grand)
Lucene5.4改动:
- LUCENE-6855:
CachingWrapperQuery is deprecated and will be removed in 6.0.
(Adrien Grand) - LUCENE-6849:
Expose IndexWriter.flush() method, to move all in-memory segments to disk
without opening a near-real-time reader nor calling fsync
(Robert Muir, Simon Willnauer, Mike McCandless)
Lucene5.5改动:
- LUCENE-6919:
The Scorer class has been refactored to
expose an iterator instead of extending DocIdSetIterator. asTwoPhaseIterator()
has been renamed to twoPhaseIterator() for consistency.
(Adrien Grand) - LUCENE-6980:
Default applyAllDeletes to true when opening near-real-time readers
(Mike McCandless) - LUCENE-6932:
IndexInput.seek implementations now throw EOFException if you seek beyond the
end of the file
(Adrien Grand, Mike McCandless) - LUCENE-6988:
IndexableField.tokenStream() no longer throws IOException
(Alan Woodward)
Lucene6.0改动:
LUCENE-6583:
FilteredQuery has been removed. Instead, you can construct a BooleanQuery with
one MUST clause for the query, and one FILTER clause for the filter.
(Adrien Grand)
LUCENE-6706:
PayloadTermQuery and PayloadNearQuery have been removed. Instead, use
PayloadScoreQuery to wrap any SpanQuery.
(Alan Woodward)
LUCENE-6947:
SortField.missingValue is now protected. You can read its value using the new
SortField.getMissingValue getter.
(Adrien Grand)
LUCENE-7052, LUCENE-7053: Remove
custom comparators from BytesRef class and solely use natural byte[] comparator
throughout codebase. This also simplifies API of BytesRefHash. It also replaces
the natural comparator in ArrayUtil by Java 8's Comparator#naturalOrder().
(Mike McCandless, Uwe Schindler, Robert Muir)
LUCENE-7058: Add
getters to various Query implementations
(Guillaume Smet via Alan
Woodward)
LUCENE-7064:
MultiPhraseQuery is now immutable and should be constructed with
MultiPhraseQuery.Builder.
(Luc Vanlerberghe via Adrien Grand)
LUCENE-6952: These
classes are now abstract: FilterCodecReader, FilterLeafReader, FilterCollector,
FilterDirectory. And some Filter* classes in lucene-test-framework too.
(David Smiley)
SOLR-8867:
FunctionValues.getRangeScorer now takes a LeafReaderContext instead of an
IndexReader, and avoids matching documents without a value in the field for
numeric fields.
(yonik)
Lucene6.1改动:
LUCENE-7243:Removed
the LeafReaderContext parameter from QueryCachingPolicy#shouldCache.
(Adrien Grand)
Lucene6.2改动:
ScoringWrapperSpans was removed since it
had no purpose or effect as of Lucene 5.5.
Lucene6.3改动:
修复了一些BUG无API改动!
Lucene6.4改动:
修复了一些BUG无API改动!
Lucene6.5改动:
- · LUCENE-7624:
TermsQuery has been renamed as TermInSetQuery and moved to core.
(Alan Woodward) - LUCENE-7637:
TermInSetQuery requires that all terms come from the same field.
(Adrien Grand) - LUCENE-7644:
FieldComparatorSource.newComparator() and SortField.getComparator() no longer
throw IOException
(Alan Woodward) - LUCENE-7628:
Scorer.getChildren() now only returns Scorers that are positioned on the
current document, and can throw an IOException. AssertingScorer checks that
getChildren() is not called on an unpositioned Scorer.
(Alan Woodward, Adrien Grand) - LUCENE-7707:
TopDocs.merge now takes a boolean option telling it when to use the incoming
shard index versus when to assign the shard index itself, allowing users to
merge shard responses incrementally instead of once all shard responses are
present.
(Simon Willnauer, Mike McCandless)
Lucene6.6改动:
修复了一些BUG无API改动!
Lucene4.6至 Lucene6.6的每个迭代对API的改动的更多相关文章
- 打造属于自己的支持版本迭代的Asp.Net Web Api Route
在目前的主流架构中,我们越来越多的看到web Api的存在,小巧,灵活,基于Http协议,使它在越来越多的微服务项目或者移动项目充当很好的service endpoint. 问题 以Asp.Net W ...
- 细说java中Map的两种迭代方式
曾经对java中迭代方式总是迷迷糊糊的,今天总算弄懂了.特意的总结了一下.基本是算是理解透彻了. 1.再说Map之前先说下Iterator: Iterator主要用于遍历(即迭代訪问)Collecti ...
- Android 中的mvvm
我们来了解一下MVVM模式与Databinding ,MVVM是一种模式,Databinding 是一种框架.DataBinding是一个实现数据和UI绑定的框架.而ViewModel和View可以通 ...
- iOS组件化思路 <转>
随着应用需求逐步迭代,应用的代码体积将会越来越大,为了更好的管理应用工程,我们开始借助CocoaPods版本管理工具对原有应用工程进行拆分.但是仅仅完成代码拆分还不足以解决业务之间的代码耦合,为了更好 ...
- python基础之面向对象高级编程
面向对象基本知识: 面向对象是一种编程方式,此编程方式的实现是基于对 类 和 对象 的使用 类 是一个模板,模板中包装了多个"函数"供使用(可以讲多函数中公用的变量封装到对象中) ...
- Python学习笔记 for windows 三
多重继承 继承是面向对象编程的一个重要的方式,因为通过继承,子类就可以扩展父类的功能. 哺乳类:能跑的哺乳类,能飞的哺乳类: 鸟类:能跑的鸟类,能飞的鸟类. class Animal(object): ...
- python基础——定制类
python基础——定制类 看到类似__slots__这种形如__xxx__的变量或者函数名就要注意,这些在Python中是有特殊用途的. __slots__我们已经知道怎么用了,__len__()方 ...
- python 定制类
看到类似__slots__这种形如__xxx__的变量或者函数名就要注意,这些在Python中是有特殊用途的. __slots__我们已经知道怎么用了,__len__()方法我们也知道是为了能让cla ...
- Python3 面向对象 高级编程
正常情况下,当我们定义了一个class,创建了一个class的实例后,我们可以给该实例绑定任何属性和方法,这就是动态语言的灵活性. class Student(object): pass 然后,尝试 ...
随机推荐
- JQuery中each方法实现
each()函数是基本上所有的框架都提供了的一个工具类函数,通过它,你可以遍历对象.数组的属性值并进行处理. jQuery和jQuery对象都实现了该方法,对于jQuery对象,只是把each方法简单 ...
- Python中的import语句
Python中的import语句是导入一个文件,这条语句主要做三件事: 1 通过一定的方式,搜寻要导入的文件: 2 如果需要,就编译这个文件: 3 运行这个文件 但是,需要注意的是,所有这三个步骤,都 ...
- 第三周的psp
PSP: 进度条: 累计进度图: 本周PSP饼状图:
- 常用算法Java实现之冒泡排序
冒泡排序是所有排序算法中最基本.最简单的一种.思想就是交换排序,通过比较和交换相邻的数据来达到排序的目的. 具体流程如下: 1.对要排序的数组中的数据,依次比较相邻的两个数据的大小. 2.如果前面的数 ...
- poj 3009 (深搜求最短路)
题目大意就是求在特定规则下的最短路,这个规则包含了消除障碍的操作.用BFS感觉选择消除障碍的时候不同路径会有影响,用DFS比较方便状态的还原(虽然效率比较低),因此这道题目采用DFS来写. 写的第一次 ...
- C#2d命令行小游戏
[ 星 辰 · 第 二 条 约 定 ] 要求 空地:空格 | 边界/墙:'█' | 人物:'♜' 实现人物的上下左右移动 记录关系图.流程图.设计过程遇到的问题及解决 项目压缩包 [项目源码](htt ...
- 《软件工程实践》第五次作业-WordCount进阶需求 (结对第二次)
在文章开头给出结对同学的博客链接.本作业博客的链接.你所Fork的同名仓库的Github项目地址 本作业博客链接 github pair c 031602136魏璐炜博客 031602139徐明盛博客 ...
- TCP系列17—重传—7、SACK下的重传
我们之前介绍SACK选项的时候说过,SACK可以把接收端系列号空间的洞反映给发送端,因此发送端可以更充分的理解接收端的情况,而进行更好的重传恢复过程.这种过程有时候也叫做advanced loss r ...
- TCP系列12—重传—2、Linux超时重传引入示例
在前面我们概述了TCP的超时重传之后我们简单的看一下tcp超时重传的示例.首先简单的描述一下测试过程 1.设置/proc/sys/net/ipv4/tcp_early_retrans为2,关掉TLP功 ...
- vuex介绍--一篇看懂vuejs的状态管理神器
原文,请点击此链接http://www.ituring.com.cn/article/273487