lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1231388 - /lucene/dev/branches/lucene3453/lucene/MIGRATE.txt
Date Fri, 13 Jan 2012 23:20:09 GMT
Author: mikemccand
Date: Fri Jan 13 23:20:08 2012
New Revision: 1231388

URL: http://svn.apache.org/viewvc?rev=1231388&view=rev
Log:
LUCENE-3453: fix up MIGRATE.txt

Modified:
    lucene/dev/branches/lucene3453/lucene/MIGRATE.txt

Modified: lucene/dev/branches/lucene3453/lucene/MIGRATE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene3453/lucene/MIGRATE.txt?rev=1231388&r1=1231387&r2=1231388&view=diff
==============================================================================
--- lucene/dev/branches/lucene3453/lucene/MIGRATE.txt (original)
+++ lucene/dev/branches/lucene3453/lucene/MIGRATE.txt Fri Jan 13 23:20:08 2012
@@ -422,13 +422,13 @@ LUCENE-1458, LUCENE-2111: Flexible Index
 
 
 
-* LUCENE-2308: Separate IndexableFieldType from Field instances
+* LUCENE-2308,LUCENE-3453: Separate IndexableFieldType from Field instances
 
 With this change, the indexing details (indexed, tokenized, norms,
 indexOptions, stored, etc.) are moved into a separate FieldType
 instance (rather than being stored directly on the Field).
 
-This means you can create the IndexableFieldType instance once, up front,
+This means you can create the FieldType instance once, up front,
 for a given field, and then re-use that instance whenever you instantiate
 the Field.
 
@@ -439,15 +439,21 @@ Certain field types are pre-defined sinc
     IDS (does not index term frequency nor positions).  This field
     does not store its value, but exposes TYPE_STORED as well.
 
-  * BinaryField: a byte[] value that's only stored.
-
   * TextField: indexes and tokenizes a String, Reader or TokenStream
     value, without term vectors.  This field does not store its value,
     but exposes TYPE_STORED as well.
 
+  * StoredField: field that stores its value
+
+  * DocValuesField: indexes the value as a DocValues field
+
+  * NumericField: indexes the numeric value so that NumericRangeQuery
+    can be used at search-time.
+
 If your usage fits one of those common cases you can simply
-instantiate the above class.  To use the TYPE_STORED variant, do this
-instead:
+instantiate the above class.  If you need to store the value, you can
+add a separate StoredField to the document, or you can use
+TYPE_STORED for the field:
 
   Field f = new Field("field", "value", StringField.TYPE_STORED);
 
@@ -465,9 +471,14 @@ You can of course also create your own F
   t.setStored(true);
   t.setOmitNorms(true);
   t.setIndexOptions(IndexOptions.DOCS_AND_FREQS);
+  t.freeze();
 
 FieldType has a freeze() method to prevent further changes.
 
+There is also a deprecated transition API, providing the same Index,
+Store, TermVector enums from 3.x, and Field constructors taking these
+enums.
+
 When migrating from the 3.x API, if you did this before:
 
   new Field("field", "value", Field.Store.NO, Field.Indexed.NOT_ANALYZED_NO_NORMS)
@@ -528,7 +539,7 @@ If you did this before (bytes is a byte[
 
 you can now do this:
 
-  new BinaryField("field", bytes)
+  new StoredField("field", bytes)
 
 * LUCENE-3396: Analyzer.tokenStream() and .reusableTokenStream() have been made final.
   It is now necessary to use Analyzer.TokenStreamComponents to define an analysis process.



Mime
View raw message