example_demo1.html 2.19 KB
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Multi Tier Annotation Search</title>
    <script type="text/javascript" src="./js/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="./js/solr.js"></script>
    <link rel="stylesheet" type="text/css" href="css/style.css">
  </head>
  <body>
  
    <script>
    $(document).ready(function() {
        $("#createIndex").click(function(){
        	var oThis = this;
          update("/solr/demo1/update?wt=json&commitWithin=1000", $("pre#createIndexPost").text(), $("div#createIndexOutput"), $("div#createIndexError"), $("#createIndex"));
        });
        $("#deleteIndex").click(function(){
        	var oThis = this;
          update("/solr/demo1/update?wt=json&commitWithin=1000", $("pre#deleteIndexPost").text(), $("div#deleteIndexOutput"), $("div#deleteIndexError"), $("#deleteIndex"));
        });
    });
    
    </script>
  
    <h1>Multi Tier Annotation Search - example demo1</h1>
    
    <h3>Create index</h3>
    Post to /solr/demo1/update
    <div class="post"><pre id="createIndexPost">[{ "id": "1","author":"Nicolaas Beets","title":"Een onaangenaam mens in de Haarlemmerhout","text":"folia-samples/beets1.xml" },
{ "id": "2","author":"Nicolaas Beets","title":"Een oude kennis","text":"folia-samples/beets2.xml" },
{ "id": "3","author":"Nicolaas Beets","title":"Varen en Rijden","text":"folia-samples/beets3.xml" }]</pre></div>
    <input class="button" type="button" id="createIndex" value="create index" />
    <div id="createIndexOutput" class="output"></div>
    <div id="createIndexError" class="error"></div>
    
    <h3>Empty index</h3>
    Post to /solr/demo1/update
    <div class="post"><pre id="deleteIndexPost">{
  "delete": {
    "query": "*:*"
  }
}</pre></div>
    <input class="button" type="button" id="deleteIndex" value="delete index" />
    <div id="deleteIndexOutput" class="output"></div>
    <div id="deleteIndexError" class="error"></div>
    
    
    <h3>Basic stats</h3>
    
    
    <p>
      Go to <a href="index.html">main page</a>.
    </p>
  </body>
</html>