|
1 | 1 | <div class="row-fluid"> |
2 | | - <div class="span2"><p class="text-info">Available indexes:</p></div> |
| 2 | + <div class="span12"> |
| 3 | + <div class="alert"> |
| 4 | + <p>This page is about providing a very basic search and check the query that is created. This way you |
| 5 | + can learn about creating queries and the result of those query against the data in your ElasticSearch |
| 6 | + instance.</p> |
| 7 | + </div> |
| 8 | + </div> |
| 9 | +</div> |
| 10 | + |
| 11 | +<div class="row-fluid"> |
| 12 | + <div class="span2"><span class="text-info">Available indexes:</span> |
| 13 | + <button popover-placement="right" |
| 14 | + popover="Here you can select the index that we query over. If you select nothing, we query over all data" |
| 15 | + class="btn btn-mini btn-link"><i class="icon-question-sign"></i></button> |
| 16 | + </div> |
3 | 17 | <div class="span10"> |
4 | 18 | <div id="chooseIndexBtn" class="btn-group" data-toggle="buttons-checkbox"> |
5 | 19 | <div class="btn btn-mini" ng-click="chooseIndex(key)" ng-repeat="(key,value) in indices">{{key}}</div> |
|
8 | 22 | </div> |
9 | 23 |
|
10 | 24 | <div class="row-fluid"> |
11 | | - <div class="span2"><p class="text-info">Available types:</p></div> |
| 25 | + <div class="span2"><span class="text-info">Available types:</span> |
| 26 | + <button popover-placement="right" |
| 27 | + popover="Here you can select the type of documents that we query over. If you select nothing, all types are used for the query. |
| 28 | + Beware, if you select a type that is not available in the chosen index you see nothing." |
| 29 | + class="btn btn-mini btn-link"><i class="icon-question-sign"></i></button> |
| 30 | + </div> |
12 | 31 | <div class="span10"> |
13 | 32 | <div id="chooseTypeBtn" class="btn-group" data-toggle="buttons-checkbox"> |
14 | 33 | <div class="btn btn-mini" ng-click="chooseType(type)" ng-repeat="type in types">{{type}}</div> |
|
18 | 37 |
|
19 | 38 | <div class="row-fluid" style="padding-bottom: 5px"> |
20 | 39 | <form class="form-horizontal"> |
21 | | - <div class="span2"><p class="text-info">Available Fields:</p></div> |
| 40 | + <div class="span2"><span class="text-info">Available Fields:</span> |
| 41 | + <button popover-placement="right" |
| 42 | + popover="Here you can select the fields that we obtain and that we show on screen. If you select nothing, we also show nothing |
| 43 | + on the screen. When the highlight checkbox is checked we use highlighting when showing the fields." |
| 44 | + class="btn btn-mini btn-link"><i class="icon-question-sign"></i></button> |
| 45 | + </div> |
22 | 46 | <div class="span10"> |
23 | 47 | <select ng-model="queryFactory.addField"> |
24 | 48 | <option ng-repeat="field in fields">{{field}}</option> |
|
37 | 61 |
|
38 | 62 | <div class="row-fluid"> |
39 | 63 | <div class="span2"> |
40 | | - <span class="text-info">Facets</span> <span class="btn btn-info btn-mini" ng-click="openDialog()" |
41 | | - title="Add new Facet"> |
42 | | - <i class="icon-plus-sign icon-white"></i> |
43 | | - </span> |
| 64 | + <span class="text-info">Facets</span> |
| 65 | + <button popover-placement="right" |
| 66 | + popover="Here you can select the facets to return. A few basic types are available. Use the Facets screen to do more advanced stuff with facets." |
| 67 | + class="btn btn-mini btn-link"><i class="icon-question-sign"></i></button> |
| 68 | + |
44 | 69 | </div> |
45 | 70 | <div class="span10"> |
| 71 | + <span class="btn btn-info btn-mini" ng-click="openDialog()" title="Add new Facet"> |
| 72 | + <i class="icon-plus-sign icon-white"></i> |
| 73 | + </span> |
46 | 74 | <span ng-repeat="facet in facets">{{facet.field}} ({{facet.facetType}}) |
47 | 75 | <span class="btn btn-mini" ng-click="removeFacetField(facet.field)" title="Remove facet Field"> |
48 | 76 | <i class="icon-remove-sign"></i> |
|
52 | 80 | </div> |
53 | 81 |
|
54 | 82 | <form novalidate class="form-search"> |
55 | | - <div class="row-fluid" style="padding-bottom: 5px"> |
56 | | - <div class="span2"><p class="text-info">Search for:</p></div> |
| 83 | + <div class="row-fluid"> |
| 84 | + <div class="span2"> |
| 85 | + <span class="text-info">Query configuration</span> |
| 86 | + <button popover-placement="right" |
| 87 | + popover="Here you can configure some additional items on the query. You can change the default OR searching to AND searching and even PHRASE |
| 88 | + searching. All queries use the Match query type. If you want to do more advanced queries using search by field for instance use another part of this application. |
| 89 | + If you select the explain option you'll learn more about the scoring of the returned results. When selecting highlighting we also show the highlighted fields." |
| 90 | + class="btn btn-mini btn-link"><i class="icon-question-sign"></i></button> |
| 91 | + |
| 92 | + </div> |
57 | 93 | <div class="span10"> |
58 | | - <input type="text" class="input-medium search-query" ng-model="search.term" ng-change=""/> |
59 | | - <span class="btn btn-primary" ng-click="executeQuery()" title="Execute query">Query <i |
60 | | - class="icon-search icon-white"></i></span> |
61 | | - <span class="btn btn-info" ng-click="changeQuery()" title="Check Query"><i |
| 94 | + <span class="btn btn-info btn-mini" ng-click="changeQuery()" title="Check Query"><i |
62 | 95 | class="icon-check icon-white"></i></span> |
63 | | - <span class="btn btn-info" ng-click="resetQuery()" title="Reset all choices"><i |
| 96 | + <span class="btn btn-info btn-mini" ng-click="resetQuery()" title="Reset all choices"><i |
64 | 97 | class="icon-refresh icon-white"></i></span> |
| 98 | + <span class="text-info">Query Type</span> |
| 99 | + <label class="radio"> |
| 100 | + <input type="radio" ng-model="search.type" value="or">OR |
| 101 | + </label> |
| 102 | + <label class="radio"> |
| 103 | + <input type="radio" ng-model="search.type" value="and">AND |
| 104 | + </label> |
| 105 | + <label class="radio"> |
| 106 | + <input type="radio" ng-model="search.type" value="phrase">PHRASE |
| 107 | + </label> |
| 108 | + <span class="text-info"> Use explain:</span> |
| 109 | + <label class="checkbox"><input type="checkbox" ng-model="search.explain"/></label> |
| 110 | + <span class="text-info">, Use highlighting:</span> |
| 111 | + <label class="checkbox"><input type="checkbox" ng-model="search.highlight"/></label> |
65 | 112 | </div> |
66 | 113 | </div> |
67 | | - <div class="row-fluid"> |
68 | | - <div class="span12"> |
69 | | - <span class="text-info">Use explain:</span> |
70 | | - <label class="checkbox"><input type="checkbox" ng-model="search.explain"/></label> |
| 114 | + <div class="row-fluid" style="padding-bottom: 5px"> |
| 115 | + <div class="span12 alert alert-info"> |
| 116 | + <span class="text-info offset1">Search for:</span> |
| 117 | + <input type="text" class="input-medium search-query span4" ng-model="search.term" ng-change=""/> |
| 118 | + <span class="btn btn-primary" ng-click="executeQuery()" title="Execute query">Query <i |
| 119 | + class="icon-search icon-white"></i></span> |
71 | 120 | </div> |
72 | 121 | </div> |
73 | 122 | </form> |
@@ -142,12 +191,18 @@ <h3>Results</h3> |
142 | 191 | </table> |
143 | 192 | </div> |
144 | 193 | <div class="span4"> |
145 | | - <table class="table table-condensed"> |
| 194 | + <table class="table table-condensed" ng-hide="search.highlight"> |
146 | 195 | <tr ng-repeat="(key,value) in doc.fields"> |
147 | 196 | <th>{{key}}</th> |
148 | 197 | <td>{{value}}</td> |
149 | 198 | </tr> |
150 | 199 | </table> |
| 200 | + <table class="table table-condensed" ng-show="search.highlight"> |
| 201 | + <tr ng-repeat="(key,value) in doc.highlight"> |
| 202 | + <th>{{key}}</th> |
| 203 | + <td><p ng-repeat="item in value">{{item}}</p></td> |
| 204 | + </tr> |
| 205 | + </table> |
151 | 206 | </div> |
152 | 207 | <div class="span4"> |
153 | 208 | <h3 ng-hide="!search.explain">Explanation</h3> |
|
0 commit comments