CMS MADE SIMPLE FORGE

Search module

 

[#2905] Doesn't index regular content

avatar
Created By: Paul Lemke (lemkepf)
Date Submitted: Mon Jan 19 22:47:49 -0500 2009

Assigned To: Robert Campbell (calguy1000)
Version: v1.1
CMSMS Version: None
Severity: Critical
Resolution: Awaiting Response
State: Closed
Summary:
Doesn't index regular content
Detailed Description:
There was some sql code that would not index certain pages. 


History

Comments
avatar
Date: 2009-01-19 22:48
Posted By: Paul Lemke (lemkepf)

The fix is to remove the "LIMIT 1" from the re-index modules. Example:

$q = "SELECT id FROM ".cms_db_prefix()."module_search_items WHERE
                  extra_attr = ? AND content_id = ? LIMIT 1";

$template_indexed = $db->GetOne( $q, array( 'template', $content->TemplateId()
));

Should be: 

$q = "SELECT id FROM ".cms_db_prefix()."module_search_items WHERE
                  extra_attr = ? AND content_id = ? ";
$template_indexed = $db->GetOne( $q, array( 'template',
$content->TemplateId() ));
      
avatar
Date: 2009-02-15 11:22
Posted By: Robert Campbell (calguy1000)

I can't see what you're talking about.... I see the code, but don't understand
what the problem is.
      
avatar
Date: 2009-04-21 11:02
Posted By: Troy Spruit (densefog)

The solution from lemkepf resolved a problem I was seeing as well. The search
won't index regular content when using adodb but will under adodb-lite. Removing
the limit 1 allows the indexing to work. There's a related discussion here:
http://forum.cmsmadesimple.org/index.php/topic,24332.15.html
      
Updates

Updated: 2012-04-14 16:47
cmsms_version_id: => -1
state: Open => Closed

Updated: 2009-02-15 11:22
resolution_id: 5 => 10

Updated: 2009-01-19 22:49
resolution_id: => 5
assigned_to_id: 100 => 106