Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
F17797440: D18502.id44434.diff
Jul 25 2025, 2:00 AM
F17764553: D18502.id44434.diff
Jul 23 2025, 12:47 AM
F17730301: D18502.diff
Jul 19 2025, 9:39 PM
Unknown Object (File)
Jun 2 2025, 7:43 AM
Unknown Object (File)
Jun 1 2025, 9:02 AM
Unknown Object (File)
May 1 2025, 4:23 AM
Unknown Object (File)
Apr 26 2025, 5:23 PM
Unknown Object (File)
Apr 25 2025, 8:58 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.