Re: I cannot get nested objects to index - with image links

2022-10-27 Thread Thomas Corthals
Hi Matthew

All the fields in your schema are required="true". This means they are
required for all documents, whether parents or children (or standalone).
"Required" fields (from a business logic perspective) on parents and
children will usually be different and that can't be enforced in a Solr
schema.

The only fields that can be required="true" are the ones that are required
for all types of documents. The uniqueKeyField is definitely one of them.
For all other fields, it might make more sense to handle this constraint in
your application.

Thomas

Op do 27 okt. 2022 om 01:08 schreef Matthew Castrigno :

> Thank you so much for your response, Thomas, I do appreciate it.
> I made the changes, but I am getting a different error now. Did I not
> interpret your instructions correctly?
> https://i.postimg.cc/SNM4t7vs/updated-schema.png
>
> https://i.postimg.cc/RZtcF8bB/Screenshot-2022-10-26-170222.png
>
> --
> *From:* Thomas Corthals 
> *Sent:* Tuesday, October 25, 2022 1:28 AM
> *To:* users@solr.apache.org 
> *Subject:* Re: I cannot get nested objects to index - with image links
>
> Hi Matthew The (pseudo-)field in which you want to put the nested
> documents ("content" in your example) should not be added to the schema.
> The actual fields of the nested document (id, stuff1, stuff2) need to match
> an explicit field definition
> ZjQcmQRYFpfptBannerStart
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
>
> ZjQcmQRYFpfptBannerEnd
>
> Hi Matthew
>
> The (pseudo-)field in which you want to put the nested documents ("content"
> in your example) should not be added to the schema. The actual fields of
> the nested document (id, stuff1, stuff2) need to match an explicit field
> definition or a dynamicField definition in your schema though.
>
> Thomas
>
> Op ma 24 okt. 2022 om 23:48 schreef Matthew Castrigno :
>
> > Hello Community, Thank you for taking the time to read my message.
> >
> > I am attempting to index (update) a document with a nested object.
> >
> > In reading the documentation is seems to state that the fields of the
> > nested object do not need to be and should not be added
> >
> > to schema.xml.  I am getting error that the field of the nested object is
> > undefined, and I am not sure what I am doing wrong.
> >
> > Any insights appreciated. Thank you
> >
> > https://urldefense.com/v3/__https://i.postimg.cc/25GtB1Mc/update.png__;!!FkC3_z_N!MH9mbztbPvc05Og3x_fcnapmPzux7fhqgdChsAIR0bqiTiV_-BVnIdI8Z---HIWeD5TLbiwytoGIDSsB$
> >
> > https://urldefense.com/v3/__https://i.postimg.cc/SKk5s6TY/schema.png__;!!FkC3_z_N!MH9mbztbPvc05Og3x_fcnapmPzux7fhqgdChsAIR0bqiTiV_-BVnIdI8Z---HIWeD5TLbiwytlHh85s3$
> >
> > --
> > "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."
>


Subscribe Request : users@solr.apache.org

2022-10-27 Thread Arun sasikumar
Hi ,

Please subscribe me to the mailing list

Thanks,
Arun


Re: Subscribe Request : users@solr.apache.org

2022-10-27 Thread Gora Mohanty
On Thu, 27 Oct 2022 at 18:20, Arun sasikumar  wrote:

> Hi ,
>
> Please subscribe me to the mailing list
>

To subscribe to the Solr User List, please send mail to
users-subscr...@solr.apache.org with "subscribe" in the subject line,
rather than sending mail directly to the user list. Please see
https://solr.apache.org/community.html for details

Regards,
Gora


Re: I cannot get nested objects to index - with image links

2022-10-27 Thread Matthew Castrigno
Thank you, Thomas! Changing the required to false allowed the document to be 
indexed. I did not gleam this information from the SOLR documentation regarding 
nested documents. Do you know of any good sources for educational material on 
this subject? I cannot change the payloads that I am working with 
unfortunately. They make heavy use of deeply nested json object. Thank you 
again for your assistance, it is most appreciated!

