We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    This is an auto-generated topic for SimpleSearch 1.2.0-rc2 by splittingred.

    Brief Description:

    A simple search solution for MODx Revolution. Loosely based on AjaxSearch for Evolution (minus the ajax). Only searches Resources; does not search dynamic content.
    New in 1.2.0

    • Fixed bug with searchScore sorting
    • Fixed bug with progressive highlighting class names
    • Added 'alias' to default docFields
    • Added fieldPotency property to allow certain fields higher search scores for the same match
    • Added result sorting (by searchScores)
    • Added the urlScheme parameter which allows you to control the URL scheme used for the pagination links.
    • Made the result extracts to never break words. This means that the extract limit is a soft limit now, and results look much nicer.
    • Added the query placeholder to the containerTpl chunk.
    • Fixed the default value of the landing parameter for the SimpleSearchForm snippet.
    • Fixed an URL decoding bug.
    • Removed defaults from the provided chunk templates, as they duplicate code from the snippets.
    • Made minor performance improvements.

    New in 1.1.1

    • Fixed bug in snippet with wrong reference to $modx var
    • Added idx placeholder
    • Added andTerm (true/false) - Whether or not to add a logical AND between words in search term.
    • Added matchWildcard (behavior depending on query type and limitations)
    • Added docFields which is a list of fields to search on the Resource.

    See the official documentation here:
    http://rtfm.modx.com/display/addon/SimpleSearch/
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 11055 ☆ A M B ☆
      • 3,112 Posts
      @shaun,
      I think you should escape double quote (’"’ => ’"’), or the SimpleSearchForm will start to harm.
        Rico
        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
        MODx is great, but knowing how to use it well makes it perfect!

        www.virtudraft.com

        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

        Maintainter/contributor of Babel

        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
        • 28215
        • 4,149 Posts
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 11055 ☆ A M B ☆
          • 3,112 Posts
            Rico
            Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
            MODx is great, but knowing how to use it well makes it perfect!

            www.virtudraft.com

            Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

            Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

            Maintainter/contributor of Babel

            Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
            • 7243
            • 21 Posts
            I am having problems with simple search, just upgraded to the latest( 1.2.0 ) via package management on the recent release of revo ( 2.0.8 ), both updated yesterday, when someone searches for a term, the landing page shows the results, but if you click on the pagination links to the 2nd or 3rd pages (if there are more results of course), the next page states: There were no search results. Please try using more general terms to get more results. as if I had just made a search and the return was false.
            How to fix, it’s the same across all my and my client’s sites that use modx revo. here’s the call:
            [[!SimpleSearchForm? &tpl=`search_ tpl` &currentPageTpl=`currentpage` &landing=`21` &showExtract=`1` &highlightResults`1` &highlightClass=`highlight`]]


            update, notice request for placing issues on github, so I did that as well, hope can sort this out soon, three of the sites I am concerned about uses search feature heavily.

            https://github.com/splittingred/SimpleSearch/issues#issue/32

            suggest others who have updated to also test their simple search results, I have grown accustomed to testing all extras/addons on every cms I use after updates, breakage is common.
              • 7243
              • 21 Posts
              no one else has experienced this? The behavior occurs on all my revo installs on localhost as well as all the revo live sites hosted on different hosting services. A hack or quick workaround would be greatly appreciated, many sites have search boxes which are rarely used, but as with these forums, the sites I am concerned about use the search feature as a critical part of their site.
                • 7243
                • 21 Posts
                just recieved a reply on github suggesting to replace in core/components/simplesearch/model/simplesearch/simplesearch.class.php

                $offset = ($_REQUEST[$offsetIndex]-1)*$perPage;


                with

                $offset = $_REQUEST[$offsetIndex];
                


                the problem though is that code already exists within that file.
                hate to be a nag, but seriously, I have tested and tested again on localhost and remote hosts and the behavior is still the same, please someone tell me I am not going insane and that I am not the only one experiencing this problem.

                  • 11055 ☆ A M B ☆
                  • 3,112 Posts
                  I have a wild guess.
                  The problem arises because SimpleSearch uses Full-Text search function to do the search.
                  On MySQL, this function have a limitation:

                  The 50% threshold has a significant implication when you first try full-text searching to see how it works: If you create a table and insert only one or two rows of text into it, every word in the text occurs in at least 50% of the rows. As a result, no search returns any results. Be sure to insert at least three rows, and preferably many more. Users who need to bypass the 50% limitation can use the boolean search mode; see Section 11.9.2, “Boolean Full-Text Searches”.
                  That said,
                  if your search is more than half of the whole data, it will return empty.

                  I also had this problem on my own search form, which then I overcame the situation by creating a fallback ’LIKE’ searching when the MATCH()... AGAINST() function returned zero.
                    Rico
                    Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                    MODx is great, but knowing how to use it well makes it perfect!

                    www.virtudraft.com

                    Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                    Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                    Maintainter/contributor of Babel

                    Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                    • 36582
                    • 463 Posts
                    Couldn’t install on 2.0.8-pl traditional

                    Mesaage:
                    Attempting to install package with signature: simplesearch-1.2.0-rc2
                    Package found...now preparing to install.
                    xPDOZip: Error opening archive at /homepages/##/#####/htdocs/modxrevo/core/packages/simplesearch-1.2.0-rc2.transport.zip
                    PHP warning: ZipArchive::extractTo() [ziparchive.extractto]: Invalid or unitialized Zip object
                    PHP warning: ZipArchive::close() [ziparchive.close]: Invalid or unitialized Zip object
                    Could not unpack package /homepages/##/#####/htdocs/modxrevo/core/packages/simplesearch-1.2.0-rc2.transport.zip to /homepages/##/#####/htdocs/modxrevo/core/packages/. SIG: simplesearch-1.2.0-rc2
                    Could not install package with signature: simplesearch-1.2.0-rc2
                      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                      • 20014
                      • 200 Posts
                      this was the main search solution for revo and all our sites are suffering this prob, even the main modx site suffers from this, checked just now.
                      I appreciate all that splitting red does by developing so many extras, but search functionality is one which shouldn’t take a week or two to fix. Matter of fact, I hope splitting red is ok, he usually is very quick to reply and patch things when needed.
                      @goldsky could you elaborate a bit? I design, I don’t have .001% the skills you coders have. :’(