Announcement

Collapse
No announcement yet.

Control The Order of the Search Results

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

    Control The Order of the Search Results

    There must be something I'm missing, but can you control the order of the products that show up in the search results? I know there are all these default options, price, name, etc., but even using the custom fields to add search terms doesn't all you to control the order. I know the power search module had a "boost" option which would get products at the top if utilized.

    I have products where the search terms are in the product description or elsewhere and need to show up in the results, and then I have a product with the keyword in the title. I need the product with the keyword in the title to show up first.

    Thansk!
    Jason Lindsey
    Dreamchaser Design
    www.dreamchaserdesign.com
    "You Dream. We Design."

    #2
    You can resort the array before looping through it:


    Code:
      <mvt:comment> *** sort by custom prod field to help control the display order ***    </mvt:comment>   
      <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:category_listing:products, ':customfield_values:customfields:custom_field_code', 1)" />
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Originally posted by KayfabeRockStar View Post
      There must be something I'm missing, but can you control the order of the products that show up in the search results? I know there are all these default options, price, name, etc., but even using the custom fields to add search terms doesn't all you to control the order. I know the power search module had a "boost" option which would get products at the top if utilized.

      I have products where the search terms are in the product description or elsewhere and need to show up in the results, and then I have a product with the keyword in the title. I need the product with the keyword in the title to show up first.

      Thansk!
      Are you currently using Power Search? If so, what has been your experience?

      Miva discourages M9.7 or greater store owners from using EP Power Search:

      Power Search should not be used any longer on new sites, our built in search that came out in 9.7 is faster, more powerful and designed to replace Power Search. Power Search has a number of performance issues that will crush your site in the long run.
      Finally, would anyone know how difficult it is to implement a third-party site search solution when no module for said vendor exists?
      Thank you, Bill Davis

      Comment


        #4
        I have used Power Search on Miva sites before the discouragement. "Power"ful it is. While Miva's search improvements are vastly superior to how the built-in search worked before, it's still not easy to control what should be "standard" features such as the ability to control the search order (beyond their presets) and hiding certain products from the search results.

        I don't know the answer to your question about a third-party option. Power Search was the only other option I used personally.

        I'm going to try Bruce's suggestion above. Thanks Bruce! Might be the answer I need.
        Jason Lindsey
        Dreamchaser Design
        www.dreamchaserdesign.com
        "You Dream. We Design."

        Comment


          #5
          How long have you been using EP Power Search with how many products and categories?
          Thank you, Bill Davis

          Comment


            #6
            One site I work on, I've been using it since probably 2009. 5000 products roughly.
            Jason Lindsey
            Dreamchaser Design
            www.dreamchaserdesign.com
            "You Dream. We Design."

            Comment


              #7
              Originally posted by KayfabeRockStar View Post
              One site I work on, I've been using it since probably 2009. 5000 products roughly.
              Interesting. If you are on M9.7 or higher, have you noticed any type degradation in site performance and is your site on a shared or dedicated server?

              If you and/or others are not experiencing any issues with EP Power Search, maybe it might be worth giving it a try for us? We just cannot continue with the stock search solution.
              Thank you, Bill Davis

              Comment


                #8
                The site mentioned previously is on the latest version of Miva and no performance issues.

                Bruce -- I put your code just before: <mvt:foreach iterator="product" array="search_results:products"> but it's just not working as anticipated. Miva's search is also still searching the product description when I don't have that checked in the search settings too ...
                Jason Lindsey
                Dreamchaser Design
                www.dreamchaserdesign.com
                "You Dream. We Design."

                Comment


                  #9
                  What was anticipated and what are the results? Also, whats the actual code you used. (BTW: the 1 and the end is the 'direction' of the search, maybe you need to reverse it by using -1
                  Bruce Golub
                  Phosphor Media - "Your Success is our Business"

                  Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                  phosphormedia.com

                  Comment


                    #10
                    Basically, what I need is if a keyword is typed in such as "gold" ... the list should first be ordered by any product that has the word "gold" in the title of the product (product name). Then we want a custom field with keywords that if the word "gold" appears, those products would appear below the products with "gold" in the title.

                    In the search settings, the only options we have checked are "Product Name" and "Keywords (custom field). Those should be the only fields searched.

                    1. Products with "gold" in the DESCRIPTION are showing in the search results when that option isn't selected in the search settings.
                    2. The products appear in a presorted order (which I cannot determine) which might be "gold" appearing either in the description or keywords or title - where I need the products with the word "gold" in the title/prod name to appear first - seems logical to me.
                    3. I thought by adding a "boost" custom field, I could either repeat the product name or just put the word GOLD (on products with gold in the title) and then using your code to sort by custom field FIRST, it would show those items with "gold" in the product title first ... but no.

                    I hope this is a little more clear ... and THANKS by the way. :)
                    Jason Lindsey
                    Dreamchaser Design
                    www.dreamchaserdesign.com
                    "You Dream. We Design."

                    Comment


                      #11
                      AKAIK, that's not something you are going to be able to do in SMT code :(

                      What you'd need to do is run Miva's search on a 'restricted' basis, then, run a second loop searching through more fields. Might even just run the first, then display a "Look for More" button to run the second. Probably could be done inside a module, but don't think you could do that in SMT. That being said, it depends on API call that runs search (never really looked into it). If the final low level call includes the parameters you set in the Search Settings field, then maybe you can.
                      Bruce Golub
                      Phosphor Media - "Your Success is our Business"

                      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                      phosphormedia.com

                      Comment


                        #12
                        Why wouldn't resorting the array before the loop as you suggested earlier not make any difference?
                        Jason Lindsey
                        Dreamchaser Design
                        www.dreamchaserdesign.com
                        "You Dream. We Design."

                        Comment


                          #13
                          Is that custom field active on the search results page? A typo maybe?
                          Bruce Golub
                          Phosphor Media - "Your Success is our Business"

                          Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
                          phosphormedia.com

                          Comment


                            #14
                            Active and no typo.
                            Jason Lindsey
                            Dreamchaser Design
                            www.dreamchaserdesign.com
                            "You Dream. We Design."

                            Comment


                              #15
                              Bruce, how difficult it is to implement a third-party site search solution when no Miva module for said vendor exists?

                              All though there are many factors to a successful online store, site search is the second most crucial factor that leads to sales after search engine optimization and placement. All of the other countless bells and whistles are undoubtedly great but would essentially become meaningless if shoppers can’t find it, they can’t buy it!
                              Thank you, Bill Davis

                              Comment

                              Working...
                              X