From: Thomas Corthals 
Sent: Thursday, October 27, 2022 1:34 AM
To: Matthew Castrigno 
Cc: users@solr.apache.org 
Subject: Re: I cannot get nested objects to index - with image links

Hi Matthew All the fields in your schema are required="true". This means they 
are required for all documents, whether parents or children (or standalone). 
"Required" fields (from a business logic perspective) on parents
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.

ZjQcmQRYFpfptBannerEnd
Hi Matthew

All the fields in your schema are required="true". This means they are required 
for all documents, whether parents or children (or standalone). "Required" 
fields (from a business logic perspective) on parents and children will usually 
be different and that can't be enforced in a Solr schema.

The only fields that can be required="true" are the ones that are required for 
all types of documents. The uniqueKeyField is definitely one of them. For all 
other fields, it might make more sense to handle this constraint in your 
application.

Thomas

Op do 27 okt. 2022 om 01:08 schreef Matthew Castrigno 
mailto:castr...@slhs.org>>:
Thank you so much for your response, Thomas, I do appreciate it.
I made the changes, but I am getting a different error now. Did I not interpret 
your instructions correctly?
https://i.postimg.cc/SNM4t7vs/updated-schema.png 
[i.postimg.cc]

https://i.postimg.cc/RZtcF8bB/Screenshot-2022-10-26-170222.png 
[i.postimg.cc]


From: Thomas Corthals mailto:tho...@klascement.net>>
Sent: Tuesday, October 25, 2022 1:28 AM
To: users@solr.apache.org 
mailto:users@solr.apache.org>>
Subject: Re: I cannot get nested objects to index - with image links

Hi Matthew The (pseudo-)field in which you want to put the nested documents 
("content" in your example) should not be added to the schema. The actual 
fields of the nested document (id, stuff1, stuff2) need to match an explicit 
field definition
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.

ZjQcmQRYFpfptBannerEnd

Hi Matthew

The (pseudo-)field in which you want to put the nested documents ("content"
in your example) should not be added to the schema. The actual fields of
the nested document (id, stuff1, stuff2) need to match an explicit field
definition or a dynamicField definition in your schema though.

Thomas

Op ma 24 okt. 2022 om 23:48 schreef Matthew Castrigno 
mailto:castr...@slhs.org>>:

> Hello Community, Thank you for taking the time to read my message.
>
> I am attempting to index (update) a document with a nested object.
>
> In reading the documentation is seems to state that the fields of the
> nested object do not need to be and should not be added
>
> to schema.xml.  I am getting error that the field of the nested object is
> undefined, and I am not sure what I am doing wrong.
>
> Any insights appreciated. Thank you
>
> https://urldefense.com/v3/__https://i.postimg.cc/25GtB1Mc/update.png__;!!FkC3_z_N!MH9mbztbPvc05Og3x_fcnapmPzux7fhqgdChsAIR0bqiTiV_-BVnIdI8Z---HIWeD5TLbiwytoGIDSsB$
>
> https://urldefense.com/v3/__https://i.postimg.cc/SKk5s6TY/schema.png__;!!FkC3_z_N!MH9mbztbPvc05Og3x_fcnapmPzux7fhqgdChsAIR0bqiTiV_-BVnIdI8Z---HIWeD5TLbiwytlHh85s3$
>
> --
> "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

Re: I cannot get nested objects to index - with image links

2022-10-27 Thread Dave
Well honestly it’s more or less implied that if a field is declared required, 
it’s required in all documents, parent or children.  Perhaps an inherit field 
would have been applicable if such exists(I don’t think so) and it’s documented 
quite clearly here:

https://solr.apache.org/guide/solr/latest/indexing-guide/field-type-definitions-and-properties.html

Child documents aren’t like a sub data structure inside of the parent, they are 
still their own document and must abide by the rules in the schema. 

It’s also documented as such here:

https://solr.apache.org/guide/8_0/indexing-nested-documents.html

“it may be infeasible to use required”

