We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36624
    • 535 Posts
    Have you get any error messages during the indexation process ?
    no errors.
    @ the end of indexation.php is :
    nb docs = 48
    global elapsed time = 1.7338 s


    Did you change the list of documents to index inside the script ?
    yes of course smiley


    i have the feelings the indexation script doesn't parse the TV but i'm not sure as the file generated is not readable. [ed. note: emmanuel last edited this post 14 years, 8 months ago.]
      CTRL+SHIFT+U - Clear Cache
      CTRL+SHIFT+H - Hiding Heft Panel
      CTRL+SHIFT+N - Fast Create Resource
      CTRL+ALT+P - Preview Recource (in edit resorce window)
      CTRL+ALT+S - Save
      • 36604
      • 268 Posts
      Hi again,

      Sorry but any idea about the fact advs outputs its code twice : one time into my <head> (and correctly into the content area) ?

      Thank you
        • 36604
        • 268 Posts
        Hi again,
        And how to translate ?
        If I wanna add a new language I tried to add a FR folder into /www/core/components/advsearch/lexicon/
        with the 2 attached files I suggest for FR. (no time for the config one) and the paste did not kkep the utf8 accentued caracters..
        This does not works.

        May I suggest not to use an so overused id as #content into the default template for the help page (that leads to css conflict)

        DEFAULT.INC.PHP FR
        <?php
        /**
         * AdvSearch
         *
         * 
         * AdvSearch is free software; you can redistribute it and/or modify it
         * under the terms of the GNU General Public License as published by the Free
         * Software Foundation; either version 2 of the License, or (at your option) any
         * later version.
         *
         * AdvSearch is distributed in the hope that it will be useful, but WITHOUT ANY
         * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
         * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
         *
         * You should have received a copy of the GNU General Public License along with
         * AdvSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
         * Suite 330, Boston, MA 02111-1307 USA
         * translation Eric Lacomblez
         * @package advsearch
         */
        /**
         * Default Lexicon Topic
         *
         * @package advsearch
         * @subpackage lexicon
         */
        
        /* advsearch example strings -
         * These would be used for messages displayed by your component
         * (e.g. error messages, prompts, etc.).
         */
        $_lang['advsearch'] = 'AdvSearch';
        $_lang['advsearch.menu_desc'] = 'Rechercher des contenus dynamiques en filtrant les résultats.';
        
        $_lang['advsearch.no_results'] = 'Il n\'y a pas de résultats. Essayez d\'utiliser des termes plus génériques.';
        $_lang['advsearch.search'] = 'Chercher';
        $_lang['advsearch.results_text_found_plural'] = '[[+count]] résultats trouvés pour "[[+text]]"';
        $_lang['advsearch.results_text_found_singular'] = '[[+count]] résultat trouvé pour "[[+text]]"';
        $_lang['advsearch.results_found_plural'] = '[[+count]] résultats trouvés';
        $_lang['advsearch.results_found_singular'] = '[[+count]] résultat trouvé';
        $_lang['advsearch.result_pages'] = 'pages de résultats:';
        $_lang['advsearch.box_text'] = 'Rechercher...';
        $_lang['advsearch.help_title'] = 'Plus d\'info sur le poteur de recherche';
        $_lang['advsearch.invalid_query'] = 'Requête Incohérente ou invalide';
        $_lang['advsearch.maxwords'] = 'Nombre Maximum de mots: [[+maxwords]]';
        $_lang['advsearch.minchars'] = 'Rechercher avec "[[+minterm]]" est invalide. Nombre minimum de caractères pour un terme: [[+minchars]] ';


        HELP.INC.PHP
        <?php
        /**
         * AdvSearch
         *
         *
         * AdvSearch is free software; you can redistribute it and/or modify it
         * under the terms of the GNU General Public License as published by the Free
         * Software Foundation; either version 2 of the License, or (at your option) any
         * later version.
         *
         * AdvSearch is distributed in the hope that it will be useful, but WITHOUT ANY
         * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
         * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
         *
         * You should have received a copy of the GNU General Public License along with
         * AdvSearch; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
         * Suite 330, Boston, MA 02111-1307 USA
         *
         * @package advsearch
         */
        /**
         * Help Lexicon Topic
         *
         * @package advsearch
         * @subpackage lexicon
         */
        
        $_lang['advsearch.help'] = <<<EOD
        <div id="advs-content">
        <h1>
          Advanced Search - Syntaxe de recherche</h1>
        <div id="minitoc-area">
        <ul class="minitoc">
        <li>
        <a href="[[~[[*id]]]]#Intro">Introduction</a>
        </li>
        <li>
        <a href="[[~[[*id]]]]#Terms">Termes</a>
        </li>
        <li>
        <a href="[[~[[*id]]]]#Wildcard Searches">Caractères joker</a>
        </li>
        <li>
        <a href="[[~[[*id]]]]#Boolean operators">Operateurs logiques</a>
        <ul class="minitoc">
        <li>
        <a href="[[~[[*id]]]]#OR"> OR </a>
        </li>
        <li>
        <a href="[[~[[*id]]]]#AND"> AND </a>
        </li>
        <li>
        <a href="[[~[[*id]]]]#NOT"> NOT </a>
        </li>
        </ul>
        </li>
        <li>
        <a href="[[~[[*id]]]]#Grouping">Groupement</a>
        </li>
        </ul>
        </div>
        
        <a name="Intro"></a>
        <h2 class="boxed">Introduction</h2>
        
        <div class="section">
        <p>Voici quelques explications pour emplyer le moteur de recherche de manière efficace.</p>
        </div>
        
        <a name="N10032"></a><a name="Terms"></a>
        <h2 class="boxed">Termes</h2>
        <div class="section">
        <p>Une requête est constituée par des termes ou mots-clés et des opérateurs. Il y a 2 types de termes : Simples ou Phrases.</p>
        <p>Un mot simple est un mot unique tel que "test" ou "hello".</p>
        <p>Une phrase est un groupe de mots encadrés par des guillemets "hello dolly".</p>
        <p>Des combinaisons de termes multiples sont possibles grâce aux opérateurs logiques.</p>
        </div>
        
        <a name="N1006D"></a><a name="Wildcard Searches"></a>
        <h2 class="boxed">Caractères "jokers"</h2>
        <p>AdvSearch supporte des caractères jokers pour les recherches sur mots simples ou multiples (mais pas sur les "phrases")</p>
        <p>Remplacez <em><strong>un</strong></em> caractère quelconque par le point d'interrogation "?".</p>
        <p>Remplacez plusieurs caractères consécutifs par l'astérisque "*".</p>
        <p>Exemples:</p>
        <p>Rechercher tous termes s'écrivant "te", puis "n'importequoi", puis "t".</p>
        <pre class="code">te?t</pre>
        <p>Rechercher tous termes débutant par "test" et continuant par toutes suites possibles.</p>
        <pre class="code">test*</pre>
        <p>Ou bien avec un ou plusieurs caractères queconques en plein milieu.</p>
        <pre class="code">te*t</pre>
        <p>Note: Il n'est PAS possible de placer ces caractères jokers en DEBUT de terme.</p>
        
        <a name="N100FA"></a><a name="Boolean operators"></a>
        <h2 class="boxed"> Operateurs Logiques</h2>
        <div class="section">
        <p>Il s'agit d'opérateurs permettant de combiner des termes.
                AdvSearch supporte AND, OR, et NOT ( en MAJ</p>
        <p>).</p>
        <a name="N10103"></a><a name="OR"></a>
        <h3 class="boxed">OR</h3>
        <p> OR (ou) Les résultats comporteront des réponses pour chcun des termes demandés  liés par des OR. Remarque: les caractères "double-pipe"  || peuvent remplacer OR.</p>
        <p>"jakarta apache" jakarta</p>
        
        <p>or</p>
        <pre class="code">"jakarta apache" OR jakarta</pre>
        
        <a name="N10116"></a><a name="AND"></a>
        <h3 class="boxed">AND</h3>
        <p>AND (et) Il faut que les contenus remontés en résultats comportent les DEUX termes (ou plus) .  && peut remplacer AND.</p>
        <p>Ceci cherchera des contenu avec "jakarta apache" et "Apache Lucene" obligatoirement. </p>
        <pre class="code">"jakarta apache" AND "Apache Lucene"</pre>
        
        <a name="N10136"></a><a name="NOT"></a>
        <h3 class="boxed">NOT</h3>
        <p> NOT (négation) va exclure des résultats contenant tout sauf ce qui suit l'opérateur NOT. Le caractère "!" peut remplacer NOT.</p>
        <p>"jakarta apache" NOT "Apache Lucene"</p>
        
        <p>Note:  NOT ne peut être employé avec un seul terme. Par exemple, ceci ne peut pas fonctionner:</p>
        <pre class="code">NOT "jakarta apache"</pre>
        </div>
        
        <a name="N1015D"></a><a name="Grouping"></a>
        <h2 class="boxed">Groupement</h2>
        <div class="section">
        <p>Avec des parenthèses on peut regrouper plusieurs groupes logiques.</p>
        <p>Rechercher soit ("jakarta" OU "apache") ET "website" (résultats comportant toujours"website" combinés avec "jakarta" ou "apache"):</p>
        <pre class="code">(jakarta OR apache) AND website</pre>
        <p>This eliminates any confusion and makes sure you that website must exist and either term jakarta or apache may exist.</p>
        </div>
        
        </div>
        <!--+ end content +-->
        EOD;
        
          • 5811
          • 1,717 Posts
          @manu:

          i have the feelings the indexation script doesn't parse the TV but i'm not sure as the file generated is not readable.

          The code of the indexation script is:
                  // process content
                  // get unparsed content
                  $content = $document->get('content');
                  
                  if (!empty($content)) { 
                      // get the max iterations tags are processed before processing is terminated 
                      $maxIterations= (integer) $modx->getOption('parser_max_iterations', null, 10);
          
                      // parse all cacheable tags first 
                      $modx->getParser()->processElementTags('', $content, false, false, '[[', ']]', array(), $maxIterations);
          
                      // parse all non-cacheable and remove unprocessed tags 
                      $modx->getParser()->processElementTags('', $content, true, true, '[[', ']]', array(), $maxIterations);
                  }
                  
                  $this->addField(Zend_Search_Lucene_Field::UnStored('content', $content));


          So your TVs will be parsed only if they are included inside the content field.
          For the moment this indexation script is a rough script.

          Did you try with the default "mysql" engine ? [ed. note: coroico last edited this post 14 years, 8 months ago.]
            • 5811
            • 1,717 Posts
            @elz64

            Sorry but any idea about the fact advs outputs its code twice : one time into my <head> (and correctly into the content area) ?

            Could you post again your snippet calls ?
            Do you call advSearch inside the template and/or the document ?
              • 5811
              • 1,717 Posts
              @elz64:

              If I wanna add a new language I tried to add a FR folder into /www/core/components/advsearch/lexicon/
              with the 2 attached files I suggest for FR. (no time for the config one) and the paste did not kkep the utf8 accentued caracters.. This does not works.

              The French lexicon will be added with the 1.0.0 pl. (default, properties, help).

              Par contre peux tu m'envoyer par mail la traduction du fichier de Help en Français (sans les pbs utf8 ). Cela me fera gagner du temps.

              In the settings of the site do you have the culture_key set to "fr" ?
                • 36604
                • 268 Posts
                Hi,

                I did what you said:
                [[!AdvSearchForm?
                &landing=`41`
                &addJQuery=`0`]]

                It's part of the header section of the template. Using html5 boilerplate with modernizr (everything initialy made from the Flexibility template I installed in the blank site before doing my stuff over this basis.

                Here's an extract from my chunk coming AFTER the one making the <head>
                the [[$Recherche]] contains only the call for ADVS.

                [!If? 
                &subject=`[[*id]]` 
                &operator=`EQ`
                &operand=`1`
                
                &then=`
                <body id="acc" class="[[++cultureKey]]">`
                &else=`
                <body id="suite" class="[[++cultureKey]]">` 
                  
                ]]
                  
                  
                <div id="container" class="wrapper p[[*id]]">
                    
                
                <header id="header" class="container row">
                <h1 class="col3 logo">
                  <a href="[[++site_url]]" title="[[++site_name]]"><img src="assets/templates/templates/tpl1/images/logo.png" alt="logo Rotation 2" />
                	</a>
                </h1>
                
                 [[!getResources? &parents=`-1` &resources=`[[$settings_page_id]]` &includeTVs=`1` &tvPrefix=`` &processTVs=`1` &tpl=`teaser1`]]			  
                [[$Recherche]]
                 
                <nav id="menuh">
                [[$MenuH]]
                </nav>
                <div id="teaser2">
                	<h3>	  <strong>Rotation 2</strong> : le concepteur<br />
                		des gammes de menuiseries fines<br />
                		PEC.55 - AA.36 -  Finesse 44<br />
                	<span class="petit-txt beige ">Le choix des Architectes des Bâtiments de France</span></h3>
                
                
                </div>
                </header>
                	 
                
                	  
                <div class="main" id="page" role="main">....
                  • 36604
                  • 268 Posts
                  Quote from: coroico at Jan 23, 2012, 01:23 PM
                  @elz64:


                  The French lexicon will be added with the 1.0.0 pl. (default, properties, help).

                  Par contre peux tu m'envoyer par mail la traduction du fichier de Help en Français (sans les pbs utf8 ). Cela me fera gagner du temps.

                  In the settings of the site do you have the culture_key set to "fr" ?

                  fr : yes.
                  How can I MP those files to you ??
                    • 5811
                    • 1,717 Posts
                    May I suggest not to use an so overused id as #content into the default template for the help page.
                    You are right. The new div with 1.0.0 pl will be "advsea-help-content".

                    How can I MP those files to you ??
                    You can see my profile (and my email) behind my name (link).

                    I did what you said:

                    [[!AdvSearchForm?
                    &landing=`41`
                    &addJQuery=`0`]]

                    Ok for the advsearchForm snippet call.
                    But have you several AdvSearch snippet calls ? [ed. note: coroico last edited this post 14 years, 8 months ago.]
                      • 36604
                      • 268 Posts
                      no This is the only one. If I could reactivate the search form (it's desactivated for the moment you'll be able to see it by your own.
                      Can we get in touch tomorrow morning ? I suspect really something bad behind this since I upgraded from 2.15 to 2.2.
                      Formit does not work anymore neither...