Conversation
Add quoted-string tokenization to search so collection names and keywords with spaces can be wrapped in double quotes. Introduce splitSearchTokens and extractAdvancedSearchKeyword helpers on the server side, and a formatAdvancedSearchText utility on the client to auto-quote values that contain spaces. Update apple-touch-icon and web manifest references. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🤖 Augment PR SummarySummary: This PR adds quoted-phrase support to the advanced search syntax so values containing spaces (e.g. collection names) are tokenized, parsed, and prefilled correctly. Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
| completeSearch.setAdvancedSearches(new ArrayList<>()); | ||
| completeSearch.setCollectionIds(new ArrayList<>()); | ||
| String[] keywords = keyword.split(" "); | ||
| List<String> keywords = splitSearchTokens(keyword); |
There was a problem hiding this comment.
With splitSearchTokens preserving whitespace inside quoted phrases, collection: values can now include leading/trailing spaces from inside the quotes, and the later findByNameContainingIgnoreCase(collectionName) lookup may fail to match unexpectedly. Consider normalizing the extracted collection value before querying (e.g., trimming).
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
splitSearchTokenstoLuceneServiceto correctly tokenize search input, supporting double-quoted phrases (e.g.collection:"my collection")extractAdvancedSearchKeywordstatic helper that extracts the value after a separator without splitting on the separator characterformatAdvancedSearchTextclient utility that auto-wraps values containing spaces in double quotes, used inCollectionListwhen building the search prefill textapple-touch-iconand web manifest references inindex.htmlTest plan
./mvnw test -pl huntly-server—LuceneServiceSearchSyntaxTestshould passyarn testinapp/client—searchSyntax.test.tsshould passcollection:"my collection")🤖 Generated with Claude Code