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: Tue, 30 Sep 2003 21:44:14 +0200

bonjour,

je suis en train de finalizer le searchTransformer..
donc pour le xml d'entrée, je suis parti du principe :

il a des requetes unitaires (= non generable par combinaison d'autres
requetes unitaires)
j'en est mis 3 pour l'instant :

1-
<search:lucenequery  defaultfield="xxx" query="coucou les type:amis"
boost="3"  defaultop="or"/>
=  (xxx:coucou xxx:les type:amis)^3

2-
<search:fulltextquery query="coucou les" defaultop="and">
</search:field id="xxx" boost="2">
</search:field id="yyy" boost="3">
</search:fulltextquery>
= (xxx:coucou^2 yyy:coucou^3) +(xxx:les^2 yyy:les^3)

3-
<search:facetquery id="mycategorie" keyword="motcle">
va voir dans une ontologie (source : fichier.owl) et fait une expansion du
mot clé
meme style que votre expandQuery  .. bon ce type de requete est en phase de
dev.. y'aura surement des attributs
telque la profondeur, ect....
le but de ce type de query .. c'est d'intégrer la classification à la
methode de recherche
En fait .. je veux un outil qui gere la recherche par champs (fulltext ou
multicritere) et aussi la classification.
ainsi je veux pouvoir rafiner  les résultats par une recherche par champs
apres avoir naviguer dans les categories..
et je veux pouvoir rafinier  les résultats par une navigation , après avoir
fait une recherche fulltext..
bon j'ai commencé ce week-end.. ca marche .. mais c'est pas encore super
ergonomique..

avec ces requetes unitaire , on faire faire des combinaisons du style :

- <search:query>
- <search:group op="and">
- <search:group op="and">
  <search:facetquery id="matiers" keyword="topologie" />
  <search:facetquery id="matiers" keyword="anglais" />
  </search:group>
- <search:fulltextquery query="">
  <search:field id="line" boost="2" />
  <search:field id="speaker" />
  </search:fulltextquery>
  </search:group>
  </search:query>

voilà un peu la syntaxe d'entrée pour la syntaxe des queries..

SYNTAX complete d'entree:

<search:search xmlns:search="http://www.apache.org/cocoon/search/1.0";>

 <search:display langage="fr" hl="false" start-index="0" page-lenght="15"
sort-field="" sort-order="">
    <search:facet id="matiers"/>   <-- ca c'est pour montrer le nombre de
document parmi le result  par mot clé dans une catégorie  donnée: (en phase
de dev)
 </search:display>

 <search:indexes>
  <search:index id="essai2"/>
 </search:indexes>

 <search:query>
...
 </search:query>

</search:search>

en sortie par exemple
<search:results date="1064921293749" start-index="0" highlight="false"
searchtime="0" page-length="10">
<search:sort sort-field="null" sort-order="false">
<search:sortfield name="matier"/> <-- possibilité de trier par ce champs
<search:sortfield name="ligne"/>
<search:sortfield name="personnage"/>
</search:sort>
<search:categories>
<search:category name="matiers">
<search:keyword name="cours" label="cours" nbdoc="1"/>
<search:keyword name="mathematique" label="mathematique" nbdoc="0"/>
<search:keyword name="litterature" label="litterature" nbdoc="0"/>
<search:keyword name="geometrie" label="geometrie" nbdoc="1"/>
<search:keyword name="algebre" label="algebre" nbdoc="1"/>
<search:keyword name="espace" label="espace" nbdoc="0"/>
<search:keyword name="topologie" label="topologie" 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="2"/>
</search:category>
</search:categories>
<search:hits total-count="5" count-of-pages="1">
<search:hit rank="0" score="0.22775947" uri="5" moddate="25/29/2003">
<search:field name="ligne">He hath abandoned his physicians, madam; under
whosepractises he hath persecuted time with hope, andfinds no other
advantage in the process but only thelosing of hope by time.</search:field>
<search:field name="personnage">LAFEU</search:field>
<search:field name="matier">anglais</search:field>
</search:hit>
<search:hit rank="1" score="0.21473369" uri="8" moddate="25/29/2003">
<search:field name="matier">geometrie</search:field>
<search:field name="personnage">COUNTESS</search:field>
<search:field name="ligne">He was famous, sir, in his profession, and it
washis great right to be so: Gerard de Narbon.</search:field>
</search:hit>
<search:hit rank="2" score="0.16105026" uri="9" moddate="25/29/2003">
<search:field name="ligne">He was excellent indeed, madam: the king
verylately spoke of him admiringly and mourningly: hewas skilful enough to
have lived still, if knowledgecould be set up against
mortality.</search:field>
<search:field name="personnage">LAFEU</search:field>
<search:field name="matier">algebre</search:field>
</search:hit>
<search:hit rank="3" score="0.13420856" uri="3" moddate="25/29/2003">
<search:field name="ligne">You shall find of the king a husband, madam;
you,sir, a father: he that so generally is at all timesgood must of
necessity hold his virtue to you; whoseworthiness would stir it up where it
wanted ratherthan lack it where there is such abundance.</search:field>
<search:field name="personnage">LAFEU</search:field>
<search:field name="matier">anglais</search:field>
</search:hit>
<search:hit rank="4" score="0.107366845" uri="6" moddate="25/29/2003">
<search:field name="matier">cours</search:field>
<search:field name="personnage">COUNTESS</search:field>
<search:field name="ligne">This young gentlewoman had a father,--O,
that'had'! how sad a passage 'tis!--whose skill wasalmost as great as his
honesty; had it stretched sofar, would have made nature immortal, and
deathshould have play for lack of work. Would, for theking's sake, he were
living! I think it would bethe death of the king's disease.</search:field>
</search:hit>
</search:hits>
<search:navigation total-count="5" count-of-pages="1" has-next="false"
has-previous="false" next-index="5" previous-index="0">
<search:navigation-page start-index="0"/>
</search:navigation>
</search:results>


voilà un peu mon travail..
si vous avez des remarques , elles sont les bienvenues..
il y' aura surement de l'optimisation a faire ... car je ne sais pas si
j'aurais le temps de bien finir ce projet
si ca vous interesse.. je peux vous passez les codes..







reply via email to

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