Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
F15540802: D18502.id.diff
Fri, Apr 25, 8:58 AM
F15537046: D18502.diff
Thu, Apr 24, 11:51 AM
F15525981: D18502.diff
Mon, Apr 21, 6:17 PM
F15466990: D18502.id44434.diff
Thu, Apr 3, 11:31 AM
F15455530: D18502.id44434.diff
Sun, Mar 30, 2:58 AM
F15453713: D18502.id44447.diff
Sat, Mar 29, 1:46 PM
F15443371: D18502.id44434.diff
Thu, Mar 27, 4:04 AM
F15435733: D18502.id.diff
Mar 25 2025, 10:00 AM
Subscribers
None

Details

Summary

Ref T12819. Supports negating search terms, e.g. "apple -honeycrisp".

When negating a term, we're a little more strict about what can match (that is, what can prevent a document from being returned) since it's easy for a user to type "apple -honeycrisp -honey -crisp -crispies -olcrispers -honeyyums" to keep refining their search, but hard/impossible to split apart an overboard term.

Test Plan
  • Ran apple -smith, apple -"granny smith", etc.
  • Verified phone -tact does not exclude phone contact.
  • (In theory, phone -~tact would, but the parser currently doesn't support this, and I'm not champing at the bit to add support.)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Aug 30 2017, 5:15 PM
This revision was automatically updated to reflect the committed changes.