Index: contrib/apachesolr_mlt/apachesolr_mlt.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/contrib/apachesolr_mlt/Attic/apachesolr_mlt.module,v
retrieving revision 1.1.4.23
diff -u -p -r1.1.4.23 apachesolr_mlt.module
--- contrib/apachesolr_mlt/apachesolr_mlt.module	10 Feb 2009 20:25:48 -0000	1.1.4.23
+++ contrib/apachesolr_mlt/apachesolr_mlt.module	13 Feb 2009 09:53:16 -0000
@@ -78,6 +78,7 @@ function apachesolr_mlt_suggestions($blo
         'qt' => 'mlt',
         'fl' => 'nid,title,url',
         'mlt.fl' => implode(',', $block['mlt_fl']),
+        'fq' => check_plain($block['mlt_fq']),
     );
 
     foreach ($fields as $field) {
@@ -241,6 +242,12 @@ function apachesolr_mlt_block_form(&$for
     '#description' => t('The maximum number of query terms that will be included in any query. Lower numbers will result in fewer recommendations but will get results faster. If a content recommendation is not returning any recommendations, you can either check more "Comparison fields" checkboxes or increase the maximum number of query terms here.'),
     '#default_value' => isset($block['mlt_maxqt']) ? (int) $block['mlt_maxqt'] : 30,
   );
+  $form['advanced']['mlt_fq'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Results subquery'),
+    '#description' => t('This can be used to filter the result set. Exampe. type:story will limit the suggestions to story nodes'),
+    '#default_value' => isset($block['mlt_fq']) ? check_plain($block['mlt_fq']) : '',
+  );
 
   $form['submit'] = array(
     '#type' => 'submit',
@@ -265,7 +272,7 @@ function apachesolr_mlt_block_form_valid
   if ($form_state['values']['form_id'] == 'apachesolr_mlt_block_form') {
     foreach ($form_state['values'] as $key => $value) {
       //make sure the user inputed a number, accept for the field list
-      if (strpos($key, 'mlt_') === 0 && $key != 'mlt_fl') {
+      if (strpos($key, 'mlt_') === 0 && $key != 'mlt_fl' && $key != 'mlt_fq') {
         if (!empty($value) && !is_numeric($value)) {
           form_set_error($key, t("This field must contain a whole number."));
         }
