Mailing List Archive

Field static methods missing?
Beginner question(!);

Many of the examples that I see use what look like static factory
methods on Field, Field.Text(..), Field.Keyword(..), etc.

But in the current download package lucene-core-2.1.0.jar I don't see
any of these methods.
And, the JavaDoc pages
(http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Field.html)
do not include them.

Are they obsolete? Documentation old? Particularly I'm unclear on
what to replace
Field.KeyWord("date", dateWritten) with.

Thanks.


--------------------------------------------------------
Gregory Guthrie
guthrie@mum.edu
MUM Faculty -FM1068
Fairfield, IA 52557
--------------------------------------------------------
Re: Field static methods missing? [ In reply to ]
: Are they obsolete? Documentation old? Particularly I'm unclear on
: what to replace
: Field.KeyWord("date", dateWritten) with.

well written examples/articles should tell you which version of lucene
they are using ... those methods were deprecatd in 1.9, 2.0 (being a
major revision) eliminated those deprecated methods.

The FAQ covers how to figure out what you should do to try and migrate 1.4
code to 2.x...

http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-86d479476c63a2579e867b75d4faa9664ef6cf4d

...in general, if you just want to review the deprecation info in the
javadocs, the 1.9 javadocs are available on the site...

http://lucene.apache.org/java/1_9_0/api/index.html

(all webpages/docs from the last several releases are archived online, see
the "Site Versions" option in the left nav)

-Hoss