mirror of https://github.com/apache/lucene.git
SOLR-9626: Add css class, when match key is found
This commit is contained in:
parent
4ce7ce0844
commit
df6d86d5f6
|
@ -118,6 +118,8 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-9729: JDBCStream improvements (Kevin Risden)
|
* SOLR-9729: JDBCStream improvements (Kevin Risden)
|
||||||
|
|
||||||
|
* SOLR-9626: new Admin UI now also highlights matched terms in the Analysis screen. (Alexandre Rafalovitch)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,17 @@ solrAdminApp.controller('AnalysisController',
|
||||||
|
|
||||||
for (key in tokenhash) {
|
for (key in tokenhash) {
|
||||||
if (key == "match" || key=="positionHistory") {
|
if (key == "match" || key=="positionHistory") {
|
||||||
//@ todo do something
|
//skip, to not display these keys in the UI
|
||||||
} else {
|
} else {
|
||||||
token.keys.push({name:key, value:tokenhash[key]});
|
var tokenInfo = new Object();
|
||||||
|
tokenInfo.name = key;
|
||||||
|
tokenInfo.value = tokenhash[key];
|
||||||
|
if ('text' === key || 'raw_bytes' === key ) {
|
||||||
|
if (tokenhash.match) {
|
||||||
|
tokenInfo.extraclass = 'match'; //to highlight matching text strings
|
||||||
|
}
|
||||||
|
}
|
||||||
|
token.keys.push(tokenInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tokens.push(token);
|
tokens.push(token);
|
||||||
|
|
|
@ -106,7 +106,7 @@ limitations under the License.
|
||||||
<td class="details">
|
<td class="details">
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="{{value.name}}" ng-repeat="value in token.keys" ng-show="verbose || value.name=='text'">
|
<tr class="{{value.name}} {{value.extraclass}}" ng-repeat="value in token.keys" ng-show="verbose || value.name=='text'">
|
||||||
<td>{{value.value}}</td>
|
<td>{{value.value}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue