Skip to content

Add a command for running a batch of queries#3

Merged
travisbrown merged 2 commits into
mainfrom
feature/2
Mar 23, 2026
Merged

Add a command for running a batch of queries#3
travisbrown merged 2 commits into
mainfrom
feature/2

Conversation

@travisbrown

Copy link
Copy Markdown
Collaborator

Fixes #2.

Note that there is a small complication in that it doesn't make sense to provide the --exact at the top-level, because the user may want to run a batch with both KEYWORD_EXACT_PHRASE and KEYWORD_UNORDERED queries. The current implementation allows this by treating any line that starts and ends with a quotation mark (") as an exact query, and any other line as not exact (even if it contains quotation marks in other positions).

@travisbrown

travisbrown commented Mar 23, 2026

Copy link
Copy Markdown
Collaborator Author

Note that the behavior of the search API doesn't seem to exactly match the documentation. I just confirmed that it's possible to run searches for an exact phrase (via quotation marks here, which get translated into KEYWORD_EXACT_PHRASE) and get results that don't contain that phrase, either in the search result or the complete library page. This is the case even if you ignore punctuation in the result.

As a hypothetical example, if your query line is "foo bar ai", you may get some results that include the string "foo bar ai", but also some with just "Foo Bar - AI", or even without any version of that phrase at all. If you omit the quotation marks, you will get different results, and you likely won't even see the "Foo Bar - AI" items.

As a side note, I don't see any way to search for "foo bar" ai, interpreted as the exact phrase "foo bar" AND the term "ai", since KEYWORD_EXACT_PHRASE vs. KEYWORD_UNORDERED is specified per-query. Given that the documentation doesn't match reality, though, there might be some way to do this that isn't described there.

@travisbrown travisbrown merged commit acfe475 into main Mar 23, 2026
5 checks passed
@travisbrown travisbrown deleted the feature/2 branch March 23, 2026 15:17
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.

Add a command for running a batch of queries

1 participant