Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
F19050488: D18502.id.diff
Nov 27 2025, 8:06 PM
F18999563: D18502.diff
Nov 20 2025, 9:26 PM
F18906610: D18502.diff
Nov 8 2025, 7:19 PM
F18878155: D18502.diff
Nov 6 2025, 3:26 PM
F18853596: D18502.id44434.diff
Oct 31 2025, 6:14 PM
F18757728: D18502.diff
Oct 5 2025, 7:13 PM
F18754673: D18502.diff
Oct 5 2025, 12:27 AM
F18745739: D18502.id44447.diff
Oct 3 2025, 9:05 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.