Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
F21547507: D18502.diff
Mon, Aug 3, 11:47 AM
Unknown Object (File)
Sat, Jul 11, 8:55 AM
Unknown Object (File)
Sun, Jul 5, 6:07 AM
Unknown Object (File)
Jul 1 2026, 5:00 AM
Unknown Object (File)
Mar 28 2026, 10:50 PM
Unknown Object (File)
Feb 8 2026, 7:08 AM
Unknown Object (File)
Nov 27 2025, 8:06 PM
Unknown Object (File)
Nov 20 2025, 9:26 PM
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.