Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 17, 2:14 PM
Unknown Object (File)
Feb 18 2024, 2:43 PM
Unknown Object (File)
Feb 16 2024, 5:56 AM
Unknown Object (File)
Feb 9 2024, 5:10 AM
Unknown Object (File)
Feb 3 2024, 4:35 PM
Unknown Object (File)
Jan 11 2024, 12:16 PM
Unknown Object (File)
Jan 9 2024, 10:51 PM
Unknown Object (File)
Jan 5 2024, 1:41 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.