#11545 closed defect (fixed)
Search returns milestone resource when only one word matches — at Version 5
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.2 |
Component: | search system | Version: | 1.0-stable |
Severity: | normal | Keywords: | roadmap |
Cc: | Branch: | ||
Release Notes: |
Fixed milestone search returning results when only one word from phrase matched. |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
For a long time I've been noticing that the milestones would almost always appear in my search results, even for cases that I wouldn't expect them to appear. It looks like a milestone will be returned in the search results when there is a match from only one word of a multiword phrase.
The following test was done to prove the case:
- Generated 3 words at http://listofrandomwords.com: Semiphilosophic opportunistic sulphur
- Created 4 tickets: one ticket with the phrase as the summary and three tickets containing one word of the phrase as the summary.
- Created 4 tickets: one ticket with the phrase as the description and three tickets containing one word of the phrase as the description.
- Created 4 milestones: one milestone with the phrase in the description and three milestones containing one word of the phrase in the description.
- Created 4 wiki pages: one wiki page with the phrase in the content and three wiki pages containing one word of the phrase in the content.
Here are the search results:
Change History (6)
by , 10 years ago
Attachment: | SearchResults.png added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
comment:3 by , 10 years ago
Good catch! Right, all()
seems appropriate to reproduce the behavior of the former SQL query in trunk/trac/search/api.py@11528#L54.
comment:4 by , 10 years ago
Milestone: | next-stable-1.0.x → 1.0.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
Thanks for providing a fix. I've prepared the change along with a unit test in log:rjollos.git:t11545.
comment:5 by , 10 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
I think it was changed in [11525] and could be fixed by changing any() to
all()
. (untested)