为什么搜索结果只列出一个条目?

时间:2010-12-15 作者:Steven

我想知道为什么我在搜索中只得到一个结果。

我的搜索查询如下:
http://www.norwegianfashion.no/?s=oslo+fashion+week

如果我在谷歌上搜索,你会发现我的点击率很高:
http://www.google.no/search?hl=en&client=opera&hs=GTw&rls=en-GB&q=oslo+fashion+week+site%3Awww.norwegianfashion.no&aq=f&aqi=&aql=&oq=&gs_rfai=

在本地计算机上,我查看了查询日志,发现:

       29 Query SELECT option_name, option_value FROM nfwp_options WHERE autoload = \'yes\'
       29 Query SELECT option_value FROM nfwp_options WHERE option_name = \'akismet_comment_nonce\' LIMIT 1
       29 Query SELECT * FROM nfwp_users WHERE user_login = \'admin\'
       29 Query SELECT user_id, meta_key, meta_value FROM nfwp_usermeta WHERE user_id IN (1)
       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND (((nfwp_posts.post_title LIKE \'%oslo%\') OR (nfwp_posts.post_content LIKE \'%oslo%\')) AND ((nfwp_posts.post_title LIKE \'%fashion%\') OR (nfwp_posts.post_content LIKE \'%fashion%\')) AND ((nfwp_posts.post_title LIKE \'%week%\') OR (nfwp_posts.post_content LIKE \'%week%\')) OR (nfwp_posts.post_title LIKE \'%oslo fashion week%\') OR (nfwp_posts.post_content LIKE \'%oslo fashion week%\'))  AND nfwp_posts.post_type IN (\'post\', \'page\', \'attachment\') AND (nfwp_posts.post_status = \'publish\' OR nfwp_posts.post_author = 1 AND nfwp_posts.post_status = \'private\')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 10
       29 Query SELECT FOUND_ROWS()
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4139,4135,4130,4129,3831,4126,3750,2564,3667,3573)
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'post_tag\') AND tr.object_id IN (4139) ORDER BY t.name ASC
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = \'nav_menu\' AND t.term_id = \'0\' LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = \'nav_menu\' AND t.slug = \'quick-menu\' LIMIT 1
       29 Query SELECT tr.object_id FROM nfwp_term_relationships AS tr INNER JOIN nfwp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'nav_menu\') AND tt.term_id IN (\'997\') ORDER BY tr.object_id ASC
       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (4309) AND nfwp_posts.post_type = \'nav_menu_item\' AND (nfwp_posts.post_status = \'publish\')  ORDER BY menu_order ASC
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4309)
       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (2) AND nfwp_posts.post_type = \'page\' AND (nfwp_posts.post_status = \'publish\')  ORDER BY nfwp_posts.post_date DESC
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (2)
       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND (((nfwp_posts.post_title LIKE \'%oslo%20fashion%20week%\') OR (nfwp_posts.post_content LIKE \'%oslo%20fashion%20week%\')))  AND nfwp_posts.post_type IN (\'post\', \'page\', \'attachment\') AND (nfwp_posts.post_status = \'publish\' OR nfwp_posts.post_author = 1 AND nfwp_posts.post_status = \'private\')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 10
       29 Query SELECT FOUND_ROWS()
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = \'nav_menu\' AND t.term_id = \'0\' LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = \'nav_menu\' AND t.slug = \'main-menu\' LIMIT 1
       29 Query SELECT tr.object_id FROM nfwp_term_relationships AS tr INNER JOIN nfwp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'nav_menu\') AND tt.term_id IN (\'939\') ORDER BY tr.object_id ASC
       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (3729,3731,3732,3733,3734,3735) AND nfwp_posts.post_type = \'nav_menu_item\' AND (nfwp_posts.post_status = \'publish\')  ORDER BY menu_order ASC
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (3729,3734,3733,3732,3731,3735)
       29 Query SELECT   nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.ID IN (30,31,786,3365,7) AND nfwp_posts.post_type = \'page\' AND (nfwp_posts.post_status = \'publish\')  ORDER BY nfwp_posts.post_date DESC
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (3365,786,31,30,7)
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\') AND tr.object_id IN (4139) ORDER BY t.name ASC
       29 Query SELECT SQL_CALC_FOUND_ROWS  nfwp_posts.* FROM nfwp_posts  WHERE 1=1  AND nfwp_posts.post_type = \'post\' AND (nfwp_posts.post_status = \'publish\')  ORDER BY nfwp_posts.post_date DESC LIMIT 0, 5
       29 Query SELECT FOUND_ROWS()
       29 Query SELECT t.*, tt.*, tr.object_id FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\', \'post_tag\') AND tr.object_id IN (4329, 4318, 4313, 4303, 4277) ORDER BY t.name ASC
       29 Query SELECT post_id, meta_key, meta_value FROM nfwp_postmeta WHERE post_id IN (4329,4318,4313,4303,4277)
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = \'category\' AND t.term_id = \'998\' LIMIT 1
       29 Query SELECT * FROM nfwp_users WHERE ID = 31 LIMIT 1
       29 Query SELECT user_id, meta_key, meta_value FROM nfwp_usermeta WHERE user_id IN (31)
       29 Query SELECT * FROM nfwp_comments WHERE  comment_approved = \'1\' ORDER BY comment_date_gmt DESC LIMIT 5
       29 Query SELECT * FROM nfwp_posts WHERE ID = 1154 LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\') AND tr.object_id IN (1154) ORDER BY t.name ASC
       29 Query SELECT * FROM nfwp_posts WHERE ID = 1684 LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\') AND tr.object_id IN (1684) ORDER BY t.name ASC
       29 Query SELECT * FROM nfwp_posts WHERE ID = 3432 LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\') AND tr.object_id IN (3432) ORDER BY t.name ASC
       29 Query SELECT * FROM nfwp_posts WHERE ID = 4138 LIMIT 1
       29 Query SELECT t.*, tt.* FROM nfwp_terms AS t INNER JOIN nfwp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN nfwp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (\'category\') AND tr.object_id IN (4138) ORDER BY t.name ASC
你可以看到它找到了几篇文章(3729,3731,3732,3733,3734,3735).<我也看到了很多LIMIT 1 在这些查询中。对吗?

你知道为什么我只得到一个结果吗?

1 个回复
最合适的回答,由SO网友:Rarst 整理而成

搜索页面使用什么模板?它是通用的index.php 或专业化search.php. 该模板中的循环是什么样子的?

我怀疑这可能是设置为仅dislpay single post而不是迭代所有post的循环问题。

结束

相关推荐

Search result permalink

如何使permalink可用于搜索结果页/?s=一+二+确定到/搜索/一-二确定/感谢