Page MenuHomePhabricator

switch from term query to match query
ClosedPublic

Authored by lexelby on Jun 30 2014, 6:06 PM.
Tags
None
Referenced Files
F14063751: D9785.diff
Mon, Nov 18, 8:11 PM
F14033887: D9785.id.diff
Sat, Nov 9, 8:35 PM
F14017251: D9785.diff
Mon, Nov 4, 3:33 PM
F14010942: D9785.id.diff
Thu, Oct 31, 1:52 PM
F14009667: D9785.id23501.diff
Wed, Oct 30, 10:36 PM
F14008377: D9785.id23684.diff
Tue, Oct 29, 8:15 PM
F14004433: D9785.diff
Sat, Oct 26, 8:36 PM
F14003253: D9785.id23684.diff
Sat, Oct 26, 4:02 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
Lint
Lint Skipped
Unit
Tests Skipped

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).