Page MenuHomePhabricator

switch from term query to match query
ClosedPublic

Authored by lexelby on Jun 30 2014, 6:06 PM.
Tags
None
Referenced Files
F13039548: D9785.diff
Tue, Apr 16, 8:33 AM
Unknown Object (File)
Thu, Apr 11, 10:32 AM
Unknown Object (File)
Mon, Apr 1, 4:11 AM
Unknown Object (File)
Fri, Mar 29, 4:59 PM
Unknown Object (File)
Thu, Mar 28, 2:18 AM
Unknown Object (File)
Mar 5 2024, 11:36 AM
Unknown Object (File)
Feb 11 2024, 12:36 PM
Unknown Object (File)
Feb 11 2024, 12:36 PM

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