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 2022/10/13 17:13:58 UTC

Script Update Processor

Hello community, Let me thank you in advance for any insights you can share.

I am attempting to use the Script Update Processor as described here:
https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html#javascript

This works fine however I am attempting to use it to format a payload that is not something formatted into fields quite right.

If I log cmd.solrDoc does not get the raw stream.

Is there some way to get the raw payload so that I can process it?

Thank you so much!

----------------------------------------------------------------------
"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: Script Update Processor

Posted by Dave <ha...@gmail.com>.
No one should ever actually use a .0 version

> On Oct 14, 2022, at 8:41 AM, Matthew Castrigno <ca...@slhs.org> wrote:
> 
> This issue is easily reproduced in 9.0 using the example script and logging cmd.solrDoc in the processAdd function.
> ________________________________
> From: Eric Pugh <ep...@opensourceconnections.com>
> Sent: Friday, October 14, 2022 5:57 AM
> To: users@solr.apache.org <us...@solr.apache.org>
> Subject: Re: Script Update Processor
> 
> Would you mind creating a JIRA issue then? You can add the screenshot there. I haven’t seen this issue, but maybe haven’t dug into it, so the more reproducible it is, the easier it is for me to look into it ;-). I’d love to hear that the problem
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
> This message came from outside the St. Luke's email system.
> 
> ZjQcmQRYFpfptBannerEnd
> 
> Would you mind creating a JIRA issue then?  You can add the screenshot there.   I haven’t seen this issue, but maybe haven’t dug into it, so the more reproducible it is, the easier it is for me to look into it ;-).
> 
> I’d love to hear that the problem is reproducible on Solr 9, as that is where I would start from...
> 
>> On Oct 13, 2022, at 5:53 PM, dmitri maziuk <dm...@gmail.com> wrote:
>> 
>>> On 2022-10-13 4:44 PM, Eric Pugh wrote:
>>> Humm..  This doesn’t sound intentional at all…       Do you have a reproducible test case you can share?
>> 
>> I see them all the time on Logging page, I can attach a screenshot but it'll likely get striped of by the list software. Happens with Chrome, Edge, or Firefox. The OS is winders on both client and servers.
>> 
>> Dima
>> 
> 
> _______________________
> Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | https://urldefense.com/v3/__http://www.opensourceconnections.com__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONbPqEm_qQ$  <https://urldefense.com/v3/__http://www.opensourceconnections.com/__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONaJj_uOjA$ > | My Free/Busy <https://urldefense.com/v3/__http://tinyurl.com/eric-cal__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONaYAW19Gw$ >
> Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://urldefense.com/v3/__https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONbSmx_66A$ >
> This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.
> 
> 
> ----------------------------------------------------------------------
> "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: Script Update Processor

Posted by Matthew Castrigno <ca...@slhs.org>.
This issue is easily reproduced in 9.0 using the example script and logging cmd.solrDoc in the processAdd function.
________________________________
From: Eric Pugh <ep...@opensourceconnections.com>
Sent: Friday, October 14, 2022 5:57 AM
To: users@solr.apache.org <us...@solr.apache.org>
Subject: Re: Script Update Processor

Would you mind creating a JIRA issue then? You can add the screenshot there. I haven’t seen this issue, but maybe haven’t dug into it, so the more reproducible it is, the easier it is for me to look into it ;-). I’d love to hear that the problem
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

Would you mind creating a JIRA issue then?  You can add the screenshot there.   I haven’t seen this issue, but maybe haven’t dug into it, so the more reproducible it is, the easier it is for me to look into it ;-).

I’d love to hear that the problem is reproducible on Solr 9, as that is where I would start from...

> On Oct 13, 2022, at 5:53 PM, dmitri maziuk <dm...@gmail.com> wrote:
>
> On 2022-10-13 4:44 PM, Eric Pugh wrote:
>> Humm..  This doesn’t sound intentional at all…       Do you have a reproducible test case you can share?
>
> I see them all the time on Logging page, I can attach a screenshot but it'll likely get striped of by the list software. Happens with Chrome, Edge, or Firefox. The OS is winders on both client and servers.
>
> Dima
>

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | https://urldefense.com/v3/__http://www.opensourceconnections.com__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONbPqEm_qQ$  <https://urldefense.com/v3/__http://www.opensourceconnections.com/__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONaJj_uOjA$ > | My Free/Busy <https://urldefense.com/v3/__http://tinyurl.com/eric-cal__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONaYAW19Gw$ >
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://urldefense.com/v3/__https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw__;!!FkC3_z_N!JCG0Z2_8cCt90aDFXAoKJQpUXBhc11xVTssrltw1G_ofQvargsfOCWtzjwEDH2RQMfVzuGqz1QR3ONbSmx_66A$ >
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.


