[2.1] Returns correct search results when post moderation is enabled#8458
Conversation
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
|
Assuming everyone's on board with the db change! The behavior matches current behavior. Whether that's good or bad is up to you! When searching within a topic, or when showing results as messages, you will see all messages that have the term. However, under all other circumstances, you will only see one message per topic that includes the term. Some folks like the current behavior - though I'm not sure how much of that is "that's how it's always been". We do get occasional complaints on the support board, though, that search results are incomplete. So not everybody likes the current behavior. I had thought that changing this index would change this behavior, but it didn't... This PR matches current behavior; the one-result-per-topic is enforced elsewhere. To demonstrate... In this test env, there are 3 topics, across two boards:
Each topic has 3 posts, "Lions", "Lions and Tigers", and "Lions and Tigers and Bears". So there are 3 x 3 = 9 total posts include the term "Lions" across the 3 topics: Searching across topics only gives you 3 results, one per topic (to the consternation of some): Searching within a topic gives you all 3 within that topic: |
|
Part of the challenge with the above is that "Show results as messages" really means something else... It means "show all messages, not just one per topic, and show the entire message, don't truncate it"... I wonder if "Show complete results" addresses the confusion (in English anyway)... |
It's just dropping and re-adding a primary key index. Nothing substantial.
There's no plan to change the intended behaviour, at least not in 2.1. The goal is just to fix the bug. In 3.0 we could talk about changing how search results are filtered. I agree that it would be better to always show all matching messages and relabel the "Show results as messages" search option as "Show full message text" or something like that. Perhaps we could even pretty it up a bit by grouping messages from the same topic together. |



Fixes #7870 for SMF 2.1.
Closes #8332