Skip to content

Conversation

@liseli
Copy link
Contributor

@liseli liseli commented Dec 12, 2025

Issue: Facet search failed because internal quotes were not accounted for.

Ticket: ETT-1200

Issue explanation:
Facet value: "Kao gu yu wen wu" bian ji bu
Solr should receive: "Kao gu yu wen wu" bian ji bu"
Solr sees: ""Kao gu yu wen wu" bian ji bu", then orphaned text bian ji bu"
Error: no field name specified

Solving the issue

  • One line fix on /sys/Solr.php, and a couple of tests have been added on test/SolrTest.php.

How to test?

  • Search by table
  • On the left menu select Author
  • The first author has a quote in the name.
image
  • Select this author and the record should be visible without issue.
image

@liseli liseli requested review from aelkiss and moseshll December 15, 2025 19:26
Copy link
Contributor

@moseshll moseshll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected. See the original ticket for a follow-up about the display of this previously-broken facet now that we can select it without an error -- the quotes are missing when the facet is in the "Current Filters". May be out of scope and it's just cosmetic. APPROVE

EDIT: I just put a screen shot on the ticket

Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main question I have is if we should be doing something more general for escaping queries. In particular it doesn't seem like this will address the issues with characters like ~ and \. Given that these don't cause issues in ls, I think it's worth seeing if we can apply the more general escaping strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants