Skip to content

De-sugar First Author Search#232

Open
JCRPaquin wants to merge 12 commits intomainfrom
jcrpaquin/bug/first-author-desugar
Open

De-sugar First Author Search#232
JCRPaquin wants to merge 12 commits intomainfrom
jcrpaquin/bug/first-author-desugar

Conversation

@JCRPaquin
Copy link
Member

What?

The PR masks first author searches created using the dedicated syntax sugar. It also introduces a configuration path to expand this desugaring to other fields as needed.

Why?

After the Solr upgrade from 7 to 9 we experienced a large number of failing position queries. This is because the max clause limit, previously enforced only for boolean clauses, was expanded to more query types. Unfortunately, prefix queries, which are commonly used in author searches, are expanded to all matching terms prior to lookup; these terms are each represented as a single clause and joined together into a (con/dis)junction. Given the size of our collection, it's not uncommon for author searches to pull in 10k+ author names, which is far higher than the default limit.

Alternatives

We could have altered the max clause limit to be something ludicrously high-- this would have mostly reverted the behavior. However, in some limited circumstances the limit would still be breached and users would likely be even more confused than they are today. There's also the chance that a user might discover the increased limit and use it to DDoS ADS/SciX.

Thanks to @sstults for the pairing time spent on this PR.

@JCRPaquin JCRPaquin requested review from kelockhart and sstults April 14, 2025 08:28
Copy link

@sstults sstults left a comment

Choose a reason for hiding this comment

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

I think this looks right.

Copy link
Member

@kelockhart kelockhart left a comment

Choose a reason for hiding this comment

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

The expected behavior in the unit tests looks good to me

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.

3 participants