Commit df619e2f authored by Iker Hurtado's avatar Iker Hurtado
Browse files

Complex search logic implementation (11)

parent baf1a7c1
......@@ -7976,6 +7976,18 @@
if (searchByElement){ // There are some element in the search expression
/** TDO**/
pFormula = this._processFormula(formula, 'element-string');
let tempQueryObj = { 'bool' : { 'must' : [] } };
tempQueryObj.bool.must.push(
this._getESOperatorMatch('formula_cell_terms', pFormula[0]));
tempQueryObj.bool.must.push(
this._getESSimpleMatch('atom_labels_keyword', pFormula[1]));
queryObj.push(tempQueryObj);
//queryObj.push(this._getESSimpleMatch('atom_labels_keyword', pFormula));
}else{ // Only formulas
if ( this.element.querySelector('#multiples-of-formula').checked ){ // reduced search
......
......@@ -369,6 +369,18 @@ class NewSearchMod {
if (searchByElement){ // There are some element in the search expression
/** TDO**/
pFormula = this._processFormula(formula, 'element-string');
let tempQueryObj = { 'bool' : { 'must' : [] } };
tempQueryObj.bool.must.push(
this._getESOperatorMatch('formula_cell_terms', pFormula[0]));
tempQueryObj.bool.must.push(
this._getESSimpleMatch('atom_labels_keyword', pFormula[1]));
queryObj.push(tempQueryObj);
//queryObj.push(this._getESSimpleMatch('atom_labels_keyword', pFormula));
}else{ // Only formulas
if ( this.element.querySelector('#multiples-of-formula').checked ){ // reduced search
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment