Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Tag search breaks if a space is added

+5
−0

In the Q&A category of Meta a tag search for "proposal" shows 4 results, but a tag search for "proposal " (with a trailing space, as is commonly automatically inserted when typing on mobile) shows 0 results.

This seems to be a literal string search. For contrast, a search for "bug" shows 4 results, but a search for "bug " (with a trailing space) shows only 2 results. With the trailing space the "bug" tag does not show up as it only contains "bug" in the tag name, with no trailing space, but the "posts" and "status-completed" tags do show up as they contain "bug reports" and "bug has" in their respective descriptions, which have a space after "bug". The tag "status-bydesign" shows up in a search for "bug" as its description ends with "bug." but the lack of a space after the word in the description means this tag does not show up in a search for "bug " (with a trailing space).

Should the search terms be stripped of leading and trailing spaces before being processed to prevent this behaviour?


Note that this problem only seems to affect searches in the Tags tab. A search for "interface" in the Posts tab gives identical results with or without a trailing space, even though the results include "Allow users to select their own default license per site and category, possibly per post type" which only contains "interface." (at the end of a sentence, not followed by a space).

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

0 answers

Sign up to answer this question »