Results 1 to 2 of 2
- 09-17-2011, 04:10 AM #1
Member
- Join Date
- Sep 2011
- Posts
- 1
- Rep Power
- 0
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:
Also, how do you get the term frequencies given a Document object?Java Code: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
http://TrackStudio.com
Similar Threads
-
Seeking Sr Server Side Java Developers for Long term contract in Atlanta, GA!
By NehaDP in forum Jobs OfferedReplies: 0Last Post: 09-06-2011, 04:59 PM -
Casting a String object to a Form object
By kakinyim in forum CLDC and MIDPReplies: 0Last Post: 04-23-2011, 11:41 AM -
Number of searched term in Documents
By MrUni in forum LuceneReplies: 0Last Post: 12-14-2010, 03:00 PM -
Object to String.
By Gelembjuk in forum New To JavaReplies: 6Last Post: 10-29-2008, 10:19 PM -
String vs Object
By Gilgamesh in forum New To JavaReplies: 1Last Post: 11-28-2007, 10:26 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks