Forum

Thread tagged as: Blog

Searching Blog App Exclusively...

I'm trying to exclusively search the blog. My page template has the following: perch_content_search($query, array( 'count' => 9, 'template' => 'post_in_list.html', 'apps'=>'PerchBlog' ));

But still all content is being searched...

SELECT SQL_CALC_FOUND_ROWS DISTINCT 'PerchContent_SearchHandler' AS source, MATCH(ci.itemSearch) AGAINST('Irish') AS score, r.regionPage AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, r.regionOptions AS col4, p.pageNavText AS col5, p.pageTitle AS col6, regionTemplate AS col7, r.regionKey AS col8 FROM cms_content_regions r, cms_content_items ci, cms_pages p WHERE r.regionID=ci.regionID AND r.regionRev=ci.itemRev AND r.pageID=p.pageID AND r.regionPage!='*' AND r.regionSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('Irish') OR MATCH(ci.itemSearch) AGAINST('Irish') ) AND r.regionPage LIKE '/%' UNION SELECT 'PerchContent_RunwaySearch' AS source, MATCH(ci.itemSearch) AGAINST('Irish') AS score, c.collectionKey AS col1, ci.itemSearch AS col2, ci.itemJSON AS col3, c.collectionOptions AS col4, c.collectionKey AS col5, c.collectionKey AS col6, collectionTemplate AS col7, c.collectionKey AS col8 FROM cms_collections c, cms_collection_items ci, cms_collection_revisions cr WHERE c.collectionID=cr.collectionID AND cr.itemID=ci.itemID AND cr.itemRev=ci.itemRev AND c.collectionSearchable=1 AND cr.itemSearchable=1 AND (MATCH(ci.itemSearch) AGAINST('Irish') OR MATCH(ci.itemSearch) AGAINST('Irish') ) UNION SELECT 'PerchBlog_SearchHandler' AS source, MATCH(postTitle, postDescRaw, postTags) AGAINST('Irish') AS score, postTitle, postSlug, postDateTime, postDescHTML, postID, sectionSlug, "", "" FROM cms_blog_posts p, cms_blog_sections s WHERE postStatus='Published' AND postDateTime<'2015-09-29 16:25:18' AND p.sectionID=s.sectionID AND MATCH(postTitle, postDescRaw, postTags) AGAINST('Irish') ORDER BY score DESC LIMIT 0, 9

Am I missing something?

Phil Smith

Phil Smith 0 points

  • 6 years ago

I think apps expects an array.

try

perch_content_search($query, array( 'count' => 9, 'template' => 'post_in_list.html', 'apps'=>array('PerchBlog') ));

Ten points to that man!