lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michel Nadeau <aka...@gmail.com>
Subject Moving to Lucene 3.0
Date Mon, 30 Nov 2009 20:25:25 GMT
Hi !

I'm trying to fix my code to remove everything that is deprecated in order
to move to Lucene 3.0. I fixed many many items but I can't find the answer
to some answers. See items in red below:

*#1. Opening an index*
*idx = FSDirectory.getDirectory(new File(INDEX));
reader   = IndexReader.open(idx, true);
searcher = new IndexSearcher(reader);

*The function "getDirectory" is deprecated

*#2. QueryFilter / RangeFilter*
*cluFilters[i] = new QueryFilter(tmpQ);
cluFilters[i] = new RangeFilter(FILTERS_FIELD[i], FILTERS_VALUE_LOW[i],
FILTERS_VALUE_HIGH[i], true, true);*

QueryFilter and RangeFilter are deprecated.

*#3. Looping a document's fields*
*Enumeration<?> cluDFE = cluDoc.fields();
while ( cluDFE.hasMoreElements() )
{
    Field field = (Field)cluDFE.nextElement();*
    ...

The Document's fields() function is deprecated.

- Mike
akaris@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message