We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • @coroico,
    I have found that exactly that AS only finds HTML in SRs when there are floating HTML elements with no close. Once they are tracked down it is corrected. The can be caused by comments though where sometimes the stipper gets caught on an open element. Don’t remember specific case but know that I had a problem on a site to be fixed by combing the code.
      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
      • 23287
      • 1 Posts
      Hi, Im new to Modx, and am having a bit of difficulty with the AjaxSearch plugin.

      I have a search page that includes an AjaxSearch form. I would like to also have a search box on every other page in left panel that when filled in posts the results on the search page.

      Please can you advise me.

      Thanks
      Paul
        • 23515
        • 40 Posts
        Hi Guys,

        I’ve got a Template variable field called search tags, where the user can enter any words that match the relevant product, delimited by comma. Works great apart from one sticking point.

        For example, if you type in "fish" it brings back any product that has "fish" in the TV, but it also brings back any product that has the string of those four characters, so we end up getting Laurence fishbourne in there too. My php isn’t awesome, but is there anyway I can tell the search to delimit the search tags TV by spaces, or a comma or whatever? Or should I use a different TV format (would a check box style TV still just match strings, rather than whole words?)
          • 27733
          • 99 Posts
          @phool: It sounds as if you’re wanting to use the search in non-ajax mode and, as such, here’s what you’d do at minimum:

          In your template, wherever you’d like the search form to be shown you’d use this call:
          [!AjaxSearch? &ajaxSearch=`0` &AS_showResults=`0` &AS_landing=`id#`!]

          Note: replace id# with your search results page id

          In your search results page, you’d put this call in your content area:
          [!AjaxSearch? &ajaxSearch=`0` &AS_showForm=`0`!]


          @pixillionsaul: coroico will be the authority on this but, I believe the only way would be to set the advanced search tag to "exactphrase"—that is, add this to your call on the results page: &advSearch=`exactphrase`
            ------
            Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.
          • I’m using the latest version of AS and I am using the highlight plugin as well.

            I have a page that is hidden from the menu and not searchable but it’s still showing up in the ajax search ever using &hidemenu=`0`

            What else am I missing from the snippet to not search hidden pages?

            Thanks
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
              • 477
              • 19 Posts
              Is this possible to use AjaxSearch with set Suffix for friendly URLs? When I set my suffix for .html AjaxSearch doesn’t work (I see only 404 error).

              http://www.pcpedia.pl/ - AjaxSearch on right sidebar

              What part of code should I change?

              Thanks
                • 23515
                • 40 Posts
                Thanks for your reply, but &advSearch=`exactphrase` doesn’t seem to work, it still returns fishbourne if I enter fish. I think I read that TV’s aren’t split into separate words, (can’t find or remember where I read it though), and are just dealt with as one long string, so is there another field I could use that would separate, or, like I mentioned before, how would I go about telling it to delimit my TV field by a comma. Cheers.
                  • 5811
                  • 1,717 Posts
                  @pixillionsaul

                  - exactphrase : provides the documents which contain the exact phrase

                  "Phrase" means at least two words. With one search word "exactphrase" = "oneword" = "allwords"

                  Ajaxsearch use the MySQL mechanism : LIKE so when you search "fish", it could be find "fishbourne". More technical information here
                  If you would like a exactword mechanism, look at this post for a similar request and possible (but not supported) implementation.
                    • 5811
                    • 1,717 Posts
                    @adik
                    Is this possible to use AjaxSearch with set Suffix for friendly URLs? When I set my suffix for .html AjaxSearch doesn’t work (I see only 404 error).
                    As I have never used suffix for fiendly URL, I can’t help you and I haven’t enought time to investigate. Are your friendly url run without AS ?

                    UTF-8 doesn’t work.
                    look at http://logrus.sytes.net/~kozy/ for an interesting use of AS with polish-utf8 Mysql charset
                      • 477
                      • 19 Posts
                      Quote from: coroico at May 06, 2008, 11:59 AM

                      @adik
                      As I have never used suffix for fiendly URL, I can’t help you and I haven’t enought time to investigate. Are your friendly url run without AS ?

                      Yes, without suffix ".html" everything works fine. I don’t know why AjaxSearch doesn’t work with suffix. sad

                      look at http://logrus.sytes.net/~kozy/ for an interesting use of AS with polish-utf8 Mysql charset

                      Thanks.

                      This discussion is closed to further replies. Keep calm and carry on.