Changeset 82460 in spip-zone


Ignore:
Timestamp:
May 16, 2014, 4:12:51 PM (5 years ago)
Author:
fil@…
Message:

facettes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/indexer/trunk/prive/squelettes/contenu/sphinx.html

    r82445 r82460  
    6868[(#SET{sql,"SELECT WEIGHT() AS score, *, SNIPPET(content,"[(#ENV*{recherche}|concat{' '}|concat{#ENV{tag}}|_q|concat{","})]'limit=200') as snippet [, (#GET{tag})] FROM [(#ENV{source,spip})] WHERE MATCH([(#ENV*{recherche}|_q)])[ (#GET{tag}|?{AND tag=1})][ ORDER BY (#GET{order})] LIMIT 10})]
    6969
    70 [(#SET{sql2,[(#GET{sql}|concat{"  FACET properties.tags ORDER BY COUNT(*) DESC"})]})]
     70[(#SET{sql,[(#GET{sql}|concat{"  FACET properties.tags ORDER BY COUNT(*) DESC"})]})]
    7171
    72 <pre>[(#GET{sql2}|htmlspecialchars)]</pre>
     72<pre>[(#GET{sql}|htmlspecialchars)]</pre>
    7373
    7474
    7575<BOUCLE_recherche(DATA) {source SphinxQL, #GET{sql}} {si #ENV{recherche}}>
    76 
    77 <h2>clé: #CLE</h2>
    78 
    7976
    8077        <B_documents>
     
    8380        <BOUCLE_documents(DATA){source tableau, #VALEUR}{si #CLE|=={docs}}>
    8481                [<dt>#SCORE <a href="[(#URI)]">(#TITLE)</a>
    85                  [<small>(#DATE|affdate_court)</small>]
     82                [@(#VALEUR*{properties}|json_decode{1}|table_valeur{login}|print)
     83                ][<small>(#DATE|affdate_court)</small>]
     84                 
    8685                </dt>
    8786                 [<dd>(#SNIPPET|sinon{#SUMMARY})</dd>]
     
    102101        </B_meta>
    103102
    104 
     103    <B_facettes>
     104        <h2>Facettes associées</h2>
     105        <dl>
     106    <BOUCLE_facettes(DATA){source tableau, #VALEUR}{si #CLE|=={facets}}>
     107            [<dt>(#CLE)</dt>]
     108            [<dt><pre>(#VALEUR*|print_r{1})</pre></dt>]
     109    </BOUCLE_facettes>
     110        </dl>
     111    </B_facettes>
    105112
    106113</BOUCLE_recherche>
     
    151158
    152159]
    153 [(#SET{sqlf,"SELECT COUNT(*) AS c, "GROUPBY() AS facette FROM [(#ENV{source,spip})] WHERE MATCH([(#ENV*{recherche}|_q)]) GROUP BY properties.authors ORDER BY c DESC LIMIT 30})]
     160[(#SET{xxxsqlf,"SELECT COUNT(*) AS c, "GROUPBY() AS facette FROM [(#ENV{source,spip})] WHERE MATCH([(#ENV*{recherche}|_q)]) GROUP BY properties.authors ORDER BY c DESC LIMIT 30})]
    154161
    155162
     
    157164
    158165
    159 <BOUCLE_facettes(DATA) {source SphinxQL, #GET{sqlf}} {si #ENV{recherche}}>
     166<BOUCLE_facets(DATA) {source SphinxQL, #GET{sqlf}} {si #ENV{recherche}}>
    160167
    161168        <B_facette>
     
    179186
    180187
    181 </BOUCLE_facettes>
     188</BOUCLE_facets>
    182189
    183190</aside>
Note: See TracChangeset for help on using the changeset viewer.