Stream: troubleshooting

Topic: โœ” solr search errors in server log


view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 19:46):

Hi there .. I am seeing errors in the logs of both our QA and Prod dataverse installations that look like this:

Search Syntax Error: Error from server at <server URL>/solr/collection1: sort param field can't be found: dateSort']]
Search Syntax Error: Error from server at <server URL>/solr/collection1: undefined field: "datasetType"]]

I assume I messed up the schema during one of the recent updates .. they were a little tricky because we don't have solr running on the same server as dataverse, so I had to list the schema on the app server, copy it to the solr server, and then run the update fields script after copying the new schema from the iqss github

however it seemed to go okay anyway (didn't get any errors) .. any ideas on the best way to fix?
looking at this .. should i just copy the schema.xml again and re-run the update fields script? I don't want to make it worse

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:17):

datasetType is definitely new as of 6.4

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:19):

For the block, maybe we should move to #troubleshooting > delete custom metadata block

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:19):

In order to keep this topic focused on Solr, I mean.

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 20:27):

ah sorry i always do that

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 20:28):

i thought it was related :wink:

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 20:31):

i deleted that question

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:39):

So if it helps, that script is grabbing fields from http://localhost:8080/api/admin/index/solr/schema

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:39):

You don't have to use the script if it's giving you trouble.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:40):

But you do need to make sure Solr has the fields your installation expects.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:40):

dateSort should be super old. I'm not sure why you don't have that one.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:41):

Do you have a lot of custom metadata blocks? Or experimental blocks?

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:42):

Basically, anything that isn't already in the schema.xml we ship?

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 20:46):

we don't have any .. other than accidentally adding the computational one .. the datasetType error is on our QA site that we have updated to v6.4, and the dateSort one is on our production which is still at v6.3 ..

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 20:49):

Well, dateSort is old. You can grab that line from https://github.com/IQSS/dataverse/blob/v6.3/conf/solr/schema.xml

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:01):

if I run 'curl "http://localhost:8080/api/admin/index/solr/schema"' .. the only fields it returns are the ones within the <!-- SCHEMA-FIELDS::BEGIN --><!-- SCHEMA-FIELDS::END --> section .. so i've messed something up

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 21:02):

No, that's right.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 21:02):

That "schema" endpoint is only for the dynamic fields. The ones that come from the database.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 21:03):

From metadata blocks, that is.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 17 2024 at 21:03):

I hope I haven't confused you more. :sweat_smile:

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:03):

ah okay

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:04):

so where is it finding "dateSort"?

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:05):

i see it was added for 4.0

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:08):

it is defined in my schema.xml

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 21:23):

i have the most current one .. same as https://github.com/IQSS/dataverse/blob/v6.3/conf/solr/schema.xml

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 22:14):

i figured out the issue with the QA site .. the errors were occurring when I was upgrading and haven't occurred since so I think was just a timing thing

view this post on Zulip Deirdre Kirmis (Oct 17 2024 at 22:16):

for prod i will go through the steps again to update the schema tonight and then do a full index

view this post on Zulip Notification Bot (Oct 21 2024 at 20:10):

Deirdre Kirmis has marked this topic as resolved.


Last updated: Oct 30 2025 at 06:21 UTC