lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Øie <k...@gan.no>
Subject Re: Indexing of documents in memory
Date Mon, 18 Nov 2002 06:50:04 GMT
The org.apache.lucene.store.InputStream is not a _stream_ per see as it 
requires a seek() function and it is therefore not compatible with the 
java.io.InputStream consept, however you can quite easily create a 
java.io.InputStream by grabbing hold of the byte content of a 
org.apache.lucene.store.InputStream and stuff it into a 
java.io.ByteArrayInputStream.

This doesn't make any sense anyhow because the raw bytestream from a 
RAMDirectory will not make any real sense to a HTML parser because the 
content of the RAMDir is an binary index. If you want to store the 
input HTML documents you should store them into a byte or char array in 
a file or database.

mvh karl øie



On Monday, Nov 18, 2002, at 03:24 Europe/Oslo, Vinay Kakade wrote:

> Hi
> I am trying to use RAMDirectory to store the input
> HTML documents which are used to create index by the
> IndexHTML demo program, but I am facing problems.
> I tried to get individual InputStream objects for
> individual files from RAMDirectory & pass it to
> HTMLParser class to parse the file, but the HTMLParser
> class accepts java.io.InputStream object while
> RAMDirectory returns lucene.store.InputStream object.
> Is there any way to perform any conversion between
> there two objects? or do I have to modify HTMLParser
> class & all other classes it uses to achieve this??
> Please let me know
> regards
> Vinay.
>
>
> --- Otis Gospodnetic <otis_gospodnetic@yahoo.com>
> wrote:
>> Look at RAMDirectory.
>>
>> Otis
>>
>> --- Vinay Kakade <vinaykakade@yahoo.com> wrote:
>>> Hi,
>>>
>>> I want to use Lucene for indexing some documents
>> which
>>> are in memory. I do not want to store them in a
>>> seperate directory.
>>> The IndexWriter class accepts directory name,
>> where
>>> all documents to be indexed are stored. Is there
>> any
>>> way by which we can specify memory buffer in which
>>> documents are stored while creating Index?
>>> Thanks
>>> Vinay.
>>>
>>>
>>> __________________________________________________
>>> Do you Yahoo!?
>>> Yahoo! Web Hosting - Let the expert host your site
>>> http://webhosting.yahoo.com
>>>
>>> --
>>> To unsubscribe, e-mail:
>>>
>> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <mailto:lucene-user-help@jakarta.apache.org>
>>>
>>
>>
>> __________________________________________________
>> Do you Yahoo!?
>> Yahoo! Web Hosting - Let the expert host your site
>> http://webhosting.yahoo.com
>>
>> --
>> To unsubscribe, e-mail:
>> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:lucene-user-help@jakarta.apache.org>
>>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail:   
> <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:lucene-user-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message