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.

Post History

77%
+5 −0
Q&A Tag search breaks if a space is added

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) sh...

0 answers  ·  posted 1y ago by trichoplax‭  ·  edited 12mo ago by Monica Cellio‭

#6: Post edited by user avatar Monica Cellio‭ · 2023-12-04T04:28:37Z (12 months ago)
#5: Post edited by user avatar Monica Cellio‭ · 2023-11-23T20:51:34Z (12 months ago)
PR pending
#4: Post edited by user avatar trichoplax‭ · 2023-06-28T01:54:12Z (over 1 year ago)
Add an example proving the problem does not affect searches in the Posts tab
  • 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 in the Posts tab gives identical results with or without a trailing space.*
  • 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](https://meta.codidact.com/posts/278458)" which only contains "interface." (at the end of a sentence, not followed by a space).*
#3: Post edited by user avatar trichoplax‭ · 2023-06-28T01:43:20Z (over 1 year ago)
More detail with a second example
  • 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.
  • 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 in the Posts tab gives identical results with or without a trailing space.*
  • 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 in the Posts tab gives identical results with or without a trailing space.*
#2: Post edited by user avatar trichoplax‭ · 2023-06-28T01:25:48Z (over 1 year ago)
Mention this affects tag searches only
  • 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.
  • Should the search terms be stripped of leading and trailing spaces before being processed to prevent this behaviour?
  • 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.
  • 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 in the Posts tab gives identical results with or without a trailing space.*
#1: Initial revision by user avatar trichoplax‭ · 2023-06-28T01:22:28Z (over 1 year ago)
Tag search breaks if a space is added
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.

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