gestione ricerca sottostringhe

This commit is contained in:
cesare 2022-09-30 10:25:52 +02:00
parent dfea18a1c8
commit 8b1392bea1
1 changed files with 5 additions and 1 deletions

View File

@ -104,7 +104,11 @@ function buildSQ() {
const lf = document.getElementById("lemma_forma");
const ftxt = document.getElementById("queryText");
if (ftxt.value != "") {
parsedquery.where[1].expression.args[1].value = "^" + ftxt.value + "$";
strval=ftxt.value.trim().slice(0, -1)
if (ftxt.value.trim().slice(-1) !=='*')
strval="^" +ftxt.value.trim()+ "$";
parsedquery.where[1].expression.args[1].value = strval;
if (lf.value == 'lemma')
parsedquery.where[1].expression.args[0].value = "lm";
}