Results 1 to 2 of 2
- 09-17-2011, 04:10 AM #1Member
- Join Date
- Sep 2011
- Rep Power
Getting the term object from a string.
I have a school assignment that uses lucene. Essentially, I have to implement a very basic search just using normalized term frequency(per docuemnt).
I store the term frequency in a hash table(Document=>term frequency).
What I need to know is how to get at a Term object given the term as a string.
I understand how to iterate over all the terms, but how can I just get at the Term object for the specified string.
For example, I would like to do something like this:
IndexReader r = IndexReader.open("..."); Term t = r.getTerm("myterm");
Last edited by koolmelee; 09-17-2011 at 09:00 AM.
- 09-17-2011, 06:59 PM #2
Re: Getting the term object from a string.
Hi. I decided that it is not correct question. You can find Document's object, Then you can get all fields from this Document. then you can create any Term yourself. So Why do you want to get Term?Skype: petrarsentev
- By NehaDP in forum Jobs OfferedReplies: 0Last Post: 09-06-2011, 04:59 PM
- By kakinyim in forum CLDC and MIDPReplies: 0Last Post: 04-23-2011, 11:41 AM
- By MrUni in forum LuceneReplies: 0Last Post: 12-14-2010, 04:00 PM
- By Gelembjuk in forum New To JavaReplies: 6Last Post: 10-29-2008, 11:19 PM
- By Gilgamesh in forum New To JavaReplies: 1Last Post: 11-28-2007, 11:26 PM