Issue Summary
- The Ghost Content API is returning a “Request not understood error” when using a combination of tag filters with search terms.
- I expected the filter to return posts that exclude specific tags AND contain specific search terms in either title or excerpt.
Steps to Reproduce
- Create a filter string that combines multiple tag exclusions with title/excerpt search
- Use the following filter in a Ghost Content API request:
(tag:-changelog+tag:-changelog-new+tag:-changelog-fix+tag:-changelog-improvement+tag:-hash-last9-events)+(title:~'how',excerpt:~'how') - Execute the API request
- Observe the BadRequestError response
Relevant log / error output
Error searching blog posts: Error [BadRequestError]: Request not understood error, cannot list posts.
at C:\Users\Office\Desktop\last9.io\node_modules\@tryghost\content-api\cjs\content-api.js:271:37
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
context: 'Could not understand request.',
type: 'BadRequestError',
code: 'ER_BAD_FIELD_ERROR'
Additional Information
- I’ve tried multiple syntax variations following the NQL documentation:
- Using square bracket notation:
tag:-[changelog,changelog-new,changelog-fix,changelog-improvement,hash-last9-events]+(title:~'how',excerpt:~'how') - Using parentheses:
(tag:-changelog+tag:-changelog-new+tag:-changelog-fix+tag:-changelog-improvement+tag:-hash-last9-events)+(title:~'how',excerpt:~'how') - All variations result in the same error
- Using square bracket notation:
- According to the documentation, the above syntax should be valid