Page MenuHomePhabricator

switch from term query to match query
ClosedPublic

Authored by lexelby on Jun 30 2014, 6:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 5:06 AM
Unknown Object (File)
Sun, Dec 8, 6:21 PM
Unknown Object (File)
Thu, Dec 5, 11:07 AM
Unknown Object (File)
Wed, Dec 4, 8:41 AM
Unknown Object (File)
Wed, Dec 4, 8:41 AM
Unknown Object (File)
Wed, Dec 4, 8:41 AM
Unknown Object (File)
Wed, Dec 4, 8:40 AM
Unknown Object (File)
Wed, Dec 4, 8:28 AM

Details

Summary

Switch to the match query. The operator is set to and because it defaults to or which is likely to annoy users. We might want to consider using query_string to get booleans, wildcards, and other features. The only problem with query_string is that it can allow querying on other fields in the json document, and we may want to prevent that. That might even expose information we don't want to expose. Another option would be to parse booleans ourselves and translate them to the ES query DSL.

fixes T5488

Test Plan

Try the vpn/VPN test case described in T5488.

Diff Detail

Repository
rP Phabricator
Branch
T5488
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1476
Build 1476: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

lexelby retitled this revision from to switch from term query to match query.
lexelby updated this object.
lexelby edited the test plan for this revision. (Show Details)
lexelby added a reviewer: epriestley.
lexelby edited edge metadata.
  • fix match query with options

Can you sign the CLA? L28 Phacility Individual Contributor License Agreement

(We recently switched from a Facebook CLA to a Phacility CLA, and added the ability for Legalpad to track CLAs.)

epriestley edited edge metadata.

In some cases, it might leak some information to allow matches against other fields. For example, if a task belongs to a project which a user can't see, the project will normally render as "Restricted Project" in the UI. In theory, a user could figure out which project it is from a list of candidates by searching against that field. (I'm actually not sure we even index that right now, but are likely to in the future.)

This isn't a huge deal, and we could work around this in a couple of ways. Let's just stick with this for now, and we can look at using query_string if there's demand/interest.

This revision is now accepted and ready to land.Jul 9 2014, 10:46 PM
epriestley updated this revision to Diff 23684.

Closed by commit rPa230e0fab7af (authored by @lexelby, committed by @epriestley).