> On Oct 27, 2022, at 12:37 PM, Matthew Castrigno  wrote:
> 
> Thank you, Thomas! Changing the required to false allowed the document to be 
> indexed. I did not gleam this information from the SOLR documentation 
> regarding nested documents. Do you know of any good sources for educational 
> material on this subject? I cannot change the payloads that I am working with 
> unfortunately. They make heavy use of deeply nested json object. Thank you 
> again for your assistance, it is most appreciated!
> 
> From: Thomas Corthals 
> Sent: Thursday, October 27, 2022 1:34 AM
> To: Matthew Castrigno 
> Cc: users@solr.apache.org 
> Subject: Re: I cannot get nested objects to index - with image links
> 
> Hi Matthew All the fields in your schema are required="true". This means they 
> are required for all documents, whether parents or children (or standalone). 
> "Required" fields (from a business logic perspective) on parents
> ZjQcmQRYFpfptBannerStart
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> 
> ZjQcmQRYFpfptBannerEnd
> Hi Matthew
> 
> All the fields in your schema are required="true". This means they are 
> required for all documents, whether parents or children (or standalone). 
> "Required" fields (from a business logic perspective) on parents and children 
> will usually be different and that can't be enforced in a Solr schema.
> 
> The only fields that can be required="true" are the ones that are required 
> for all types of documents. The uniqueKeyField is definitely one of them. For 
> all other fields, it might make more sense to handle this constraint in your 
> application.
> 
> Thomas
> 
> Op do 27 okt. 2022 om 01:08 schreef Matthew Castrigno 
> mailto:castr...@slhs.org>>:
> Thank you so much for your response, Thomas, I do appreciate it.
> I made the changes, but I am getting a different error now. Did I not 
> interpret your instructions correctly?
> https://i.postimg.cc/SNM4t7vs/updated-schema.png 
> [i.postimg.cc]
> 
> https://i.postimg.cc/RZtcF8bB/Screenshot-2022-10-26-170222.png 
> [i.postimg.cc]
> 
> 
> From: Thomas Corthals mailto:tho...@klascement.net>>
> Sent: Tuesday, October 25, 2022 1:28 AM
> To: users@solr.apache.org 
> mailto:users@solr.apache.org>>
> Subject: Re: I cannot get nested objects to index - with image links
> 
> Hi Matthew The (pseudo-)field in which you want to put the nested documents 
> ("content" in your example) should not be added to the schema. The actual 
> fields of the nested document (id, stuff1, stuff2) need to match an explicit 
> field definition
> ZjQcmQRYFpfptBannerStart
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> 
> ZjQcmQRYFpfptBannerEnd
> 
> Hi Matthew
> 
> The (pseudo-)field in which you want to put the nested documents ("content"
> in your example) should not be added to the schema. The actual fields of
> the nested document (id, stuff1, stuff2) need to match an explicit field
> definition or a dynamicField definition in your schema though.
> 
> Thomas
> 
> Op ma 24 okt. 2022 om 23:48 schreef Matthew Castrigno 
> mailto:castr...@slhs.org>>:
> 
>> Hello Community, Thank you for taking the time to read my message.
>> 
>> I am attempting to index (update) a document with a nested object.
>> 
>> In reading the documentation is seems to state that the fields of the
>> nested object do not need to be and should not be added
>> 
>> to schema.xml.  I am getting error that the field of the nested object is
>> undefined, and I am not sure what I am doing wrong.
>> 
>> Any insights appreciated. Thank you
>> 
>> https://urldefense.com/v3/__https://i.postimg.cc/25GtB1Mc/update.png__;!!FkC3_z_N!MH9mbztbPvc05Og3x_fcnapmPzux7fhqgdChsAIR0bqiTiV_-BVnIdI8Z---HIWeD5TLbiwytoGIDSsB$
>> 
>> https://urldefense.com/v3/__https://i.postimg.cc/SKk5s6TY/schema.png__;!!FkC3_z_N!MH9

Re: Bug in copyfield when using maxChars (SOLR 9)