----------------------------------------------------------------------
"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: Script Update Processor

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Would you mind creating a JIRA issue then?  You can add the screenshot there.   I haven’t seen this issue, but maybe haven’t dug into it, so the more reproducible it is, the easier it is for me to look into it ;-).

I’d love to hear that the problem is reproducible on Solr 9, as that is where I would start from...

> On Oct 13, 2022, at 5:53 PM, dmitri maziuk <dm...@gmail.com> wrote:
> 
> On 2022-10-13 4:44 PM, Eric Pugh wrote:
>> Humm..  This doesn’t sound intentional at all…       Do you have a reproducible test case you can share?
> 
> I see them all the time on Logging page, I can attach a screenshot but it'll likely get striped of by the list software. Happens with Chrome, Edge, or Firefox. The OS is winders on both client and servers.
> 
> Dima
> 

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>	
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.


Re: Script Update Processor

Posted by dmitri maziuk <dm...@gmail.com>.
On 2022-10-13 4:44 PM, Eric Pugh wrote:
> Humm..  This doesn’t sound intentional at all…       Do you have a reproducible test case you can share?

I see them all the time on Logging page, I can attach a screenshot but 
it'll likely get striped of by the list software. Happens with Chrome, 
Edge, or Firefox. The OS is winders on both client and servers.

Dima


Re: Script Update Processor

Posted by Eric Pugh <ep...@opensourceconnections.com>.
Humm..  This doesn’t sound intentional at all…       Do you have a reproducible test case you can share?  

> On Oct 13, 2022, at 2:31 PM, dmitri maziuk <dm...@gmail.com> wrote:
> 
> On 2022-10-13 12:35 PM, Matthew Castrigno wrote:
>> Actually, it is the raw payload but has inserted &#8203 at what appears to be after every ","
>> Strange I suppose I can strip those without harm.
> 
> If you look at logging page in Solr admin interface, it'll have them (at least in our 6.5.0 and 8.7.0) after every comma as well.
> 
> It's a "zero-width space", it has very limited uses and I can't think of any rational reason to put one after a comma. I.e. it's got to be a bug.
> 
> Dima
> 

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed <https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>	
This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.


Re: Script Update Processor

Posted by dmitri maziuk <dm...@gmail.com>.
On 2022-10-13 12:35 PM, Matthew Castrigno wrote:
> Actually, it is the raw payload but has inserted &#8203 at what appears to be after every ","
> Strange I suppose I can strip those without harm.

If you look at logging page in Solr admin interface, it'll have them (at 
least in our 6.5.0 and 8.7.0) after every comma as well.

It's a "zero-width space", it has very limited uses and I can't think of 
any rational reason to put one after a comma. I.e. it's got to be a bug.

Dima


Re: Script Update Processor

Posted by Matthew Castrigno <ca...@slhs.org>.
Actually, it is the raw payload but has inserted &#8203 at what appears to be after every ","
Strange I suppose I can strip those without harm.
________________________________
From: Matthew Castrigno <ca...@slhs.org>
Sent: Thursday, October 13, 2022 11:13 AM
To: users@solr.apache.org <us...@solr.apache.org>
Subject: Script Update Processor

Hello community, Let me thank you in advance for any insights you can share. I am attempting to use the Script Update Processor as described here: https: //urldefense. com/v3/__https: //solr. apache. org/guide/solr/latest/configuration-guide/script-update-processor. html*javascript__;Iw!!FkC3_z_N!JNiQanjccEAL2TcAajCXXJQUseVuqdoEYjAv4IrEVhDh-VeUmbJL8ZqS8nr_wr55kX4OrDdYOP7k_A$
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

Hello community, Let me thank you in advance for any insights you can share.

I am attempting to use the Script Update Processor as described here:
https://urldefense.com/v3/__https://solr.apache.org/guide/solr/latest/configuration-guide/script-update-processor.html*javascript__;Iw!!FkC3_z_N!JNiQanjccEAL2TcAajCXXJQUseVuqdoEYjAv4IrEVhDh-VeUmbJL8ZqS8nr_wr55kX4OrDdYOP7k_A$

This works fine however I am attempting to use it to format a payload that is not something formatted into fields quite right.

If I log cmd.solrDoc does not get the raw stream.

Is there some way to get the raw payload so that I can process it?

Thank you so much!

----------------------------------------------------------------------
"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."