diff --git uniqueness.admin.inc uniqueness.admin.inc
index 79cd80c..9c16e32 100644
--- uniqueness.admin.inc
+++ uniqueness.admin.inc
@@ -27,6 +27,17 @@ function uniqueness_settings() {
     '#default_value' => variable_get('uniqueness_search_mode', UNIQUENESS_SEARCH_MODE_NODETITLE),
     '#required' => TRUE,
   );
+  $form['search']['uniqueness_scope'] = array(
+    '#type' => 'radios',
+    '#title' => t('Search scope'),
+    '#options' => array(
+      UNIQUENESS_SCOPE_ALL => t('Search in all nodes'),
+      UNIQUENESS_SCOPE_CONTENT_TYPE => t('Search only within the content type of the node being added or edited.'),
+    ),
+    '#default_value' => variable_get('uniqueness_scope', UNIQUENESS_SCOPE_CONTENT_TYPE),
+    '#description' => t('Search all nodes or just nodes of the same content type.'),
+    '#required' => TRUE,
+  );
 
   // Appearance.
   $form['appearance'] = array(
diff --git uniqueness.js uniqueness.js
index f303164..ecf479b 100644
--- uniqueness.js
+++ uniqueness.js
@@ -43,6 +43,8 @@ Drupal.uniqueness = function (uri, widget) {
   this.searchCache = {};
   this.listCache = {};
   this.prependResults = Drupal.settings.uniqueness['prependResults'];
+  this.nid = Drupal.settings.uniqueness['nid'];
+  this.type = Drupal.settings.uniqueness['type'];
 }
 
 Drupal.uniqueness.prototype.update = function (data) {
@@ -95,7 +97,14 @@ Drupal.uniqueness.prototype.search = function (element, searchString) {
       uniqueness.notifier.addClass('uniqueness-dyn-searching').html(Drupal.settings.uniqueness['searchingString']);
       uniqueness.widget.css(uniqueness.widgetCSS);
     }
-    $.getJSON(uniqueness.uri + '?' + element + '=' + searchString, function (data) {
+    var query = uniqueness.uri + '?';
+    if (uniqueness.nid != undefined) {
+      query += 'nid=' + uniqueness.nid + '&';
+    }
+    if (uniqueness.type != undefined) {
+      query += 'type=' + uniqueness.type + '&';
+    }
+    $.getJSON(query + element + '=' + searchString, function (data) {
       if (data != undefined && data != 'false') {
         // Found results.
         uniqueness.update(data);
diff --git uniqueness.module uniqueness.module
index 4f5d534..d2c7c2a 100644
--- uniqueness.module
+++ uniqueness.module
@@ -15,6 +15,9 @@ define('UNIQUENESS_SEARCH_MODE_SOLR', 0x03);
 define('UNIQUENESS_ADD_NODE', 0x01);
 define('UNIQUENESS_EDIT_NODE', 0x02);
 
+define('UNIQUENESS_SCOPE_ALL', 0x01);
+define('UNIQUENESS_SCOPE_CONTENT_TYPE', 0x02);
+
 /**
  * Implementation of hook_menu().
  */
@@ -118,7 +121,7 @@ function uniqueness_form_alter(&$form, $form_state, $form_id) {
     _uniqueness_widget_store(array('type'=> $type, 'op' => $op));       // Save the content type and operation for later use
     if (user_access('use uniqueness widget') && in_array($op, variable_get('uniqueness_type_' . $type, array()))) {
       // Add our javascript.
-      _uniqueness_add_search_javascript();
+      _uniqueness_add_search_javascript($type, $form['nid']['#value']);
 
       // Embed inline widget if enabled.
       if (uniqueness_widget_enabled(UNIQUENESS_WIDGET_INLINE)) {
@@ -178,7 +181,7 @@ function _uniqueness_widget_store($options = NULL) {
 /**
  * Generates and embeds javascript code required for the uniqueness search.
  */
-function _uniqueness_add_search_javascript() {
+function _uniqueness_add_search_javascript($type, $nid) {
   drupal_add_js(drupal_get_path('module', 'uniqueness') . '/uniqueness.js');
   $search_url = base_path() . 'uniqueness-search/' . $type;
   $settings = array(
@@ -190,6 +193,12 @@ function _uniqueness_add_search_javascript() {
   if (!empty($form_state['node_preview'])) {
     $settings['preview'] = TRUE;
   }
+  if (variable_get('uniqueness_scope', UNIQUENESS_SCOPE_CONTENT_TYPE) == UNIQUENESS_SCOPE_CONTENT_TYPE) {
+    $settings['type'] = $type;
+  }
+  if (is_numeric($nid) && $nid != 0) {
+    $settings['nid'] = $nid;
+  }
   drupal_add_js(array('uniqueness' => $settings), 'setting');
 }
 
@@ -281,7 +290,7 @@ function uniqueness_widget_content() {
 /**
  * Callback for uniqueness-search returns HTML stubs for related content.
  */
-function uniqueness_dynamic_callback($type = '', $string = '') {
+function uniqueness_dynamic_callback() {
   // Build $values from $string.
   $values = array();
   // @todo refer to tags as 'terms'
@@ -291,6 +300,12 @@ function uniqueness_dynamic_callback($type = '', $string = '') {
   if ($_GET['title']) {
     $values['title'] = strip_tags($_GET['title']);
   }
+  if ($_GET['nid']) {
+    $values['nid'] = strip_tags($_GET['nid']);
+  }
+  if ($_GET['type']) {
+    $values['type'] = strip_tags($_GET['type']);
+  }
   if (!empty($values)) {
     $related_content = uniqueness_content($values);
   }
@@ -335,9 +350,17 @@ function _uniqueness_content_nodetitle($values) {
   $related_content = array();
   // Query node table.
   if ($values['title']) {
+    $where = array($values['title']);
     $sql = "SELECT n.nid, n.title FROM {node} n WHERE LOWER(n.title) LIKE LOWER('%%%s%') AND n.status = 1";
-    // @todo types
-    $result = db_query(db_rewrite_sql($sql), $values['title']);
+    if (array_key_exists('type', $values)) {
+      $sql .= " AND n.type = '%s'";
+      $where[] = $values['type'];
+    }
+    if (array_key_exists('type', $values) && is_numeric($values['nid'])) {
+      $sql .= " AND n.nid != %d";
+      $where[] = $values['nid'];
+    }
+    $result = db_query(db_rewrite_sql($sql), $where);
     while ($row = db_fetch_array($result)) {
       $related_content[$row['nid']] = $row;
     }
@@ -357,18 +380,21 @@ function _uniqueness_content_drupalsearch($values) {
   }
 
   // build search string
-  // @todo add types by adding e.g. type:blog
-  $searchstring = join(' OR ', split(' ', $values['title']));
+  $searchstring = array_key_exists('type', $values) ? " type:$type" : '';
+  $searchstring .= join(' OR ', split(' ', $values['title']));
   $search_results = node_search('search', $searchstring);
 
   $related_content = array();
+  $nid = (array_key_exists('nid', $values) ? $values['nid'] : 0);
   foreach ($search_results as $result) {
       $item = array();
       // Title has already been filtered.
       $item['html'] = TRUE;
       $item['nid'] = $result['node']->nid;
       $item['title'] = $result['title'];
-      $related_content["{$result['node']->nid}"] = $item;
+      if ($nid != $item['nid']) {
+        $related_content["{$result['node']->nid}"] = $item;
+      }
   }
 
   return $related_content;
@@ -386,32 +412,30 @@ function _uniqueness_content_solr($values) {
 
   $related_content = array();
 
-  // Search discussion types first.
-  // @todo generalize types
-  foreach (array('discussion', 'local_discussion') as $type) {
-    $filter = 'type:' . $type;
-    // Search title.
-    if ($values['title']) {
-      $title_content = uniqueness_solr($values['title'], $filter);
-      if (!empty($title_content)) {
-        $related_content = array_merge($related_content, $title_content);
-      }
+  $filter = array_key_exists('type', $values) ? 'type:' . $values['type'] : '';
+  $nid = array_key_exists('nid', $values) ? $values['nid'] : 0;
+
+  // Search title.
+  if ($values['title']) {
+    $title_content = uniqueness_solr($values['title'], $filter, $nid);
+    if (!empty($title_content)) {
+      $related_content = array_merge($related_content, $title_content);
     }
-    // Search tags.
-    if ($values['tags']) {
-      $tags = explode(',', $values['tags']);
-      foreach ($tags as $tag) {
-        $results = uniqueness_solr(trim($tag), $filter);
-        if (!empty($results)) {
-          $related_content = array_merge($related_content, $results);
-        }
+  }
+  // Search tags.
+  if ($values['tags']) {
+    $tags = explode(',', $values['tags']);
+    foreach ($tags as $tag) {
+      $results = uniqueness_solr(trim($tag), $filter, $nid);
+      if (!empty($results)) {
+        $related_content = array_merge($related_content, $results);
       }
     }
   }
   return $related_content;
 }
 
-function uniqueness_solr($string, $filter) {
+function uniqueness_solr($string, $filter, $nid) {
   $related_content = array();
   try {
     $solr_results = apachesolr_search_execute($string, $filter, '', '', 0, 'uniqueness');
@@ -421,7 +445,9 @@ function uniqueness_solr($string, $filter) {
       $item['html'] = TRUE;
       $item['nid'] = $result['node']->nid;
       $item['title'] = $result['title'];
-      $related_content["{$result['node']->nid}"] = $item;
+      if ($item['nid'] != $nid) {
+        $related_content["{$result['node']->nid}"] = $item;
+      }
     }
   }
   catch (Exception $e) { 
