lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Sekiguchi <k...@r.email.ne.jp>
Subject Re: Updating in Solr.SOLR-139
Date Fri, 18 Apr 2008 14:30:49 GMT
You don't need any additional attributes in schema.xml, but the field
should be stored.
You can overwrite the existing field value of the doc AAA w/
the following XML:

<add>
<doc>
  <field name="id">AAA</field>
  <field name="tags">German</field>
</doc>
</add>

and post the following URL:

http://localhost:8389/solr/update?mode=tags:overwrite&commit=true

If the tags field is defined as multivalued="true", you can append new tags:

http://localhost:8389/solr/update?mode=tags:append&commit=true
<add>
<doc>
  <field name="id">AAA</field>
  <field name="tags">Japanese</field>
  <field name="tags">French</field>
</doc>
</add>

For number fields, you can use "increment" command.

Note that the mode parameter can be acceptable one or more name:command 
pairs:

mode=fieldName1:command1,fieldName2:command2,...

Thank you,

Koji


nutchvf wrote:
> Hi!
> There are any option to update a field (or a set of fields) of a document
> indexed in Solr,without having to update all the fields of the entire
> document???
> I have seen the SOLR-139 patch,but  I do not know what is the proper syntax
> of the command (or the xml to post) to update the document.Is required an
> additional tag in the schema.xml describing the updatable property???
>
> For example:
>
> <field name="name" type="text" updateable="true" indexed="true"
> stored="true"/> 
>
> Please,I hope any suggestion....!!!
>
> What is the xml required for the updating???For example,something like this:
>
> <add mode="popularity=OVERWRITE">
> <field name="id">SOLR1000</field>
> <field name="popularity">9</field>
> </add>
>
>
> Regards..
>   


Mime
View raw message