You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bing Hua <bh...@cornell.edu> on 2012/12/04 20:05:06 UTC

SolrCell takes InputStream

Hi,

While using ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest("/update/extract");

The two ways of adding a file are
up.addFile(File)
up.addContentStream(ContentStream)

However my raw files are stored on some remote storage devices. I am able to
get an InputStream object for the file to be indexed. To me it may seem
awkward to have the file temporarily stored locally. Is there a way of
directly passing the InputStream in (e.g. constructing ContentStream using
the InputStream)?

Thanks.



--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCell-takes-InputStream-tp4024315.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCell takes InputStream

Posted by Chris Hostetter <ho...@fucit.org>.
: However my raw files are stored on some remote storage devices. I am able to
: get an InputStream object for the file to be indexed. To me it may seem
: awkward to have the file temporarily stored locally. Is there a way of
: directly passing the InputStream in (e.g. constructing ContentStream using
: the InputStream)?

Sure, go write ahead.

ContentStream is a really simple abstraction designed to make it easy to 
add some common pieces of information to either an InputStream or a 
Reader.  Take a look at ContentStreamBase as a starting point for creating 
your own subclass that can point to whatever InputStream you want.


-Hoss