sdx-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sdx-developers] searchTransformer...


From: Nicolas Maisonneuve
Subject: [sdx-developers] searchTransformer...
Date: Fri, 3 Oct 2003 17:38:17 +0200

dans le thread session cache , j'ai vu que ca parlait d'historique..
ca tombe bien .. j'ai implémenté aussi un historique dans le searchTransformer (toujours plus performant.. hoo hooo )
 
dans le noeud display
on peut demander d'afficher l'historique (dans le cas d'un raffinement d'une requete)
ce qui permet de revenir en arriere à n'importe quel moment..  . Ceci en ajouter le tag <history/>
(hmm peut être un attribut history="true" dans le noeud display serait plus approprié..enfin bon)
 
<display language="fr">
    <results ... bla />
    <category id="matiere">
    <history/>
</display>
 
et en sortie
( ici , il y'a eu une premiere  requete  fulltext  (history id=1), puis un raffinement par categorie (history id=2))
 
  <?xml version="1.0" encoding="UTF-8" ?>
- <search:results query-id="2" searchtime="0" date="1065193951681" start-index="0" highlight="false" page-length="10" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:search="http://www.apache.org/cocoon/search/1.0" xmlns:util="http://www.apache.org/1999/XSP/Util">
- <search:sort sort-field="" sort-order="false">
  <search:sortfield name="matiere" />
  <search:sortfield name="ligne" />
  <search:sortfield name="personnage" />
  </search:sort>
- <search:histories>
- <search:history id="1">
- <search:fulltextquery query="how" xmlns:search="http://www.apache.org/cocoon/search/1.0">
  <search:field boost="2" id="line" />
  <search:field id="speaker" />
  </search:fulltextquery>
  </search:history>
- <search:history id="2">
  <search:categoryquery id="matiers" keyword="topologie" xmlns:search="http://www.apache.org/cocoon/search/1.0" />
  </search:history>
  </search:histories>
- <search:categories>
- <search:category name="matiers">
- <search:keyword name="cours" label="cours" nbdoc="1">
- <search:keyword name="mathematique" label="mathematique" nbdoc="1">
  <search:keyword name="geometrie" label="geometrie" nbdoc="0" />
- <search:keyword name="algebre" label="algebre" nbdoc="0">
  <search:keyword name="espace" label="espace" nbdoc="0" />
  </search:keyword>
  <search:keyword name="topologie" label="topologie" nbdoc="1" />
  </search:keyword>
  <search:keyword name="litterature" label="litterature" nbdoc="0" />
- <search:keyword name="langue" label="langue" nbdoc="0">
  <search:keyword name="espagnol" label="espagnol" nbdoc="0" />
  <search:keyword name="anglais" label="anglais" nbdoc="0" />
  </search:keyword>
  </search:keyword>
  </search:category>
  </search:categories>
- <search:hits total-count="1" count-of-pages="1">
- <search:hit rank="0" score="0.4044915" uri="7" moddate="08/01/2003">
  <search:field name="matiere">topologie</search:field>
  <search:field name="personnage">LAFEU</search:field>
  <search:field name="ligne">How called you the man you speak of, madam?</search:field>
  </search:hit>
  </search:hits>
- <search:navigation total-count="1" count-of-pages="1" has-next="false" has-previous="false" next-index="1" previous-index="0">
  <search:navigation-page start-index="0" />
  </search:navigation>
  </search:results>
 
voilà...
a noter  :
- Comment gere SDX pour le cas une personne fait une rechercher et 1h apres revient pour raffiner sa recherche.. la session sera finie. le systeme est il capable de voir le pb et de  donnée le bon résultat..
je me pose des questions sur le fait de prendre la session pour object persistant
(bon.. dans mon cas c'est juste une classe implementant  une interface HistoryManager..)
 
- je ne croie pas trop en l'utilité de stocker tous les résultats mais seulement si il fait du raffinement ..
ainsi: je stocke .. et la prochaine requete si celle ci  n'est pas une sous requete, j'efface l'historique sinon je stocke  a nouveau..
 
IMHO, l'historique n'est vraiment util que pour faire des sous requetes et pouvoir revenir en arriere si besoin.
dans mon cas une nouvelle requete a donc toujours id=1
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]