Task #2678

Improve partition creation process duration (improve query for part creation)

Ajouté par Sebastien Jacquot il y a presque 6 ans. Mis à jour il y a plus de 4 ans.

Statut:New Début:29/03/2016
Priorité:Normal Echéance:
Assigné à:- % réalisé:

0%

Catégorie:Diagnostic and optimization Temps passé: -
Version cible:TXM 0.8.4

Description

Queries of type: [_.sp_n="97"] expand to sp
are very heavy.

There are some optimization in /org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/SubcorpusCQLQuery.java to avoid them when the part is of "text" level:

if ("text".equals(structure.getName())) { // optimisation only for the text structure
            queryString = "<"+property.getFullName()+"=\""+CQLQuery.addBackSlash(value)+"\">[] expand to "+structure.getName();
        } else {
            queryString = "[_."+property.getFullName()+"=\""+CQLQuery.addBackSlash(value)+"\"] expand to "+structure.getName();
        }

to generate a query of type: <text_booktitle="Waterloo">[] expand to text
Is there a way to extend this optimization?
eg. [_.sp_n="97"] expand to sp
is equivalent to:
<sp_n="97">[] expand to sp

NOTE: after discussion with MD, the 2 queries are not always equivalent. The optimized query "<sp_n="97">[] expand to sp" may not work on a subcorpus. But in the context of Part creation they may always be equivalent?

Solution 1

  • manage all structures levels
  • be able to know if the structure is sometimes out of the current corpus, if not use the <structure> query

Solution 2

  1. execute the query: <sp_n="97">[] expand to sp
  2. if no matches are found then execute the query: [_.sp_n="97"] expand to sp

Historique

#1 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#2 Mis à jour par Sebastien Jacquot il y a presque 6 ans

  • Description mis à jour (diff)

#3 Mis à jour par Serge Heiden il y a presque 6 ans

  • Sujet changé de Improve partition creation duration process (improve query of part creation) à Improve partition creation process duration (improve query for part creation)
  • Description mis à jour (diff)

#4 Mis à jour par Serge Heiden il y a plus de 5 ans

  • Description mis à jour (diff)

#5 Mis à jour par Matthieu Decorde il y a plus de 4 ans

  • Version cible changé de TXM 0.8.2 à TXM 0.8.4

Formats disponibles : Atom PDF