diff --git a/README.txt b/README.txt
index a766c7c..db9a3fd 100644
--- a/README.txt
+++ b/README.txt
@@ -33,6 +33,17 @@ Currently, only search forms built by search pages or search views are
 supported directly. However, other modules can easily also use this
 functionality. See the "Information for developers" for details.
 
+  - Caution! -
+  If your view uses contextual filters, those can generally not be inferred in
+  the autocompletion function which might lead to problems of different kinds,
+  including display of confidential information (if such information would be
+  available without contextual filters), wrong suggestions or complete absence
+  of suggestions.
+  Therefore, you should create another display without contextual filters, if
+  necessary, and make sure that this doesn't lead to any leaks.
+  If you want to fix this in a custom way for your site, take a look at
+  example_search_api_query_alter() for suggestions.
+
 
 Information for developers
 --------------------------
diff --git a/search_api_autocomplete.api.php b/search_api_autocomplete.api.php
index 83ba371..6e9320a 100644
--- a/search_api_autocomplete.api.php
+++ b/search_api_autocomplete.api.php
@@ -335,9 +335,29 @@ function example_form_example_search_form_alter(array &$form, array &$form_state
   // Look up the corresponding autocompletion configuration, if it exists.
   $search = search_api_autocomplete_search_load($search_id);
   // Check whether autocompletion for the search is enabled.
+  // (This is also checked automatically later, so could be skipped here.)
   if (!empty($search->enabled)) {
     // If it is, pass the textfield for the search keywords to the
     // alterElement() method of the search object.
     $search->alterElement($form['keys']);
   }
 }
+
+/**
+ * Implements hook_search_api_query_alter().
+ *
+ * This example hook implementation shows how a custom module could fix the
+ * problem with Views contextual filters in a specific context.
+ */
+function example_search_api_query_alter(SearchApiQueryInterface $query) {
+  // Check whether this is an appropriate automcomplete query.
+  if ($query->getOption('search id') === 'search_api_autocomplete:example') {
+    // If it is, add the necessary filters that would otherwise be added by
+    // contextual filters. This is easy if the argument comes from the global
+    // user or a similar global source. If the argument comes from the URL or
+    // some other page-specific source, however, you would need to somehow pass
+    // that information along to this function.
+    global $user;
+    $query->condition('group', $user->data['group']);
+  }
+}
diff --git a/search_api_autocomplete.module b/search_api_autocomplete.module
index 6df901c..6149b6d 100644
--- a/search_api_autocomplete.module
+++ b/search_api_autocomplete.module
@@ -31,6 +31,7 @@ function search_api_autocomplete_search_api_autocomplete_types() {
       'description' => t('Searches provided by the <em>Search views</em> module.'),
       'list searches' => 'search_api_autocomplete_views_searches',
       'create query' => 'search_api_autocomplete_views_query',
+      'config form' => 'search_api_autocomplete_views_config_form',
     );
   }
 
diff --git a/search_api_autocomplete.pages.inc b/search_api_autocomplete.pages.inc
index 9ed30ad..cf8c45e 100644
--- a/search_api_autocomplete.pages.inc
+++ b/search_api_autocomplete.pages.inc
@@ -18,7 +18,7 @@ function search_api_autocomplete_autocomplete(SearchApiAutocompleteSearch $searc
     if ($query) {
       // @todo Maybe make range configurable?
       $query->range(0, 10);
-      $query->setOption('search id', 'search_api_autocomplete');
+      $query->setOption('search id', 'search_api_autocomplete:' . $search->machine_name);
       if ($fields) {
         $fields = explode(' ', $fields);
         $query->fields($fields);
diff --git a/search_api_autocomplete.search_api_views.inc b/search_api_autocomplete.search_api_views.inc
index 3b7ca2c..90f45e0 100644
--- a/search_api_autocomplete.search_api_views.inc
+++ b/search_api_autocomplete.search_api_views.inc
@@ -93,12 +93,56 @@ function search_api_autocomplete_views_searches(SearchApiIndex $index) {
 function search_api_autocomplete_views_query(SearchApiAutocompleteSearch $search, $complete, $incomplete) {
   $views_id = substr($search->machine_name, 17);
   $view = views_get_view($views_id);
-  // @todo Let users select display
-  $view->set_display();
-  // @todo Determine arguments
+  $view->set_display(isset($search->options['custom']['display']) ? $search->options['custom']['display'] : NULL);
   $view->pre_execute();
   $view->build();
   $query = $view->query->getSearchApiQuery();
   $query->keys($complete);
   return $query;
 }
+
+/**
+ * Form callback for a Views-specific autocomplete configuration form.
+ *
+ * @param SearchApiAutocompleteSearch $search
+ *   The search being configured.
+ *
+ * @see example_autocomplete_config_form()
+ * @see search_api_autocomplete_views_config_form_submit()
+ */
+function search_api_autocomplete_views_config_form(array $form, array &$form_state, SearchApiAutocompleteSearch $search) {
+  $views_id = substr($search->machine_name, 17);
+  $view = views_get_view($views_id);
+  $options = array();
+  foreach ($view->display as $id => $display) {
+    $options[$id] = $display->display_title;
+  }
+  $form['display'] = array(
+    '#type' => 'select',
+    '#title' => t('Views display'),
+    '#description' => t('Please select the Views display whose settings should be used for autocomplete queries.<br />' .
+        "<strong>Note:</strong> Autocompletion doesn't work well with contextual filters. Please see the <a href='@readme_url'>README.txt</a> file for details.",
+        array('@readme_url' => url(drupal_get_path('module', 'search_api_autocomplete') . '/README.txt'))),
+    '#options' => $options,
+    '#default_value' => isset($search->options['custom']['display']) ? $search->options['custom']['display'] : 'default',
+  );
+
+  return $form;
+}
+
+/**
+ * Submit callback for search_api_autocomplete_views_config_form().
+ *
+ * @see example_autocomplete_config_form_submit()
+ * @see search_api_autocomplete_views_config_form()
+ */
+function search_api_autocomplete_views_config_form_submit(array $form, array &$form_state, array &$values) {
+  $views_id = substr($form_state['search']->machine_name, 17);
+  $view = views_get_view($views_id);
+  $view->set_display($values['display']);
+  $view->pre_execute();
+  if ($view->argument) {
+    drupal_set_message(t('You have selected a display with contextual filters. This can lead to various problems. Please see the <a href="@readme_url">README.txt</a> file for details.',
+        array('@readme_url' => url(drupal_get_path('module', 'search_api_autocomplete') . '/README.txt'))), 'warning');
+  }
+}
