From 36b5e7447c7fd3d95283fdaa072dbcc20cff6a9b Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Fri, 9 Dec 2011 17:54:08 +0000 Subject: [PATCH] LUCENE-3606: merge changes git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1212545 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 22 +++++++++++++++++++++- lucene/contrib/CHANGES.txt | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 5af808273fd..0fce2ae0b7f 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -217,7 +217,11 @@ Changes in backwards compatibility policy instances. Furthermore, IndexReader.setNorm() was removed. If you need customized norm values, the recommended way to do this is by modifying SimilarityProvider to use an external byte[] or one of the new DocValues - fields (LUCENE-3108). (Uwe Schindler, Robert Muir) + fields (LUCENE-3108). If you want to dynamically change norms (boost + *and* length norm) at query time, wrap your IndexReader using + FilterIndexReader, overriding FilterIndexReader.norms(). To persist the + changes on disk, copy the FilteredIndexReader to a new index using + IndexWriter.addIndexes(). (Uwe Schindler, Robert Muir) Changes in Runtime Behavior @@ -676,6 +680,22 @@ Security fixes prevents this as best as it can by throwing AlreadyClosedException also on clones. (Uwe Schindler, Robert Muir) +API Changes + +* LUCENE-3606: IndexReader will be made read-only in Lucene 4.0, so all + methods allowing to delete or undelete documents using IndexReader were + deprecated; you should use IndexWriter now. Consequently + IndexReader.commit() and all open(), openIfChanged(), clone() methods + taking readOnly booleans (or IndexDeletionPolicy instances) were + deprecated. IndexReader.setNorm() is superfluous and was deprecated. + If you have to change per-document boost use CustomScoreQuery. + If you want to dynamically change norms (boost *and* length norm) at + query time, wrap your IndexReader using FilterIndexReader, overriding + FilterIndexReader.norms(). To persist the changes on disk, copy the + FilteredIndexReader to a new index using IndexWriter.addIndexes(). + In Lucene 4.0, SimilarityProvider will allow you to customize scoring + using external norms, too. (Uwe Schindler, Robert Muir) + New Features * LUCENE-3593: Added a FieldValueFilter that accepts all documents that either diff --git a/lucene/contrib/CHANGES.txt b/lucene/contrib/CHANGES.txt index 3371f9dd039..316a92dfaf5 100644 --- a/lucene/contrib/CHANGES.txt +++ b/lucene/contrib/CHANGES.txt @@ -76,6 +76,11 @@ API Changes * LUCENE-3308: DuplicateFilter keepMode and processingMode have been converted to enums DuplicateFilter.KeepMode and DuplicateFilter.ProcessingMode repsectively. +* LUCENE-3606: FieldNormModifier was deprecated, because IndexReader's + setNorm() was deprecated. Furthermore, this class is broken, as it does + not take position overlaps into account while recalculating norms. + (Uwe Schindler, Robert Muir) + Bug Fixes * LUCENE-3045: fixed QueryNodeImpl.containsTag(String key) that was