2022-10-27 Thread Kevin Risden
Thanks Fredrik for creating https://issues.apache.org/jira/browse/SOLR-16502
and providing an easy to reproduce test case. I just put a PR up to fix
this.

For those looking for a great bug report this is an awesome example.

Kevin Risden


On Wed, Oct 26, 2022 at 6:14 AM solr  wrote:

> Hi
>
> We’ve stumbled upon something that seems like a bug.  The behaviour is
> changed since solr 8.11
>
> If we setup copyfield with maxChars, this is “remembered” for all other
> copyField-operations (at least for the same source field).
>
> From schema.xml:
>  multiValued="true"/>
> 
>
> Input doc:
> body:“On a brighter note, they have a phone number to call if you are
> interested in volunteering.  You can call 860 - 690 - 4300 ext 2.  (there
> are a lot of forms to fill out, and they are asking for info on when the
> babies are due)  There was a lady in here yesterday asking how to
> volunteer.  She is 2 - 3 months pregnant and wants to get her hands dirty.
> She says her husband will be home at the time, but can't drive, so she
> wants to be able to help out.  So I told her the names of the people who
> are in charge, and also pointed her in the direction of a site where she
> can make an appointment to drop off some pre - packaged meals.  I'll let
> you know what I hear from them when I do.  One day I had not posted because
> all I was going to do was complain about how the morning sickness is
> wearing me out!  Then I thought, I can make this an uplifting post, so I'll
> share with you about my friend Jackie, who I met in high school, who went
> through this 2 years ago with her first baby, Samuel."
>
>
> search with qf=searchablefield for q=“Samuel"
>
> HIT (OK)
> 
> 
>
> HIT (OK)
> 
> 
>
> NT HIT (as expected)
> 
> 
> 
> 
>
>
> We also clearly see this behaviour when viewing the documents.
>
> Fredrik
>
>
> --
>
> Fredrik Rødland
>Cell:+47 99 21 98 17
> Maisen Pedersens vei 1Twitter: @fredrikr
> NO-1363 Høvik, NORWAY flickr:
> http://www.flickr.com/fmmr/
> http://rodland.no about.me http://about.me/fmr
>
>


Re: Solr 9 possible analysis error with currency field and nested child

2022-10-27 Thread Thomas Corthals
Bumping this to the list again in case anyone has any insights before I
open an issue in JIRA for this.

Op do 20 okt. 2022 om 00:41 schreef Thomas Corthals :

> Hi,
>
>
> I'm running into an exception with Solr 9.0.0 for a request that works
> fine with Solr 8.11.2 and I have no idea why.
>
>
> I've modified the techproducts example schema to store the _root_ field
> and add a _nest_path_.
>
>
> docValues="false" />
>
>
>
>
> This request works fine with Solr 8.11.2, but not with Solr 9.0.0. It does
> an atomic update of a field on a parent document and somehow the price
> field causes an issue.
>
>
> curl -s -X POST -H 'Content-Type: application/json' '
> http://localhost:8983/solr/techproducts/update' --data-binary '
> {
> "add":{
> "doc":{
> "id":"parent",
> "cat":["parent"],
> "child":{
> "id":"child",
> "cat":["child"],
> "price":1.5
> }
> }
> },
> "commit":{
> "softCommit":true,
> "waitSearcher":true
> },
> "add":{
> "doc":{
> "id":"parent",
> "cat":{"add":"updated"}
> }
> }
> }'
>
>
> Solr 8.11.2:
>
>
> {
>   "responseHeader":{
> "status":0,
> "QTime":1}}
>
>
> Solr 9.0.0:
>
>
> {
>   "responseHeader":{
> "status":400,
> "QTime":41},
>   "error":{
> "metadata":[
>   "error-class","org.apache.solr.common.SolrException",
>   "root-error-class","java.lang.IllegalArgumentException"],
> "msg":"Exception writing document id parent to the index; possible
> analysis error: cannot change field \"price_cl_ns\" from doc values
> type=NONE to inconsistent doc values type=NUMERIC",
> "code":400}}
>
>
> However, if I don't do a commit between the two adds, I don't get the
> error.
>
>
> Did something change between Solr 8 and 9 that I have to account for in my
> schema or my update requests? Or is this a bug?
>
>
> Kind regards,
>
>
> Thomas Corthals
>


