Making Dolphin Search better with better results

I want to find a way to change a few features of the dolphin search when you search on dolphin site you can get shitty results my idea is to make it were it works like an algorithm where if any of the words you search for are is in the tag title or description it will show up in your search results. Then list them in order by the highest amount of search words each listing has. Then if they have the same amount then the one with the most tag words would be list higher then the one that just has title words that were search for and then listings with just description words would be listed low then listings with title words. Then from there if there are still listings that have the same amount of search words list the ones that have a highest rating above the ones that have lower rating. Continue and go by amount of votes amount of comments and then date. I think that if dolphin search worked like this you would be able to get better listing when you search. Let me know what y'all think I'm working trying to find a way to do this but I'm new to dolphin a php so it might take a while. I'm working on building a search engine so this is where my focus is right now.

Quote · 24 Sep 2012

Have you tried your "google site search" module?

http://mynewbeetle.net/7.1/m/google_search/

use the search "beetle" or "newton"

This work well for our site's?

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 24 Sep 2012

Ya i checked it out but then i got all kind of pages that were not just from the listed sites on my website and they where not in the order i would like. I want to be able to just search the listed site i add to my sites.

i need to write a code that does something like this

check search for amount of words
for ever word
check debase for listings

arrange listings by amount of words in listing highest to lowest

for every listing with same amount of search words
check if words were tag words or title word or description words
arrange listings by tags then titles then descriptions

for every listing with same value of tag word in tags title and description
check rating
arrange listings by rating

for every listing with same value of tag words and rating
check rating count
arrange listings by rating

for every listing with same value of all of the above
check date listed
arrange listings by date

but i need it in php

Quote · 24 Sep 2012

Ok im trying to get the search were it will search it will display results if any of the search words are in it even if not all search words are in the title. For example if I have a title like this : Ferrari 599 GTB Fiorano by Novitec and I search for ferrari it works fine, if I search for ferrari 599 it works fine BUT if I search for ferrari GTB it doesn't return any results... So it seems like it only finds words that are near each other and in the same order as they are in the title.

So i have something like this

$query "SELECT * FROM `$table` WHERE";
$array explode(" ", $keyword
); // this is needed to separate each word so it searches each word
foreach (
$array as $key => $keyword){
    
$query .= " title LIKE '%$keyword%'";
    if (
$key != (sizeof($array) - 1))   //skip adding the last 'AND' to 
            
$query .= " AND ";                // prevent a bad query

this is from BxDolSearch.php

I Think this is were i need to implement this code

    function getSearchFieldsCond ($aFields, $sKeyword, $sPseud = '') {
        if (strlen($sKeyword) > 0) {
           $bLike = getParam('useLikeOperator');
           $aSql = array(
              'function' => 'MATCH',
              'operator' => 'AGAINST',
              'word' => $sKeyword
           );
           if ($bLike == 'on') {
               $aSql = array(
                  'function' => 'CONCAT',
                  'operator' => 'LIKE',
                  'word' => '%' . $sKeyword . '%'
               );
           }
           $sqlWhere = " {$aSql['function']}(";
           if (is_array($aFields)) {
               foreach ($aFields as $sValue)
                    $sqlWhere .= "`{$this->aCurrent['table']}`.`$sValue`, ";
           }
           else
              $sqlWhere .= "`{$this->aCurrent['table']}`.`$aFields`";
           $sqlWhere = trim($sqlWhere, ', ') . ") {$aSql['operator']} ('{$aSql['word']}')";
           
           if (strlen($sPseud) > 0)
                   $sqlWhere .= " as `$sPseud`";
           
           return $sqlWhere;
        }

Anyone have an idea how i might do this i think it's stupid that boonex has ignored the flaws in there search engine leaving this to us to fix!

Quote · 25 Sep 2012

Ticket: http://www.boonex.com/trac/dolphin/ticket/2846 

Changeset: http://www.boonex.com/trac/dolphin/changeset/16932 

Rules → http://www.boonex.com/terms
Quote · 27 Sep 2012

Hey thanks for fixing this you guys are the best! Yall rock! I'm be getting my license soon keep up the good work.

Quote · 27 Sep 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.