Elasticsearch Issue
<p>There Can you help me in resolving an issue of elastic search </p>

<pre><code>"script" : "  var score = 0;  
 for(var i = 0; i &lt; _source[fieldNameTag].length; i++)
 { 
if( fieldValuesTag.indexOf(_source[fieldNameTag][i]) &gt; -1 ) { 
score += 1;
 } 
} 
var movieName1 = _source[fieldNameMovie]; 
var movieName =movieName1.replace(/[^a-zA-Z]/g,''); 
for (var i = 0, len = movieName.length, div = 1; i &lt; len; i++) { 
 var ascVal = movieName.charCodeAt(i);
 score += (1 - (ascVal / 100)) / div;
 div = div * 100;
 }
 score;",
</code></pre>