lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muraalee <muraa...@gmail.com>
Subject Dictionary Type Lookup
Date Wed, 18 Jul 2007 23:40:25 GMT

Hi,

I am trying to model a Dictionary Type Search in Lucene. My approach was
this

- Load the dictionary file ( words & their meanings ) and index each
dictionary term and associated meaning as a Lucene Document.
- Use IndexReader's term method to peek at the index and get the TermEnum.
TermEnum' next() return's the next term.

The snippet looks like this
  TermEnum browseTermEnum = indexReader.terms(new Term(browseIndex,
browsableTerm));
  while( browseTermEnum.next()){
     System.out.println(browseTermEnum.term().text())
  }

This works fine, and i can fetch next 'n' terms. 
The only problem i see with this route is, i can't get the previous terms
!!!

1. Is there a way to get previous terms from TermEnum ?
2. Is there a better way to model Dictionary Type lookup in Lucene ?


Appreciate your suggestions ?

Thanks
Murali V


-- 
View this message in context: http://www.nabble.com/Dictionary-Type-Lookup-tf4107251.html#a11679841
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message