internetarchive / internetarchive/openlibrary
Triggering autocomplete with certain search terms results in Solr exceptions
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 2k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 138
Description
Solr throws parsing exceptions when certain search terms are typed into the search bar and autocomplete is triggered.
**Search Terms:**
`title:`
`author_name:`
`key:`
There may be other terms that will cause this. To make matters worse, if one of the above terms are followed with a double quote character, autocomplete calls will continue to fail until a closing double quote character is typed.
### Evidence / Screenshot (if possible)

**Search terms for each request in the above screenshot are as follows:**
1. `title`
2. `title:`
3. `title:"abc`
4. `title:"abc"`
**Note:** This screenshot is from my local instance. `502` HTTP errors are returned in dev.
### Relevant url?
https://openlibrary.org/
### Steps to Reproduce
1. Navigate to any Open Library page that has a search bar.
2. Select a search facet that allows for auto-completion of search terms (either `all`, `title`, or `author`).
3. Type one of the search terms listed above.
* Actual: Autocomplete XHR call fails.
* Expected: Autocomplete XHR returns `200`, and suggested results are listed.
### Details
- **Logged in (Y/N)?** N/A
- **Browser type/version?** N/A
- **Operating system?** N/A
- **Environment (prod/dev/local)?** prod
### Proposal & Constraints
### Related files
### Stakeholders
Contributor guide
Assessment
This issue has not been assessed yet.