example_demo2.html 3.33 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>
  
    <h1>Multi Tier Annotation Search - example demo2</h1>
       
    <div>
      Go to <a href="index.html">main page</a>.
    </div>         
    
    <hr noshade /> 
    
    <h3>Create index</h3>
    Post to /solr/demo2/update
    <div class="solr" data-type="json" data-url="/solr/demo2/update?wt=json&commitWithin=1000">
      <div class="post"><textarea data-autoresize>[{ "id": "1","type": "folia","author":"Nicolaas Beets","title":"Een onaangenaam mens in de Haarlemmerhout","text":"folia-samples/beets1.xml" },
{ "id": "2","type": "folia","author":"Nicolaas Beets","title":"Een oude kennis","text":"folia-samples/beets2.xml" },
{ "id": "3","type": "folia","author":"Nicolaas Beets","title":"Varen en Rijden","text":"folia-samples/beets3.xml" },
{ "id": "4","type": "folia","author":"Unknown","title":"Test of non existent text","text":"folia-samples/unknown.xml" },
{ "id": "5","type": "testtype","author":"Unknown","title":"Test of non existent type","text":"folia-samples/beets3.xml" }]</textarea></div>
      <input class="button post" type="button" value="create index" />
      <input class="button reset" type="button" value="reset" />
      <div class="output"></div>
      <div class="error"></div>
    </div>
    
    <hr noshade /> 
    
    <h3>Empty index</h3>
    Post to /solr/demo2/update
    <div class="solr" data-type="json" data-url="/solr/demo2/update?wt=json&commitWithin=1000">
      <div class="post"><textarea data-autoresize>{
  "delete": {
    "query": "*:*"
  }
}</textarea></div>
      <input class="button post" type="button" value="delete index" />
      <input class="button reset" type="button" value="reset" />
      <div class="output"></div>
      <div class="error"></div>
    </div>
    
    <hr noshade /> 
    
    <h3>Query</h3>
    
    <div>
      Search for everything sorted by number of positions in descending order; post to /solr/demo2/select
      <div class="solr" data-type="post" data-url="/solr/demo2/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=*:*&sort=numberOfPositions DESC</textarea></div>
        <input class="button post" type="button" value="post" />
        <input class="button reset" type="button" value="reset" />
        <div class="output"></div>
        <div class="error"></div>
      </div>
    </div>
    
    <br />
    
    <div>
      Search for everything with error; post to /solr/demo2/select
      <div class="solr" data-type="post" data-url="/solr/demo2/select?indent=true&wt=json">
        <div class="post"><textarea data-autoresize>q=error:*</textarea></div>
        <input class="button post" type="button" value="post" />
        <input class="button reset" type="button" value="reset" />
        <div class="output"></div>
        <div class="error"></div>
      </div>
    </div>
    
    <hr noshade />
    
    <div>
      Go to <a href="index.html">main page</a>.
    </div>
    
  </body>
</html>