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 Iris Soto <ms...@agssa.net> on 2007/01/11 17:19:10 UTC

How can I update a specific field of an existing document?

Hello everybody,
I want update a specific field in a document, but i don't find how do it 
in the documentation of Solr.
Is that posible?, I need to index only a field for a document, Do i have 
to index all the document for this?
The problem is that i have to transform a bizdata object to a file 
content xml in java,  i should to build all the document xml step by 
step, field by field, retrieving all the bizdata of database to be 
passed to Solr.

Thanks in advance.

-- 
Iris Soto 


Re: How can I update a specific field of an existing document?

Posted by Iris Soto <ms...@agssa.net>.
Thorsten Scherler escribió:
> On Thu, 2007-01-11 at 17:48 +0100, Thorsten Scherler wrote:
>   
>> On Thu, 2007-01-11 at 10:19 -0600, Iris Soto wrote:
>>     
>>> Hello everybody,
>>> I want update a specific field in a document, but i don't find how do it 
>>> in the documentation of Solr.
>>> Is that posible?, I need to index only a field for a document, Do i have 
>>> to index all the document for this?
>>>       
>
> No, just the one document. Let's say you have a CMS and you edit one
> document. You will need to re-index this document only by using the the
> add solr statement for the whole document (not one field only).
>
>   
>>> The problem is that i have to transform a bizdata object to a file 
>>> content xml in java,  i should to build all the document xml step by 
>>> step, field by field, retrieving all the bizdata of database to be 
>>> passed to Solr.
>>>       
>
> see above only for the document where the field are changed. I wrote a
> small cocoon based plugin in forrest doing the cms related example.
>
> It adds an document related solr gui for a cms like system. Maybe that
> gives you some ideas for your own app.
>
>
>   
>> On Thu, 2007-01-11 at 06:43 -0500, Erik Hatcher wrote:
>>     
>>> In Lucene to update a document the operation is really a delete  
>>> followed by an add.  You will need to add the complete document as  
>>> there is no such "update only a field" semantics in Lucene. 
>>>       
>> This is from a thread in the dev list.
>>     
>
> could not access the archive the first time:
> http://www.nabble.com/forum/ViewPost.jtp?post=8275908&framed=y
>
> HTH
>
> salu2
>
>   
>> So no it is not possible to just update one field.
>>
>> HTH
>>
>> salu2
>>
>>     
>>> Thanks in advance.
>>>
>>>       
I'm obtaining all the document to be passed and indexed by Solr.
Thank you  for  to clarify my doubt.

¡Saludos!.

-- 
Iris Soto 


Re: How can I update a specific field of an existing document?

Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2007-01-11 at 17:48 +0100, Thorsten Scherler wrote:
> On Thu, 2007-01-11 at 10:19 -0600, Iris Soto wrote:
> > Hello everybody,
> > I want update a specific field in a document, but i don't find how do it 
> > in the documentation of Solr.
> > Is that posible?, I need to index only a field for a document, Do i have 
> > to index all the document for this?

No, just the one document. Let's say you have a CMS and you edit one
document. You will need to re-index this document only by using the the
add solr statement for the whole document (not one field only).

> > The problem is that i have to transform a bizdata object to a file 
> > content xml in java,  i should to build all the document xml step by 
> > step, field by field, retrieving all the bizdata of database to be 
> > passed to Solr.

see above only for the document where the field are changed. I wrote a
small cocoon based plugin in forrest doing the cms related example.

It adds an document related solr gui for a cms like system. Maybe that
gives you some ideas for your own app.


> > 
> 
> On Thu, 2007-01-11 at 06:43 -0500, Erik Hatcher wrote:
> > In Lucene to update a document the operation is really a delete  
> > followed by an add.  You will need to add the complete document as  
> > there is no such "update only a field" semantics in Lucene. 
> 
> This is from a thread in the dev list.

could not access the archive the first time:
http://www.nabble.com/forum/ViewPost.jtp?post=8275908&framed=y

HTH

salu2

> 
> So no it is not possible to just update one field.
> 
> HTH
> 
> salu2
> 
> > Thanks in advance.
> > 
> 
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)



Re: How can I update a specific field of an existing document?

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2007-01-11 at 10:19 -0600, Iris Soto wrote:
> Hello everybody,
> I want update a specific field in a document, but i don't find how do it 
> in the documentation of Solr.
> Is that posible?, I need to index only a field for a document, Do i have 
> to index all the document for this?
> The problem is that i have to transform a bizdata object to a file 
> content xml in java,  i should to build all the document xml step by 
> step, field by field, retrieving all the bizdata of database to be 
> passed to Solr.
> 

On Thu, 2007-01-11 at 06:43 -0500, Erik Hatcher wrote:
> In Lucene to update a document the operation is really a delete  
> followed by an add.  You will need to add the complete document as  
> there is no such "update only a field" semantics in Lucene. 

This is from a thread in the dev list.

So no it is not possible to just update one field.

HTH

salu2

> Thanks in advance.
>