Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Search Not Working
darbeey
New
Best Answer
-
@darbeey, you need to comment some lines in
forum\applications\dashboard\models\class.searchmodel.phpthat won't be a good search but it will work
//if ($this->_SearchMode == 'like') { if ($LikeRelavenceColumn) $Sql->Select($LikeRelavenceColumn, '', 'Relavence'); else $Sql->Select(1, '', 'Relavence'); $Sql->BeginWhereGroup(); $ColumnsArray = explode(',', $Columns); foreach ($ColumnsArray as $Column) { $Column = trim($Column); $Param = $this->Parameter(); $Sql->OrWhere("$Column like $Param", NULL, FALSE, FALSE); } $Sql->EndWhereGroup(); /*} else { $Boolean = $this->_SearchMode == 'boolean' ? ' in boolean mode' : ''; $Param = $this->Parameter(); $Sql->Select($Columns, "match(%s) against($Param{$Boolean})", 'Relavence'); $Param = $this->Parameter(); $Sql->Where("match($Columns) against ($Param{$Boolean})", NULL, FALSE, FALSE); } */
and
//if ($this->_SearchMode == 'like') $Search = '%'.$Search.'%';
5
Answers
full text index takes a while to index.
you can try adding
+
before words, this sometimes helps.grep is your friend.
You could try putting the following into Google it may help until the search index is complete.
site:http://vanillaforums.org/discussions *search query*
That works by telling Google to search this site. Replace search query with what you're looking for.
Might work, but handy for any website as well as this one.
Our host is causing us real pain right now, but the search should be up again.
Need a sledge hammer to teach them some lessons? Or is that too harsh?
There was an error rendering this rich post.
@darbeey, you need to comment some lines in
forum\applications\dashboard\models\class.searchmodel.php
that won't be a good search but it will work
and
@johansonlocker why are you editing the core? If you want like search you can just set a config option. read the code.
if ($this->_SearchMode == 'like')
set
$Configuration['Garden']['Search']['Mode'] = 'like'; // matchboolean, match, boolean, like
Like search is slow, becuase it isn't a search index.
grep is your friend.
@x00,
just because of match-mode doesn't work at all. the second point is to write a code with an acceptable results. I don't like the one on this site where searching the word "search" doesn't show topic "Searching" which is found with word combination "search engine", and on the contrary searching words "searching engine" doesn't show this topic "Search Not Working". Also I don't like these both topics are somewhere below inspiteof they are the most appropriate, and have a large quantity of posts where the first of searched words *"search" is present.
thnx
Nonetheless, sometimes the result is more critical than the speed