Reputation: 21
I am getting this error when I copied IndexFiles.java
(taken from the official lucene site) onto my Eclipse.
The import org.apache.lucene.document.LongField cannot be resolved.
I replaced LongField
with LegacyLongField
as I read somewhere that LongField
is now renamed as LegacyLongField
.
Upvotes: 1
Views: 667
Reputation: 4795
You are using propably newer version of Lucene. LongField is no more in org.apache.lucene.document package. You can use LegacyLongField, as you said, but it is better to use LongPoint instead as it is written in documentation of LegacyLongField:
Deprecated.
Please use LongPoint instead
Upvotes: 1