PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Recommended link for all search results

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Recommended link for all search results

    Hello,

    first of all: good work. V5 ist a great solution for us!

    I would like to promote some specific pages of the search resultset at top of the list. Recommended links seems to be the solution.

    My problem: if a specific page is in the resultset of a search it should be always on top, regardless of the keywords. It should be something like placing a "*" a a always-matching character in the recommended links configuration. Is this possible? Are there any other solutions?

    Best regards
    Andi

  • #2
    Recommended links are always associated with a particular word, or collection of words. It is not possible to have it associated with all words.

    If you can't come up with a list of words that are associated with the page, a better solution might be to boost the page using this meta tag in the HTML of the page.
    <meta name="ZOOMPAGEBOOST" content="5">

    Comment


    • #3
      Of course, if you really wish to have a link that always appear at the top of your search results - regardless of what the user searches for, you could always just add this link in HTML to your search_template.html file
      --Ray
      Wrensoft Web Software
      Sydney, Australia
      Zoom Search Engine

      Comment


      • #4
        @wrensoft:
        ZOOMPAGEBOOST is an option, to put some specific pages at top of a resultset.

        But placing some recommended links at top of the list with special formatting is exactly what I want.

        Are there any changes that you could realize something like an "all-matching"-keyword for recommended links in the cgi-version?

        Another option for me seems to link a keyword with the recommend link and **always** call the search function with this specific keywords additionally to the search keywords the user put in. But this seems not the best solution to me, because the addional (hidden) keyword will be output in the search results. That could confuse the user.

        @Ray:
        My problem: in the resultset we can have some hits for out organizational units - or not. But if there are some, they have to listed at top of the results. So the hits are optional, but if there are some hits, they have to be at top with extra formatting.

        @ALL:
        Any other ideas / solutions?

        Comment


        • #5
          Are there any changes that you could realize...in the cgi-version?
          We now make the CGI source available, so you can buy it and do whatever you want to it. But what you want is more than a 5 min job.


          Another solution might be to
          1) Dump out the text on the relevant page (or extract them from the Zoom dictionary, if you are feeling brave)
          2) Load the text into a good text editor with 1 word per line
          3) Remove all the irrelevant small words. (like, this, that, or, not, some, the, a, an, it, was, etc..)
          4) Add a URL to each line using a search and replace function in the editor.
          5) Import the text file into Zoom as recommended links.

          It isn't a great solution as you need to good with a text editor and the list will slowly become out of date over time, as you update the page.

          The "all-matching"-keyword idea is so hot either. Because there will be many small irrelevant words on the page which you *won't* want to match on. For example, if someone does a two word search of, 'the house', do you really want your special page to be a recommended link because it contains the word 'the'?

          Comment


          • #6
            Originally posted by wrensoft View Post
            It is not possible to have it associated with all words.
            I managed it by changing the following which appears just after the "Show recommended links if any" comment:
            PHP Code:
            if ($result == 0)
                        {
                            if (
            $num_recs_found == 0)
                            {
                                print(
            "<div class=\"recommended\">\n");
                                print(
            "<div class=\"recommended_heading\">$STR_RECOMMENDED</div>\n");
                            }
                            
            $pgdata GetPageData($rec_idx);
                            
            $url $pgdata[$PAGEDATA_URL];
                            
            $title $pgdata[$PAGEDATA_TITLE];
                            
            $description $pgdata[$PAGEDATA_DESC];

                            
            $urlLink $url;
                            
            //$urlLink = rtrim($urls[$rec_idx]);

                            
            if ($GotoHighlight == 1)
                            {
                                if (
            $SearchAsSubstring == 1)
                                    
            $urlLink AddParamToURL($urlLink"zoom_highlightsub=".$queryForURL);
                                else
                                    
            $urlLink AddParamToURL($urlLink"zoom_highlight=".$queryForURL);
                            }
                            if (
            $PdfHighlight == 1)
                            {
                                if (
            stristr($urlLink".pdf") != FALSE)
                                    
            $urlLink $urlLink."#search=&quot;".str_replace("\""""$query)."&quot;";
                            }
                            print(
            "<div class=\"recommend_block\">\n");
                            print(
            "<div class=\"recommend_title\">");
                            print(
            "<a href=\"".$urlLink."\"" $target ">");
                            if (
            strlen($title) > 1)
                                
            PrintHighlightDescription($title);
                            else
                                
            PrintHighlightDescription($pgdata[$PAGEDATA_URL]);
                            print(
            "</a></div>\n");
                            print(
            "<div class=\"recommend_description\">");
                            
            PrintHighlightDescription($description);
                            print(
            "</div>\n");
                            print(
            "<div class=\"recommend_infoline\">$url</div>\n");
                            print(
            "</div>");
                            
            $num_recs_found++;
                            break;
                        } 
            To:
            PHP Code:
            if ($result != 0)
                        {
                            print(
            "<div class=\"recommended\">\n");
                            print(
            "<div class=\"recommended_heading\">$STR_RECOMMENDED</div>\n");
                            
                            
            $pgdata GetPageData($rec_idx);
                            
            $url $pgdata[$PAGEDATA_URL];
                            
            $title $pgdata[$PAGEDATA_TITLE];
                            
            $description $pgdata[$PAGEDATA_DESC];

                            
            $urlLink $url;
                            
            //$urlLink = rtrim($urls[$rec_idx]);

                            
            if ($GotoHighlight != 1)
                            {
                                if (
            $SearchAsSubstring == 1)
                                    
            $urlLink AddParamToURL($urlLink"zoom_highlightsub=".$queryForURL);
                                else
                                    
            $urlLink AddParamToURL($urlLink"zoom_highlight=".$queryForURL);
                            }
                            if (
            $PdfHighlight == 1)
                            {
                                if (
            stristr($urlLink".pdf") != FALSE)
                                    
            $urlLink $urlLink."#search=&quot;".str_replace("\""""$query)."&quot;";
                            }
                            print(
            "<div class=\"recommend_block\">\n");
                            print(
            "<div class=\"recommend_title\">");
                            print(
            "<a href=\"".$urlLink."\"" $target ">");
                            if (
            strlen($title) > 1)
                                
            PrintHighlightDescription($title);
                            else
                                
            PrintHighlightDescription($pgdata[$PAGEDATA_URL]);
                            print(
            "</a></div>\n");
                            print(
            "<div class=\"recommend_description\">");
                            
            PrintHighlightDescription($description);
                            print(
            "</div>\n");
                            print(
            "<div class=\"recommend_infoline\">$url</div>\n");
                            print(
            "</div>");
                            
            $num_recs_found++;
                            break;
                        } 
            Then when configuring Zoom indexer, for the recommended links I put "^" (without the quotes) as the word.

            So now, no matter what anyone searches for, the recommended link will always show.

            See it in action: http://www.metadigm.co.uk/search/search.php

            Specialists In Network Security

            Comment

            Working...
            X