In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the problem of solving the problem that phpcms can not search the content. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
What if phpcms can't find content? Phpcms v9 search results are incomplete and cannot find content and ranking of search results
There is a problem with the search result of Phpcms V9 used by the backend of the website. I have found the information and sorted it out as follows:
Step one:
Phpcms v9 search results are incomplete and content solutions cannot be found:
Open phpcms\ modules\ search\ index.php
find
If (! empty ($segment_q)) {$sql = "`siteid` ='$siteid' AND `typeid` ='$typeid' $sql_time AND MATCH (`data`) AGAINST ('$segment_q' IN BOOLEAN MODE)";} else {$sql = "`siteid` ='$siteid' AND `typeid` ='$typeid' $sql_time AND `data`like'% $Q%'";}
Modify to
If (! empty ($segment_q)) {$sql = "`siteid` ='$siteid' AND `typeid` ='$typeid' $sql_time AND `data`like'% $Q%'";} else {$sql = "`siteid` ='$siteid' AND `typeid` ='$typeid' $sql_time AND `data`like'% $Q%'";}
The result is no longer using participles for keyword search, but directly using the keywords you enter.
Step 2:
Search results are sorted in descending order of time
Modified page:\ phpcms\ modules\ search\ index.php modify only one line!
Search for:
$data = $this- > content_db- > select ($where,'*')
To be replaced by:
$data = $this- > content_db- > select ($where,'*', ",'id desc')
This allows the search content to be sorted in descending order of time.
On solving the problem of phpcms search can not find content to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.