lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/document Field.java
Date Wed, 01 Sep 2004 22:11:07 GMT
dnaber      2004/09/01 15:11:07

  Modified:    src/java/org/apache/lucene/document Field.java
  Log:
  deprecate the static methods
  
  Revision  Changes    Path
  1.22      +20 -8     jakarta-lucene/src/java/org/apache/lucene/document/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/document/Field.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Field.java	1 Sep 2004 20:34:44 -0000	1.21
  +++ Field.java	1 Sep 2004 22:11:07 -0000	1.22
  @@ -139,13 +139,16 @@
   
     /** Constructs a String-valued Field that is not tokenized, but is indexed
       and stored.  Useful for non-text fields, e.g. date or url.  
  -   */
  +    @deprecated use {@link #Field(String, String, Field.Store, Field.Index)
  +      Field(name, value, Field.Store.YES, Field.Index.UN_TOKENIZED)} instead */
     public static final Field Keyword(String name, String value) {
       return new Field(name, value, true, true, false);
     }
   
     /** Constructs a String-valued Field that is not tokenized nor indexed,
  -    but is stored in the index, for return with hits. */
  +    but is stored in the index, for return with hits.
  +    @deprecated use {@link #Field(String, String, Field.Store, Field.Index)
  +      Field(name, value, Field.Store.YES, Field.Index.NO)} instead */
     public static final Field UnIndexed(String name, String value) {
       return new Field(name, value, true, false, false);
     }
  @@ -160,7 +163,9 @@
     }
   
     /** Constructs a Date-valued Field that is not tokenized and is indexed,
  -      and stored in the index, for return with hits. */
  +      and stored in the index, for return with hits.
  +      @deprecated use {@link #Field(String, String, Field.Store, Field.Index)
  +      Field(name, value, Field.Store.YES, Field.Index.UN_TOKENIZED)} instead */
     public static final Field Keyword(String name, Date value) {
       return new Field(name, DateField.dateToString(value), true, true, false);
     }
  @@ -169,33 +174,40 @@
       and is stored in the index, for return with hits.  Useful for short text
       fields, like "title" or "subject".
       @deprecated use {@link #Field(String, String, Field.Store, Field.Index, Field.TermVector)
  -      Field(name, value, Field.Store.YES, Field.Index.TOKENIZED, boolean)} instead */
  +      Field(name, value, Field.Store.YES, Field.Index.TOKENIZED, storeTermVector)} instead
*/
     public static final Field Text(String name, String value, boolean storeTermVector) {
       return new Field(name, value, true, true, true, storeTermVector);
     }
   
     /** Constructs a String-valued Field that is tokenized and indexed,
  -    but that is not stored in the index.  Term vector will not be stored for this field.
*/
  +    but that is not stored in the index.  Term vector will not be stored for this field.
  +    @deprecated use {@link #Field(String, String, Field.Store, Field.Index)
  +      Field(name, value, Field.Store.NO, Field.Index.TOKENIZED)} instead */
     public static final Field UnStored(String name, String value) {
       return UnStored(name, value, false);
     }
   
     /** Constructs a String-valued Field that is tokenized and indexed,
  -    but that is not stored in the index. */
  +    but that is not stored in the index.
  +    @deprecated use {@link #Field(String, String, Field.Store, Field.Index, Field.TermVector)
  +      Field(name, value, Field.Store.NO, Field.Index.TOKENIZED, storeTermVector)} instead
*/
     public static final Field UnStored(String name, String value, boolean storeTermVector)
{
       return new Field(name, value, false, true, true, storeTermVector);
     }
   
     /** Constructs a Reader-valued Field that is tokenized and indexed, but is
       not stored in the index verbatim.  Useful for longer text fields, like
  -    "body". Term vector will not be stored for this field. */
  +    "body". Term vector will not be stored for this field.
  +    @deprecated use {@link #Field(String, Reader) Field(name, value)} instead */
     public static final Field Text(String name, Reader value) {
       return Text(name, value, false);
     }
   
     /** Constructs a Reader-valued Field that is tokenized and indexed, but is
       not stored in the index verbatim.  Useful for longer text fields, like
  -    "body". */
  +    "body".
  +    @deprecated use {@link #Field(String, Reader, Field.TermVector)
  +      Field(name, value, storeTermVector)} instead */
     public static final Field Text(String name, Reader value, boolean storeTermVector) {
       Field f = new Field(name, value);
       f.storeTermVector = storeTermVector;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message