Re: How to return location name in search result?

2022-10-27 Thread Gurmit Teotia
Thank you for your response. I don't like the denormalization approach for
3 reasons-
- More memory
- Increased efforts to keep the document in sync
- Filter out copies of documents from search if different copies of the
same document are returned in the search result because their locations are
quite close and within the search circle.

Not sure how I will solve it but I will look at next if I can write
custom functions to sort this out.


On Tue, 25 Oct 2022 at 16:29, Houston Putman 
wrote:

> This is a good question, but I'm not sure you are going to be able to do
> this easily.
>
> For any "which part of my document matched the query" questions we
> generally suggest the highlighting component:
> https://solr.apache.org/guide/solr/latest/query-guide/highlighting.html
> However, you want to return another field that relates to the part of the
> document that matches your query, so I don't think highlighting will do
> that for you.
>
> If you do not have a lot of data, I would recommend denormalizing your data
> if this feature is necessary.
> This means breaking up your current documents and duplicating them such
> that each document only holds one location (the field would be
> single-valued).
> That way whenever you get a document that matches, you can easily just
> return the string value of that location.
> The downside of this method is that your index will get bigger (but
> depending on the size right now this might not actually matter), and you
> need to update multiple documents anytime you want to change shared
> metadata.
>
> - Houston
>
> On Mon, Oct 24, 2022 at 1:01 PM Gurmit Teotia 
> wrote:
>
> > I've defined following field in my schema to store latitude and
> longitude-
> >
> >  indexed="true"
> > stored="true" sortMissingLast="true" multiValued="true"/>
> >
> > and "location" is of following field type
> >  > docValues="true"/>
> >
> > I'm storing multiple latitude and longitude pairs in loc_coords field and
> > using a "geofilt" filter successfully able to retrieve the documents
> close
> > to a given point. I'm looking for your advice on how I can store the
> > location names, corresponding to latitude/longitude pairs and return them
> > in search result e.g. if "loc_coords" has following lat/long coordinates
> > for "London" and "New York"
> >
> > ["51.5072,0.1276", "40.7128,74.0060"]
> >
> > In my search query when I'm looking for documents *near *to "New York"
> then
> > the above document will be returned  and in the search result I also want
> > to return the location name "New York".
> >
> > I'm considering following two approaches to store location names and
> return
> > them in search result-
> >
> > 1. Store location names in a string array field ( call it location_names)
> > in the same order as lng/lat pair in location_coords field and somehow
> find
> > the index of matching lng/lat pair and use the index on location_names
> > field to retrieve the location name. This is just logical thinking. I'm
> not
> > sure how I can achieve it in Solr.
> >
> > 2. Store the data as GeoJson in solr because GeoJson allows to store
> extra
> > information along with coordinates as mentioned here-
> https://geojson.org/
> > .
> > But I'm not sure how I'm going to get the location name of matching
> > coording in the search result.
> >
> > Thank you for the help.
> >
> > GS
> >
>


Re: [ANNOUNCE] Java 17 bug affecting Solr

2022-10-27 Thread Shawn Heisey

On 10/26/22 02:17, Alex The Rocker wrote:

Is this bug with Solr with Java 17 specific to HotSpot-based JVMs ?

FYI I'm running Solr 8.11.2 in production for a while with IBM Semeru
17 (based on OpenJ9 JVM) on CentOS 7.9 x64, and I have not observed
such crashes.


Good question, which Jan seems to have answered.

