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 Dorian Hoxha <do...@gmail.com> on 2016/11/17 07:06:25 UTC

"add and limit" update modifier or scripted update like elasticsearch

Hi,

Is there an "add and limit" update modifier (couldn't find in docs) ? If
not, can I run a script to update a document (still couldn't find anything)
? If not, how should I do that  (custom plugin? )?

Thank You

Re: "add and limit" update modifier or scripted update like elasticsearch

Posted by Dorian Hoxha <do...@gmail.com>.
Hi Alex,

Yes I saw the udpate-modifiers, but there isn't an add-and-limit() thing.
The update request processors should work.

Thanks

On Thu, Nov 17, 2016 at 10:26 AM, Alexandre Rafalovitch <ar...@gmail.com>
wrote:

> Solr has an partial update support, though you need to be careful to
> have all fields retrievable (stored or docvalue).
> https://cwiki.apache.org/confluence/display/solr/
> Updating+Parts+of+Documents
>
> Solr also has UpdateRequestProcessor which can do many things,
> including scripting.
> https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors
> I believe, you would need to place it AFTER DistributedUpdateProcessor
> if you want to apply it on the whole reconstructed "updated" document
> as opposed to just on changes sent.
>
> Regards,
>    Alex.
> ----
> Solr Example reading group is starting November 2016, join us at
> http://j.mp/SolrERG
> Newsletter and resources for Solr beginners and intermediates:
> http://www.solr-start.com/
>
>
> On 17 November 2016 at 18:06, Dorian Hoxha <do...@gmail.com> wrote:
> > Hi,
> >
> > Is there an "add and limit" update modifier (couldn't find in docs) ? If
> > not, can I run a script to update a document (still couldn't find
> anything)
> > ? If not, how should I do that  (custom plugin? )?
> >
> > Thank You
>

Re: "add and limit" update modifier or scripted update like elasticsearch

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Solr has an partial update support, though you need to be careful to
have all fields retrievable (stored or docvalue).
https://cwiki.apache.org/confluence/display/solr/Updating+Parts+of+Documents

Solr also has UpdateRequestProcessor which can do many things,
including scripting.
https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors
I believe, you would need to place it AFTER DistributedUpdateProcessor
if you want to apply it on the whole reconstructed "updated" document
as opposed to just on changes sent.

Regards,
   Alex.
----
Solr Example reading group is starting November 2016, join us at
http://j.mp/SolrERG
Newsletter and resources for Solr beginners and intermediates:
http://www.solr-start.com/


On 17 November 2016 at 18:06, Dorian Hoxha <do...@gmail.com> wrote:
> Hi,
>
> Is there an "add and limit" update modifier (couldn't find in docs) ? If
> not, can I run a script to update a document (still couldn't find anything)
> ? If not, how should I do that  (custom plugin? )?
>
> Thank You