Full text queries ok :)

Monday, 2 December 2013 · 1 message
IM
Ingarao Maud2 Dec 2013 11:24 #
Hello everybody Thanks to your help Christian, our full text queries yet work fine. I still don't understand exactly what the problem was and why we got 500 internal errors. Maybe a too heavy query and thus a memory problem ? Anyway now with this kind of writing, the queries are completed :
declare function desanti:display-tags($collection, $dataType, $mode){
 let $label := if($dataType = "subject") then "concepts" else
"personnes"
 return <div class="{ $mode }">
 <h6>{ $label }</h6>
 <span>{
 for $term in $collection
 group by $term
 order by $term collation "?lang=fr"
 let $occurrences := count(
 ft:search('Desanti', $term)/..[local-name() = $dataType][
 parent::*:controlaccess/
 parent::*:c/
 ancestor::*:dsc/
 parent::*:archdesc/
 parent::*:ead/
 parent::document-node()
 ]
 )
 return if($mode = "cloud") then (
 <span><a style="font-size:{
 $occurrences idiv 10 + 1
 }em;padding:{
 $occurrences idiv 10
 }px;" title="{
 $occurrences
 }" href="/restxq/desanti/{$label}/{$term}">{$term}</a></span>
 ) else (
 <span class="{
 $occurrences
 }"><a href="/restxq/desanti/{$label}/{$term}">{ $term }</a>
 ({ $occurrences })
 </span>
 )
 }</span>
 </div>
};
Thanks a lot !!! Maud
-- _« Ne travaillez jamais »_ MAUD INGARAO IHPC (UMR 5037) Institut d'histoire de la pensée classique, de l'Humanisme aux Lumières Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 +33 4 37 37 65 79 - maud.ingarao at ens-lyon.fr _Je suis absente le vendredi | Out of office on Fridays_ http://pensee-classique.ens-lyon.fr [1] http://institutdesanti.ens-lyon.fr [2] http://ahn.ens-lyon.fr [3] http://www.mutec-shs.fr [4] http://www.projet-plume.org [5] http://www.cahier.paris-sorbonne.fr/ [6] Links: ------ [1] http://pensee-classique.ens-lyon.fr [2] http://institutdesanti.ens-lyon.fr [3] http://ahn.ens-lyon.fr [4] http://www.mutec-shs.fr [5] http://www.projet-plume.org [6] http://www.cahier.paris-sorbonne.fr/

⚡Generated with XQuery