Lucene (the search API that provides most of Solr's functionality) has 
had known bugs with IBM J9 Java in the past.  These were a problem 
because of one or more of the speed optimizations that the IBM JVM 
enables.  I have no idea whether those bugs still affects current 
versions or not.  If it were me, I wouldn't risk it.  But if you're 
running without problems, yay.


Thanks,
Shawn



Re: Solr 9 possible analysis error with currency field and nested child

2022-10-27 Thread Shawn Heisey

On 10/19/22 16:41, Thomas Corthals wrote:

I'm running into an exception with Solr 9.0.0 for a request that works fine
with Solr 8.11.2 and I have no idea why.



However, if I don't do a commit between the two adds, I don't get the error.


Did something change between Solr 8 and 9 that I have to account for in my
schema or my update requests? Or is this a bug?


The error seems to indicate that there is a conflict between the 
existing index and the schema with respect to docValues on the field 
named price_cl_ns.  Usually when this happens you have to completely 
delete the data directory, reload the index or restart Solr, and reindex 
from scratch.


I wonder if that's a red herring, though.  Here's my thought process, 
and I would like someone with more internals knowledge to tell me if I 
have this all wrong:


One of the canonical rules of parent/child documents is that child 
documents must be in the same Lucene index segment as the parents.


When the two indexing requests are done without a commit in the middle, 
this requirement is almost certain to be satisfied.


But if you commit between the two indexing requests, then the updated 
document will be in a different Lucene segment than the document(s) it 
is tied to.  Maybe Solr 9 detects this problem and throws an exception, 
where Solr 8 didn't, and it is being misreported as a docValues problem.


Or maybe the error isn't being misreported.  If it is actually valid, 
then you will have to either fix the mismatch on the price_cl_ns 
field and restart, or wipe the index and rebuild it from scratch.


But the statement about the updated document being in a different 
segment is still valid.  You might run into other problems with 
documents for a parent/child relationship being in different segments.


Thanks,
Shawn



Re: Solr 9 possible analysis error with currency field and nested child

2022-10-27 Thread Thomas Corthals
Op do 27 okt. 2022 om 22:04 schreef Shawn Heisey :

> On 10/19/22 16:41, Thomas Corthals wrote:
> > I'm running into an exception with Solr 9.0.0 for a request that works
> fine
> > with Solr 8.11.2 and I have no idea why.
> 
> > However, if I don't do a commit between the two adds, I don't get the
> error.
> >
> >
> > Did something change between Solr 8 and 9 that I have to account for in
> my
> > schema or my update requests? Or is this a bug?
>
> The error seems to indicate that there is a conflict between the
> existing index and the schema with respect to docValues on the field
> named price_cl_ns.  Usually when this happens you have to completely
> delete the data directory, reload the index or restart Solr, and reindex
> from scratch.
>

I can reproduce it on a pristine techproducts example index by unpacking
the Solr 9.0.0 download and changing the schema in the sample configset
*before* I even start that Solr instance for the very first time. That
should rule out a conflict between the existing index and the schema as the
index was built from scratch with that schema and I didn't change it
afterwards.

The error only occurs with _nest_path_ in the schema, changing _root_ to
stored="true" alone doesn't cause it.

The error still only occurs with a commit between the initial "add" of the
doc and the atomic update. The error doesn't occur if I commit after both
"add"'s.

Thomas


Re: Solr 9 possible analysis error with currency field and nested child

2022-10-27 Thread Shawn Heisey

On 10/27/22 15:51, Thomas Corthals wrote:

I can reproduce it on a pristine techproducts example index by unpacking
the Solr 9.0.0 download and changing the schema in the sample configset
*before* I even start that Solr instance for the very first time. That
should rule out a conflict between the existing index and the schema as the
index was built from scratch with that schema and I didn't change it
afterwards.

The error only occurs with _nest_path_ in the schema, changing _root_ to
stored="true" alone doesn't cause it.

The error still only occurs with a commit between the initial "add" of the
doc and the atomic update. The error doesn't occur if I commit after both
"add"'s.


Odd.

I have no idea what "_nest_path_" even does.  I have never actually used 
the nested documents feature.  I am basing all this on things I have 
read, not actual experience.


My best guess about this is that it is throwing an exception because it 
detects that you have split the parent and child doc into different 
segments.  If you update something for a parent or child document, you 
will need to update or reindex EVERY document that is connected to 
either the child or its parent, and it will need to be done without 
interleaved commits.  Ideally, all of those documents will be in the 
same indexing batch.


I think it is entirely possible that Solr 8 does not detect a problem, 
so it allows the indexing, where Solr 9 does detect it. If that's it, it 
REALLY sucks that the detection results in that particular exception, 
because that would mean that the exception has nothing to do with the 
actual problem.


Thanks,
Shawn


HTTP errors POSTing to 8.11.2

2022-10-27 Thread dmitri maziuk

Hi all,

has anyone gone through the exercise of replacing Data Import Handler 
with scripts that POST JSON and if so, are your scripts still working OK 
with 8.11.2?


I got a few that work fine with 6.5 and 8.7 but are throwing 503s and 
occasional 400s all over the place with 8.11.2.


Solr isn't logging anything useful (at least not at INFO level) and I 
can't quite figure out what's up. I tried tweaking the scripts in all 
kinds of ways but that isn't helping. The same VM previously ran 6.5 
where these problems didn't exist. So I am inclined to blame 8.11.2 at 
this point.


Is there some new security settings I need to tweak to POST or 
something? Any other suggestions?


TIA
Dima


Re: Solr 9 possible analysis error with currency field and nested child

2022-10-27 Thread Jan Høydahl
You are using three features together
A) Nested docs
B) Price field (which is really storing price and currency in two sub fields)
C) Atomic updates

