Repository navigation
Append tags to the search query and combine tags with text - #8
Merged
Merged
Conversation
SearchService::parseQuery() splits ?q= into free text and #tag tokens, and the entry queries AND every tag with the text. SearchManager.appendTag() adds the clicked tag to whatever is already in the field. Tag queries now run through searchAll and searchByUser with a tag slug list, so searchByTagSlug, searchByTagSlugWithImages and countByTagSlug are removed.
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.
TL;DR
memoryplus a click on#openaireadsmemory #openai.Review focus
Entry::tagFilterConditions()— one EXISTS per slug, joined with AND, bound througharray_merge($params, $tagSlugs). Confirm each of the four call sites appends the slugs at exactly the point where the condition is added.Entry.php—searchByUser,countSearchAllandcountSearchByUsertake a nullable text query and skip the text condition when it is null or empty.searchByTagSlug,searchByTagSlugWithImagesandcountByTagSlugare deleted: nothing called them oncelistPublicmoved to the combined query.SearchService::parseQuery()andSearchManager.appendTag()tokenize tags independently, both as#plus letters, numbers and hyphens.#foo_barreads as tagfoowith text_bar, and#Cafénow resolves where the controller rejected it outright.search-manager.js— five call sites move fromsetQuery('#' + slug)toappendTag(slug): landing page (SSR cards and API cards), user profile, collection page, embed. Tag clicks on the status page still navigate to/?q=%23slug; that page has no search field to append into.Caveats
tagkey in the entries response is populated only for a query that is exactly one tag.public/assets/dist/*.bundle.jsis generated bysync.shand is not in the diff.