code: protected void checkFeaturesForRequest(final CouchbaseRequest request, final BucketConfig config) {
          if (request instanceof BinaryRequest && !config.serviceEnabled(ServiceType.BINARY)) {
              throw new ServiceNotAvailableException("The KeyValue service is not enabled or no node in the cluster "
                  + "supports it.");
          } else if (request instanceof ViewRequest && !config.serviceEnabled(ServiceType.VIEW)) {
              throw new ServiceNotAvailableException("The View service is not enabled or no node in the cluster "
                  + "supports it.");
          } else if (request instanceof QueryRequest && !config.serviceEnabled(ServiceType.QUERY)) {
              throw new ServiceNotAvailableException("The Query service is not enabled or no node in the "
                  + "cluster supports it.");
          } else if (request instanceof SearchRequest && !config.serviceEnabled(ServiceType.SEARCH)) {
              throw new ServiceNotAvailableException("The Search service is not enabled or no node in the "
                  + "cluster supports it.");
          } else if (request instanceof AnalyticsRequest && !config.serviceEnabled(ServiceType.ANALYTICS)) {
              throw new ServiceNotAvailableException("The Analytics service is not enabled or no node in the "
                  + "cluster supports it.");
          }
      }
docs: Checks, for a sub-set of {@link CouchbaseRequest}, if the current environment has
  the necessary feature activated. If not, throws an {@link ServiceNotAvailableException}.
  
  @param request the request to check.
  @throws ServiceNotAvailableException if the request type needs a particular feature which isn't activated.