You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Matthew Castrigno <ca...@slhs.org> on 2023/01/06 00:09:42 UTC

Setting a parameter from a update script processor script

The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor.
https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html#javascript

Does anyone know where I can find this information?
Thank you for any insights.

----------------------------------------------------------------------
"This message is intended for the use of the person or entity to which it is addressed and may contain information that is confidential or privileged, the disclosure of which is governed by applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited. If you have received this message by error, please notify us immediately and destroy the related message."

Re: Setting a parameter from a update script processor script

Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/6/23 10:53, Matthew Castrigno wrote:
> There is a setParams but it has no argument, so it is unclear what it is using to set the parameters.
> 
> https://solr.apache.org/docs/9_1_0/core/org/apache/solr/request/SolrQueryRequest.html#setParams(org.apache.solr.common.params.SolrParams)

That does have an argument -- a SolrParams object.

But it is highly unlikely that anything having to do with update 
processors would use a SolrQueryRequest object.  I am pretty sure that 
the params being set there are URL parameters.

I do not understand the earlier message talking about command.json.

Maybe if you describe exactly what you are trying to do someone can find 
another way to accomplish it.

Thanks,
Shawn

Re: Setting a parameter from a update script processor script

Posted by Matthew Castrigno <ca...@slhs.org>.
There is a setParams but it has no argument, so it is unclear what it is using to set the parameters.

https://solr.apache.org/docs/9_1_0/core/org/apache/solr/request/SolrQueryRequest.html#setParams(org.apache.solr.common.params.SolrParams)
________________________________
From: Matthew Castrigno <ca...@slhs.org>
Sent: Friday, January 6, 2023 10:45 AM
To: users@solr.apache.org <us...@solr.apache.org>; elyograg@elyograg.org <el...@elyograg.org>
Subject: Re: Setting a parameter from a update script processor script

The need arises because the only way to differentiate between a set of commands and JSON document is the command. json parameter. This is why it is necessary so the payload can be interpreted as a command instead. ________________________________
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

The need arises because the only way to differentiate between a set of commands and JSON document is the  command.json parameter. This is why it is necessary so the payload can be interpreted as a command instead.
________________________________
From: Shawn Heisey <el...@elyograg.org>
Sent: Thursday, January 5, 2023 5:48 PM
To: users@solr.apache.org <us...@solr.apache.org>
Subject: Re: Setting a parameter from a update script processor script

On 1/5/23 17: 09, Matthew Castrigno wrote: > The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor. > https: //urldefense. com/v3/__https: //solr. apache. org/guide/solr/latest/configuration-guide/script-update-processor. html*javascript__;Iw!!FkC3_z_N!PlPO9Gv0iazBOAnTE5PibThKXKwFRLK5sV10M8ynF1IjzuJepOM2kzltObjKvh22SNBd3jp7J4PTTMrANA$
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

On 1/5/23 17:09, Matthew Castrigno wrote:
> The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor.
> https://urldefense.com/v3/__https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html*javascript__;Iw!!FkC3_z_N!PlPO9Gv0iazBOAnTE5PibThKXKwFRLK5sV10M8ynF1IjzuJepOM2kzltObjKvh22SNBd3jp7J4PTTMrANA$
>
>Does anyone know where I can find this information?
> Thank you for any insights.

 From what I can tell, parameters are a way to get arbitrary information
from solrconfig.xml to the processor ... I don't think that
communication can flow the other direction, so there should be no need
to set a parameter inside a processor.

Anyone else have a comment on it?

Thanks,
Shawn


----------------------------------------------------------------------
"This message is intended for the use of the person or entity to which it is addressed and may contain information that is confidential or privileged, the disclosure of which is governed by applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited. If you have received this message by error, please notify us immediately and destroy the related message."


----------------------------------------------------------------------
"This message is intended for the use of the person or entity to which it is addressed and may contain information that is confidential or privileged, the disclosure of which is governed by applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited. If you have received this message by error, please notify us immediately and destroy the related message."

Re: Setting a parameter from a update script processor script

Posted by Matthew Castrigno <ca...@slhs.org>.
The need arises because the only way to differentiate between a set of commands and JSON document is the  command.json parameter. This is why it is necessary so the payload can be interpreted as a command instead.
________________________________
From: Shawn Heisey <el...@elyograg.org>
Sent: Thursday, January 5, 2023 5:48 PM
To: users@solr.apache.org <us...@solr.apache.org>
Subject: Re: Setting a parameter from a update script processor script

On 1/5/23 17: 09, Matthew Castrigno wrote: > The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor. > https: //urldefense. com/v3/__https: //solr. apache. org/guide/solr/latest/configuration-guide/script-update-processor. html*javascript__;Iw!!FkC3_z_N!PlPO9Gv0iazBOAnTE5PibThKXKwFRLK5sV10M8ynF1IjzuJepOM2kzltObjKvh22SNBd3jp7J4PTTMrANA$
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

On 1/5/23 17:09, Matthew Castrigno wrote:
> The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor.
> https://urldefense.com/v3/__https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html*javascript__;Iw!!FkC3_z_N!PlPO9Gv0iazBOAnTE5PibThKXKwFRLK5sV10M8ynF1IjzuJepOM2kzltObjKvh22SNBd3jp7J4PTTMrANA$
>
> Does anyone know where I can find this information?
> Thank you for any insights.

 From what I can tell, parameters are a way to get arbitrary information
from solrconfig.xml to the processor ... I don't think that
communication can flow the other direction, so there should be no need
to set a parameter inside a processor.

Anyone else have a comment on it?

Thanks,
Shawn


----------------------------------------------------------------------
"This message is intended for the use of the person or entity to which it is addressed and may contain information that is confidential or privileged, the disclosure of which is governed by applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this information is strictly prohibited. If you have received this message by error, please notify us immediately and destroy the related message."

Re: Setting a parameter from a update script processor script

Posted by Shawn Heisey <el...@elyograg.org>.
On 1/5/23 17:09, Matthew Castrigno wrote:
> The documentation show how to get a parameter but I cannot see where I can find out how to set a parameter in my update script processor.
> https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html#javascript
> 
> Does anyone know where I can find this information?
> Thank you for any insights.

 From what I can tell, parameters are a way to get arbitrary information 
from solrconfig.xml to the processor ... I don't think that 
communication can flow the other direction, so there should be no need 
to set a parameter inside a processor.

Anyone else have a comment on it?

Thanks,
Shawn