Page MenuHomePhabricator

Support "-term" in Ferret engine queries
ClosedPublic

Authored by epriestley on Aug 30 2017, 4:55 PM.
Tags
None
Referenced Files
F14834396: D18502.id44434.diff
Thu, Jan 30, 3:09 PM
Unknown Object (File)
Tue, Jan 21, 11:06 AM
Unknown Object (File)
Sun, Jan 19, 4:07 AM
Unknown Object (File)
Fri, Jan 17, 5:43 PM
Unknown Object (File)
Fri, Jan 17, 3:36 PM
Unknown Object (File)
Mon, Jan 6, 12:21 PM
Unknown Object (File)
Dec 20 2024, 11:10 PM
Unknown Object (File)
Dec 17 2024, 10:45 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
Branch
ferret8
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 18219
Build 24501: Run Core Tests
Build 24500: arc lint + arc unit

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.