Using EmbeddedSolrServer with static documents

2011-04-02 Thread michael.i
Hi,
I am new to solr so please excuse me if my question sounds basic.

I would like to use the EmbeddedSolrServer.
It happens that all examples I've found on the web use documents that have
been generated dynamically such as:


SolrServer solrServer = new EmbeddedSolrServer(container, "core");
SolrInputDocument doc = new SolrInputDocument();
doc.addField("docText", "This is a sample file");
solrServer.add(doc);
solrServer.commit();


I would like to be able to load a document that is stored on the filesystem.
Ideally, I would have liked to do something such as:
SolrInputDocument doc = new SolrInputDocument("path/myDoc.txt");
solrServer.add(doc);
solrServer.commit();

It does not seem possible to do such thing. Am I missing something? Are
there some best practices with regards to referring to a document on the
filesystem?

Thanx!
Michael.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-EmbeddedSolrServer-with-static-documents-tp2767614p2767614.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using EmbeddedSolrServer with static documents

2011-04-03 Thread michael.i
Hi Erick,
thanx for getting back to me.

"Well, what is "a document on the filesystem"? Solr deals
with well-formed XML documents of a specific format."

I would like to index all kinds of documents. For a start I'll be happy to
be able to work with xml and html documents.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-EmbeddedSolrServer-with-static-documents-tp2767614p2773012.html
Sent from the Solr - User mailing list archive at Nabble.com.