Re: Transform a SolrDocument into a SolrInputDocument

2011-03-22 Thread Marc SCHNEIDER
Ok that's perfectly clear. Thanks a lot for all your answers! Marc. On Mon, Mar 21, 2011 at 4:34 PM, Gora Mohanty g...@mimirtech.com wrote: On Mon, Mar 21, 2011 at 8:33 PM, Marc SCHNEIDER marc.schneide...@gmail.com wrote: Hi Erick, Thanks for your answer. I'm a quite newbie to Solr so

Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hello, I'd like to know the fastest way (code lines) to update a field of a document. So my idea was: 1) Get a SolrDocument 2) Add all fields of the SolrDocument to a new SolrInputDocument 3) Update the field in SolrInputDocument 4) Add SolrInputDocument to the server and commit it Is there a

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Péter Király
Hi Marc, as far as I know the best way to do it is working from the original source, because it is possible, that not all fields are stores, and the original content of the not stored fields is not inside the Solr document. Péter 2011/3/21 Marc SCHNEIDER marc.schneide...@gmail.com: Hello,

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Ahmet Arslan
Is there a fastest way to do that? I mean transforming a SolrDocument into a SolrInputDocument? Does these static methods help? org.apache.solr.client.solrj.util.ClientUtils.toSolrDocument() org.apache.solr.client.solrj.util.ClientUtils.toSolrInputDocument()

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hi Ahmet, That did it, thanks a lot! Marc. On Mon, Mar 21, 2011 at 3:03 PM, Ahmet Arslan iori...@yahoo.com wrote: Is there a fastest way to do that? I mean transforming a SolrDocument into a SolrInputDocument? Does these static methods help?

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Erick Erickson
The problem is that unless you *stored* every field in the Solr index, getting the document back will not have all the original information. Getting a Solr document only returns the stored fields. And updating is really a delete followed by an add. So let's say you have field A that hasn't been

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Marc SCHNEIDER
Hi Erick, Thanks for your answer. I'm a quite newbie to Solr so I'm a little bit confused. Do you mean that (using Solrj in my case) I should add all fields (stored and not stored) before adding the document to the index? Thanks, Marc. On Mon, Mar 21, 2011 at 3:27 PM, Erick Erickson

Re: Transform a SolrDocument into a SolrInputDocument

2011-03-21 Thread Gora Mohanty
On Mon, Mar 21, 2011 at 8:33 PM, Marc SCHNEIDER marc.schneide...@gmail.com wrote: Hi Erick, Thanks for your answer. I'm a quite newbie to Solr so I'm a little bit confused. Do you mean that (using Solrj in my case) I should add all fields (stored and not stored) before adding the document to