epriestley
c8574cf6fd
Integrate ApplicationSearch with CustomField
...
Summary:
Ref T2625. Ref T3794. Ref T418. Ref T1703.
This is a more general version of D5278. It expands CustomField support to include real integration with ApplicationSearch.
Broadly, custom fields may elect to:
- build indicies when objects are updated;
- populate ApplicationSearch forms with new controls;
- read inputs entered into those controls out of the request; and
- apply constraints to search queries.
Some utility/helper stuff is provided to make this easier. This part could be cleaner, but seems reasonable for a first cut. In particular, the Query and SearchEngine must manually call all the hooks right now instead of everything happening magically. I think that's fine for the moment; they're pretty easy to get right.
Test Plan:
I added a new searchable "Company" field to People:
{F58229}
This also cleaned up the disable/reorder view a little bit:
{F58230}
As it did before, this field appears on the edit screen:
{F58231}
However, because it has `search`, it also appears on the search screen:
{F58232}
When queried, it returns the expected results:
{F58233}
And the actually good bit of all this is that the query can take advantage of indexes:
mysql> explain SELECT * FROM `user` user JOIN `user_customfieldstringindex` `appsearch_0` ON `appsearch_0`.objectPHID = user.phid AND `appsearch_0`.indexKey = 'mk3Ndy476ge6' AND `appsearch_0`.indexValue IN ('phacility') ORDER BY user.id DESC LIMIT 101;
+----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
| 1 | SIMPLE | appsearch_0 | ref | key_join,key_find | key_find | 232 | const,const | 1 | Using where; Using temporary; Using filesort |
| 1 | SIMPLE | user | eq_ref | phid | phid | 194 | phabricator2_user.appsearch_0.objectPHID | 1 | |
+----+-------------+-------------+--------+-------------------+----------+---------+------------------------------------------+------+----------------------------------------------+
2 rows in set (0.00 sec)
Reviewers: btrahan
Reviewed By: btrahan
CC: aran
Maniphest Tasks: T418, T1703, T2625, T3794
Differential Revision: https://secure.phabricator.com/D6992
2013-09-16 13:44:34 -07:00
..
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-05-24 13:59:12 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2011-04-30 00:50:48 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2011-05-10 15:12:30 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-11-05 11:16:51 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-05-24 13:59:12 -07:00
2012-11-05 11:16:51 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-03-27 16:22:40 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2013-01-17 12:07:16 -08:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-04-30 07:53:53 -07:00
2012-06-08 12:42:59 -07:00
2012-05-24 13:59:12 -07:00
2012-12-11 13:59:20 -08:00
2012-12-11 14:01:03 -08:00
2013-01-17 12:07:16 -08:00
2012-12-11 14:01:03 -08:00
2012-12-21 14:17:56 -08:00
2012-12-27 15:21:21 -08:00
2013-01-01 18:14:41 -08:00
2013-01-03 17:04:30 -08:00
2013-01-07 09:46:43 -08:00
2013-01-24 17:23:05 -08:00
2013-01-26 15:22:18 -08:00
2013-02-06 14:03:52 -08:00
2013-02-04 11:36:55 -08:00
2013-02-04 11:36:55 -08:00
2013-02-14 11:37:05 -08:00
2013-02-14 12:27:18 -08:00
2013-02-15 07:47:14 -08:00
2013-02-20 13:38:36 -08:00
2013-02-17 09:13:49 -08:00
2013-02-18 11:51:42 -08:00
2013-02-26 05:23:31 -08:00
2013-02-21 15:09:35 -08:00
2013-02-21 16:26:14 -08:00
2013-02-22 07:29:40 -08:00
2013-02-27 08:04:54 -08:00
2013-03-06 16:19:01 -08:00
2013-03-28 08:34:34 -07:00
2013-03-21 10:28:22 -07:00
2013-03-26 13:30:35 -07:00
2013-03-19 15:00:44 -07:00
2013-03-20 18:01:52 -07:00
2013-04-01 08:16:01 -07:00
2013-03-28 09:10:34 -07:00
2013-03-28 09:11:42 -07:00
2013-03-28 09:13:07 -07:00
2013-03-29 21:30:15 -07:00
2013-04-04 16:57:38 -07:00
2013-04-04 16:57:38 -07:00
2013-04-12 22:48:16 -07:00
2013-04-19 11:40:24 -07:00
2013-04-26 10:30:41 -07:00
2013-04-25 09:49:32 -07:00
2013-04-24 15:14:26 -07:00
2013-04-30 10:48:16 -07:00
2013-05-03 15:53:36 -07:00
2013-05-03 15:53:36 -07:00
2013-05-03 15:53:36 -07:00
2013-05-08 10:38:07 +01:00
2013-05-08 10:38:07 +01:00
2013-05-08 10:27:20 +01:00
2013-05-11 15:20:09 +01:00
2013-08-21 12:31:50 -07:00
2013-05-10 16:45:45 -07:00
2013-05-13 16:32:19 -07:00
2013-05-20 10:18:26 -07:00
2013-05-22 16:05:47 -07:00
2013-05-23 09:22:18 -07:00
2013-05-24 12:37:42 -07:00
2013-05-29 15:05:44 -07:00
2013-05-29 15:05:44 -07:00
2013-05-30 17:32:12 -07:00
2013-05-30 18:55:04 -07:00
2013-05-30 17:30:06 -07:00
2013-05-31 10:51:05 -07:00
2013-06-04 11:15:34 -07:00
2013-06-05 05:28:25 -07:00
2013-06-07 09:55:55 -07:00
2013-06-14 06:55:18 -07:00
2013-06-14 07:04:41 -07:00
2013-06-16 09:55:55 -07:00
2013-06-17 10:48:41 -07:00
2013-06-20 11:20:41 -07:00
2013-06-21 12:54:29 -07:00
2013-06-21 18:41:14 -07:00
2013-06-24 11:00:35 -07:00
2013-06-24 11:00:35 -07:00
2013-06-24 15:54:36 -07:00
2013-06-28 13:56:16 -07:00
2013-07-01 12:37:34 -07:00
2013-07-08 17:06:49 -07:00
2013-07-08 17:06:49 -07:00
2013-07-09 18:07:42 -07:00
2013-07-10 11:46:39 -07:00
2013-07-16 13:31:20 -07:00
2013-07-16 13:31:20 -07:00
2013-07-16 13:31:20 -07:00
2013-07-11 10:10:06 -07:00
2013-07-16 10:30:14 -07:00
2013-07-29 12:04:15 -07:00
2013-07-16 10:30:28 -07:00
2013-07-17 16:43:37 -07:00
2013-07-25 16:59:25 -07:00
2013-07-23 16:58:22 -07:00
2013-07-28 15:08:36 -07:00
2013-07-27 18:41:03 -07:00
2013-07-29 12:04:04 -07:00
2013-07-29 12:04:04 -07:00
2013-07-29 12:04:15 -07:00
2013-08-14 09:01:38 -07:00
2013-08-14 09:00:56 -07:00
2013-08-14 09:00:25 -07:00
2013-08-04 11:32:32 -07:00
2013-08-02 12:56:58 -07:00
2013-08-07 18:03:37 -07:00
2013-08-07 18:03:37 -07:00
2013-08-07 18:03:37 -07:00
2013-08-07 18:03:49 -07:00
2013-08-05 17:11:46 -07:00
2013-08-05 17:11:46 -07:00
2013-08-05 17:11:46 -07:00
2013-08-14 12:33:53 -07:00
2013-09-05 15:58:28 -07:00
2013-09-05 13:11:02 -07:00
2013-09-05 13:11:02 -07:00
2013-08-21 12:31:51 -07:00
2013-08-28 09:54:39 -07:00
2013-09-12 13:04:09 -07:00
2013-09-12 13:04:31 -07:00
2013-09-12 13:06:44 -07:00
2013-09-13 09:39:46 -07:00
2013-09-13 12:00:50 -07:00
2013-09-16 13:44:34 -07:00
2013-03-06 10:46:56 -08:00
2012-08-01 17:06:04 -07:00
2012-08-14 18:01:15 -07:00
2012-10-31 15:22:16 -07:00
2012-06-30 15:41:58 -07:00
2012-10-24 13:59:22 -07:00
2012-11-07 14:31:43 -08:00
2012-11-01 16:53:17 -07:00
2012-11-01 11:30:42 -07:00
2012-08-16 14:43:03 -07:00
2012-05-07 10:29:33 -07:00
2013-01-17 12:07:16 -08:00
2012-05-07 10:29:33 -07:00
2012-08-09 08:40:56 -07:00
2012-07-09 15:20:56 -07:00
2012-05-03 09:22:52 -07:00
2012-06-13 08:58:46 -07:00
2013-07-03 16:37:05 -07:00
2013-07-03 16:37:05 -07:00
2012-11-16 10:19:22 -08:00
2012-11-16 10:19:22 -08:00
2012-11-07 13:33:07 -08:00
2012-07-11 11:40:10 -07:00
2012-07-09 15:20:56 -07:00
2013-07-22 12:17:29 -07:00
2013-07-22 12:17:35 -07:00
2013-07-22 12:17:29 -07:00
2013-01-17 12:07:16 -08:00
2012-12-07 16:33:16 -08:00
2012-09-13 10:11:14 -07:00
2012-07-19 09:03:10 -07:00
2012-09-30 17:10:27 -07:00
2012-10-15 14:50:04 -07:00
2012-10-15 14:49:52 -07:00
2012-05-20 14:46:01 -07:00
2012-11-21 17:22:36 -08:00
2012-08-11 07:05:01 -07:00
2012-09-11 12:13:20 -07:00
2013-01-17 12:07:16 -08:00
2012-10-08 20:14:58 -07:00
2012-11-05 13:21:24 -08:00
2013-03-15 11:28:43 +00:00
2012-11-08 15:39:43 -08:00
2012-10-24 13:22:24 -07:00
2012-08-06 12:20:45 -07:00
2012-05-20 14:46:01 -07:00
2012-06-14 11:36:34 -07:00
2012-05-03 18:24:30 -07:00
2012-06-14 18:33:00 -07:00
2012-10-08 16:09:20 -07:00