I would not be surprised if these three are not really compatible.
Since there is a requiement to ALWAYS index the entire block of parent and 
children for every update to nested docs, I think you violate that requirement 
by attempting an atomic update. Solr would take the PARENT document, read it 
from disk, construct a new version of it with the added value, and then storing 
it in a different segment. But the children would be gone.

So your safest bet is to treat the entire block as a unit, avoid atomic and 
re-send the entire block every time you need an update to even the smallest 
part of the parent/child structure.

Jan

> 27. okt. 2022 kl. 23:51 skrev Thomas Corthals :
> 
> Op do 27 okt. 2022 om 22:04 schreef Shawn Heisey  >:
> 
>> On 10/19/22 16:41, Thomas Corthals wrote:
>>> I'm running into an exception with Solr 9.0.0 for a request that works
>> fine
>>> with Solr 8.11.2 and I have no idea why.
>> 
>>> However, if I don't do a commit between the two adds, I don't get the
>> error.
>>> 
>>> 
>>> Did something change between Solr 8 and 9 that I have to account for in
>> my
>>> schema or my update requests? Or is this a bug?
>> 
>> The error seems to indicate that there is a conflict between the
>> existing index and the schema with respect to docValues on the field
>> named price_cl_ns.  Usually when this happens you have to completely
>> delete the data directory, reload the index or restart Solr, and reindex
>> from scratch.
>> 
> 
> I can reproduce it on a pristine techproducts example index by unpacking
> the Solr 9.0.0 download and changing the schema in the sample configset
> *before* I even start that Solr instance for the very first time. That
> should rule out a conflict between the existing index and the schema as the
> index was built from scratch with that schema and I didn't change it
> afterwards.
> 
> The error only occurs with _nest_path_ in the schema, changing _root_ to
> stored="true" alone doesn't cause it.
> 
> The error still only occurs with a commit between the initial "add" of the
> doc and the atomic update. The error doesn't occur if I commit after both
> "add"'s.
> 
> Thomas



Re: HTTP errors POSTing to 8.11.2

2022-10-27 Thread Andy Lester



> On Oct 27, 2022, at 5:44 PM, dmitri maziuk  wrote:
> 
> has anyone gone through the exercise of replacing Data Import Handler with 
> scripts that POST JSON and if so, are your scripts still working OK with 
> 8.11.2?

That's exactly what I've done a couple of years ago and they work just fine on 
our install of 8.11.1.