You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by muraalee <mu...@gmail.com> on 2007/07/19 01:40:25 UTC

Dictionary Type Lookup

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