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 Pradeep Kumar K <pr...@robosoftin.com> on 2002/06/05 16:33:42 UTC

Document Object

Hi all

Is there any way to type cast a String Object to Document object.

ie, Document object can be converted to its String from by using method 
'toString()'. How we can convert it back to Document object.

Any help will be greatly appreciated.

Regards
Pradeep


--------------------------------------------------------------
Robosoft Technologies, Mangalore, India



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Document Object

Posted by Otis Gospodnetic <ot...@yahoo.com>.
As far as I know there is no generic way to do that.
You can parse the String in your application, form Fields, add them to
a Document, and there you go, but there is nothing generic.  Besides
field names and values, your String would also have to contain meta
data about each field, whether it is to be indexed, unindexed,
tokenized or not tokenized, etc.
e.g.
"field1:value1<Keyword>, field2:value2<UnStored>"

Maybe there are better approaches.  This is just the first thing that
came to mind.

Good luck, and if you implement something generic please contribute it
to the project.

Thanks,
Otis


--- Pradeep Kumar K <pr...@robosoftin.com> wrote:
> Hi all
> 
> Is there any way to type cast a String Object to Document object.
> 
> ie, Document object can be converted to its String from by using
> method 
> 'toString()'. How we can convert it back to Document object.
> 
> Any help will be greatly appreciated.
> 
> Regards
> Pradeep
> 
> 
> --------------------------------------------------------------
> Robosoft Technologies, Mangalore, India
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>