Is it possible to make a custom facet that behaves like a Views grouped filter? I am moving my user search from vanilla Views to the Search API/Solr backend/Facet API with Views.

On my site, I have a Countries field on the user profile, and I would like to give users the option to choose between two options: from Japan or not from Japan.

In Views, I did this using a grouped filter:



Now I am trying to make a facet that does the same thing.  However, I don't think this is possible from the Facet UI, even with Facet API Bonus installed.  There appears to be no way to provide users with the choice of A or NOT A for a facet that has 100+ values.

How can I implement this A or NOT A search using the Facet API for a specific facet?
Based on this article, I was able to do this with the following code:

/**
 * Implements hook_entity_property_info_alter().
 */
function MYMODULE_entity_property_info_alter(&amp;$info) {
  $info['user']['properties']['agg_nat'] = array(
    'type' =&gt; 'text',
    'label' =&gt; t('Search API Agg Nationality'),
    'sanitized' =&gt; TRUE,
    'getter callback' =&gt; 'MYMODULE_search_agg_nat_getter_callback',
  );
}

/*
 * Getter callback for agg nationality property.
 */
function MYMODULE_search_agg_nat_getter_callback($item) {
  // Need to load the user object to get fields
  $account = user_load($item-&gt;uid);
  $nationality = $account-&gt;field_gen_nationality['und'][0]['iso2'];
  switch ($nationality) {
    case 'JP':
      return 'ja';
    break;
    default:
      return 'en';
    break;
  }
}