Feature #2673

CQPEngine, try to avoid the "[]" query where it's possible

Added by Sebastien Jacquot over 3 years ago. Updated over 3 years ago.

Status:New Start date:11/27/2019
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Diagnostic and optimization Spent time: -
Target version:TXM X.X

Description

CQPEngine, try to avoid the "[]" query when it's possible.

At this moment, this query can be used to convert subcorpus "range" positions to real "matches" positions, eg. "[15, 24]" to "[15,15][16,16]...[24,24]".
CQP needs for some commands the real list of all matches instead of ranges.
This query can be especially heavy on some subcorpus.

  • search for "\"[]\"" in all source code
  • evaluate if it's really necessary to use the query
  • additionally: may create an abstract method in SearchEngine or Query named as getAllMAtchesQuery() returning eg. "\"[]\"" for CQPSearchEngine and something else for other engines, eg. TigerSearch. Or maybe better a SearchEngine preference.

Framapad MD NOTE: faire des union/inter de positions de mots à la place


Subtasks

Task #2674: Optimize CQPLexicon creationNew

History

#1 Updated by Sebastien Jacquot over 3 years ago

  • Description updated (diff)

#2 Updated by Sebastien Jacquot over 3 years ago

"[]" CQP queries locations:
  • UnitConcordanceToolbar.java
    • 173: buffer.append("[]");
  • ComputeDemocratMeasureMetadata.groovy
    • 18: data["number of words"] = corpus.query(new CQLQuery("[]"), "TMP", false).getNMatch();
  • Cooccurrence.java
    • 183: protected String pCooccurentQueryFilter = "[]"; //$NON-NLS-1$
  • Index.java
    • 902: this.pQuery = new CQLQuery("[]"); //$NON-NLS-1$
  • Lexicon.java
    • 64: // this.query = new Query("[]"); //$NON-NLS-1$
  • PartitionIndex.java
    • 952: this.pQuery = new CQLQuery("[]"); //$NON-NLS-1$
  • LexiconEditor.java
    • 21: this.queryWidget.setText("[]"); //$NON-NLS-1$
  • CorpusPage.java (2 matches)
    • 391: values.put("query", "[]"); //$NON-NLS-1$ //$NON-NLS-2$
    • 551: values.put("query", "[]"); //$NON-NLS-1$ //$NON-NLS-2$
  • CQPLexicon.java (2 matches)
    • 171: // cqi.cqpQuery(corpus.getQualifiedCqpId(), tmp, "[]"); //$NON-NLS-1$
    • 230: cqi.cqpQuery(corpus.getQualifiedCqpId(), tmp, "[]"); //$NON-NLS-1$
  • TSIndex.java
    • 45: this.setParameters(new CQLQuery("[]"), props, null, null, null, null);
  • TSCmd.java
    • 70: String query = "[]"; //$NON-NLS-1$
  • DrawTSSVG.java
    • 20: //String query = "[]";
  • TSIndexEditor.java (4 matches)
    • 290: final CQLQuery query; // if the query is empty then we put "[]" instead
    • 292: query = new CQLQuery("[]"); //$NON-NLS-1$
    • 434: else if (trimed.equals("[]")) //$NON-NLS-1$
    • 493: // on créé une Query, ici le pivot de la concordance est "[]"
  • Train.java
    • 162: index.setParameters(new CQLQuery("[]"), corpusProperties, null, null, null, null);
  • WordCloud.java (2 matches)
    • 108: // query = new Query("[]");
    • 117: // if (!query.toString().equals("[]")) {
  • ComputeWordCloud.java
    • 82: query = new CQLQuery("[]"); //$NON-NLS-1$

#3 Updated by Sebastien Jacquot over 3 years ago

  • Description updated (diff)

#4 Updated by Sebastien Jacquot over 3 years ago

  • Description updated (diff)

Also available in: Atom PDF