Negative search does not work for headers
- Dominant language
- Python
- Stars
- 45
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
A search for `Subject: -keyword` returns the same results as a search for `Subject: keyword`, i.e. the negation indicator is ignored.
The same applies to search for other headers: `Author`, `To`, `Body`
A search for `Message-id` does an exact match (including any leading `-`) - this is OK, as a positive match will in general only match a few messages; negating such a match is not particularly useful.
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test is named. Start by locating the search parser and header-matching logic, then reproduce `Subject: -keyword` alongside the positive query for Subject, Author, To, and Body. Done means negative header searches exclude matching messages while Message-id matching, including leading `-`, remains unchanged, with regression tests for these cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100