We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    Quote from: traveller at Feb 16, 2008, 07:00 AM

    All is OK. It is written 1.7 in the name ( http://modxcms.com/AjaxSearch-490.html ).
    But it is inside contains 1.7.0.2. I will look.
    I updated the resource listing to reflect the revision number. Thanks for pointing that out.

    On your other points traveller, I really think they’re quite interesting and could definitely benefit the end user. I agree 100%: average web surfers don’t know about the semantics behind search, they just want good results. Wouldn’t a lot of what you’re suggesting require preprocessing the content and TVs into a search index in order to be performant?
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 23562
      • 57 Posts
      Ok, here it is, a request grin

      As seen on this site http://www.freeagentcentral.com/, a text in a search box, after user clicks
      disappears ( duh ! grin ), but when clicked somewhere on the page ( not on some btn or url rolleyes grin ), text
      returns back.

      On this post http://modxcms.com/forums/index.php/topic,22883.0.html, dev_cw made this
      suggestion to add to the AjaxSearch snippet tpl...

      I can’t say how this site did it. But in general you can accomplish this by adding a onblur command to fill it in again after the onfocus command in the AjaxSearch form. You will need to edit the snippet’s tpl. Maybe ask for this to be added to future releases in the AjaxSearch sub forum.

      onblur="if(this.value=='')this.value='Search here...';"

      And roan suggested this...

      With regards to the search box in FreeAgent, this is achieved using a bit of Javascript. I can’t remember where I found the original script but this seems to do the trick too:

      http://www.yourhtmlsource.com/forms/clearingdefaulttext.html

      It’s a slightly more accessible method than the default AjaxSearch behaviour.

      I hope this function will make it into future versions of AjaxSearch...

      Thanks!
        • 30562
        • 99 Posts
        Quote from: rthrash at Feb 19, 2008, 07:05 AM

        Wouldn’t a lot of what you’re suggesting require preprocessing the content and TVs into a search index in order to be performant?
        No index is necessary.
        Once again:
        1. The standard basis for search ("partial search" which already takes place) is used.
        2. The preprocessor is necessary for the languages having riches of word forms. I.e. when take place a word prefix-radical-suffix-termination. Hardly such preprocessing is necessary for English language.
        3. Heuristic algorithm of a finding of a basis of a word (not the radical of a word!) does not demand any indexes basically. Perhaps, to be necessary to cut non-significant stop-words for further search.
        4. "Partial" search in bases of ALL TERMS is fulfilled.
        5. There is a highlighting of the words containing a basis.
        6. The result is highlighted by one colour.

        As a result the easy and fast retrieval mechanism is had.
        Such lightweight search engine, certainly has some noise (concerning small percent of errors). But in practice it quite justifies itself.
          • 30562
          • 99 Posts
          Addition to the previous message.

          I have a little thought, and following additions have come to a head to written earlier.

          It is possible to do search in an index only provided that this search will have essential advantage before present search. This advantage should appear in its raised "intellectuality" or relevance.

          I have described one of ways earlier to raise power of search. Speech in my message went about possibility of the specification of distance between searched terms.

          Schematically “the indexing searcher” (we will name it so) can be constructed as follows:
          1. The index structure should contain still some additional information. At least, it is necessary to hold in a database of offsets of bases of words concerning the document beginning in which these words are available. I do not represent details of implementation to myself while. Here it is necessary to think.
          2. At input of the new document (provided that the document displayed) this document is scanned about unique words.
          3. “The unique word” is not a word entirely, but only a word basis. I already spoke about it earlier. “The national language unit” should fulfil the named task. The national language unit should be prepared for each language. Its manufacture is not the task of MODx developers team. More competent approach is dictionary usage. This approach is resource-intensive (monster dictionary). Other approach about which I wrote earlier, is usage of heuristics.
          4. When the user sets the list of searched terms, to this list one very important parameter is added. This parameter defines the context size in the document in which the user expects to find required terms.
          5. On the basis of constructed before an index (item 1) it is possible to define those documents to which required terms enter (keep within) in the set size of a context (or distance between terms).
          6. At document displaying changeable parts of words are added to bases of words and then they are highlighted.

          Here the our searcher is ready. wink ...At idea level.

          Everything, that I have told, can be realised undoubtedly. A question is only in time availability and desire of developers.
          I cannot participate in development. ;(
            • 19943
            • 14 Posts
            Why does the W3C validator return this error:

            # Error Line 146, Column 32: document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag.

            <label for="ajaxSearch_input">

            ✉

            The mentioned element is not allowed to appear in the context in which you’ve placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you’ve forgotten to close a previous element.

            One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
              • 24495
              • 407 Posts
              Because of an AjaxSearch non-standard output. For a successful validation result you should hack the snippet code.

              Would be nice to have templating for input and output of this snippet like Wayfinder and Ditto.
                • 5811
                • 1,717 Posts
                @modbaby

                Have you enclosed your ajaxsearch output by for example a div tag ?
                Once you will have enclosed the search ouput with a div tag in your template or in the file templates/templates.inc.php it will be ok.
                Then if you use the ajax mode you will get an another message from the validity as this parameter is also not standard.

                @rasc
                Would be nice to have templating for input and output of this snippet like Wayfinder and Ditto.
                It’s planed
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Quote from: traveller at Feb 20, 2008, 12:11 PM

                  Everything, that I have told, can be realised undoubtedly. A question is only in time availability and desire of developers.
                  I cannot participate in development. ;(

                  Sounds quite similar to the Search Lucene project based on my understanding. What’s keeping you from participating in development?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 30562
                    • 99 Posts
                    Quote from: rthrash at Feb 21, 2008, 08:42 AM

                    What’s keeping you from participating in development?
                    I am employed by other work. Building of sites is not the main work for me. I support an intracorporate site simultaneously.
                    The site has been developed by me on PHP + MySQL. Development and site support all becomes more difficult. Therefore I have selected MODx as automation system. It is necessary to adapt system for own needs. But time has not enough on all... sad
                      • 30562
                      • 99 Posts
                      Quote from: rthrash at Feb 21, 2008, 08:42 AM

                      Sounds quite similar to the Search Lucene project based on my understanding.
                      I heard nothing about project Lucene. I have read about it just. It is a pity that the library Lucene is developed on Java.
                      I did not plunge deeply into details of the project. However it seemed to me that the approach for developers to construction of the search mechanism is competent.
                      This field of activity is very interesting to researches.

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