Fixes a bug in mix.js that prevents indexes from being deleted from mixes, a=chris

Chris Pollett [2015-01-25 06:Jan:th]
Fixes a bug in mix.js that prevents indexes from being deleted from mixes, a=chris
Filename
bin/arc_tool.php
scripts/mix.js
diff --git a/bin/arc_tool.php b/bin/arc_tool.php
index bde6cfa33..0b91a9470 100755
--- a/bin/arc_tool.php
+++ b/bin/arc_tool.php
@@ -1030,7 +1030,7 @@ php arc_tool.php count bundle_name save
     /* returns the counts of docs and links for each shard in bundle
        as well as an overall total. The second command saves the just
        computed count into the index description (can be used to
-       fix the index count if it get screwed up).
+       fix the index count if it gets screwed up).
      */

 php arc_tool.php dict bundle_name word
@@ -1040,7 +1040,9 @@ php arc_tool.php info bundle_name
     // return info about documents stored in archive.

 php arc_tool.php inject timestamp file
-    // injects the urls in file as a schedule into crawl of given timestamp
+    /* injects the urls in file as a schedule into crawl of given timestamp
+        This can be used to make a closed index unclosed and to allow for
+        continued crawling. */

 php arc_tool.php list
     /* returns a list of all the archives in the Yioop! crawl directory,
diff --git a/scripts/mix.js b/scripts/mix.js
index c44afccea..2d3e560ed 100644
--- a/scripts/mix.js
+++ b/scripts/mix.js
@@ -168,8 +168,8 @@ function addCrawlHandler(i)
  */
 function addCrawl(i, ts, name, weight, keywords)
 {
-    var grp = fragments[i]['components'];
-    var j = grp.length;
+    var frg = fragments[i]['components'];
+    var j = frg.length;
     fragments[i]['components'][j] = [ts, name, weight, keywords];
     drawCrawl(i, j, ts, name, weight, keywords)
 }
@@ -222,13 +222,12 @@ function updateKeywords(i, j, keywords)
  */
 function removeCrawl(i, j)
 {
-
     var frg = fragments[i]['components'];
     var len = frg.length;
     for( k = j + 1; k < len; k++) {
         frg[k-1] = frg[k];
     }
-    delete grp[len - 1];
+    delete frg[len - 1];

     redrawFragments();
 }
ViewGit