The total number of unique tags in the system is in fact in the millions because this is a SaaS product. However, users will typically have no more than a couple hundred uniq "accessible" tags. That's why the permissions_cache filter thing is there.
Will this change anything?
here is an example record:
{
"_index" : "bpd-development",
"_type" : "contact",
"_id" : "71",
"_version" : 2,
"found" : true,
"_source" : {
"contact_id" : 71,
"id" : 71,
"company_id" : 2,
"first_name" : "Aldo",
"created_at" : "1499925395000",
"updated_at" : "1500424806000",
"last_name" : null,
"first_name_exact" : "aldo",
"last_name_exact" : "",
"source_name" : null,
"lead_source_id" : null,
"agent_redistribution_status" : "assigned",
"lender_redistribution_status" : "assigned",
"last_lender_history_date" : null,
"last_agent_history_date" : null,
"last_lender_history_id" : null,
"last_agent_history_id" : 401,
"starred_by" : [ ],
"contact_types_contacts" : [ ],
"contact_statuses_contacts" : [
"31"
],
"permissions_cache" : [
"3",
"4",
"6",
"7",
"12"
],
"permissions_cache_length" : 5,
"metadata" : "asdfasdfsadf asdf asfas fsad fsd aldo"
}
}