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
|
@ -117,6 +117,8 @@ Bug Fixes
|
|||
(Mark Miller, Michael Sun)
|
||||
|
||||
* SOLR-9729: JDBCStream improvements (Kevin Risden)
|
||||
|
||||
* SOLR-9626: new Admin UI now also highlights matched terms in the Analysis screen. (Alexandre Rafalovitch)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
|
|
@ -76,9 +76,17 @@ solrAdminApp.controller('AnalysisController',
|
|||
|
||||
for (key in tokenhash) {
|
||||
if (key == "match" || key=="positionHistory") {
|
||||
//@ todo do something
|
||||
//skip, to not display these keys in the UI
|
||||
} 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);
|
||||
|
|
|
@ -106,7 +106,7 @@ limitations under the License.
|
|||
<td class="details">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue