SOLR-3784: Prevent Javascript UI hangs due to similarity

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1382385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Greg Bowyer 2012-09-09 00:02:56 +00:00
parent 9f0fafc552
commit 8b40b45d01
1 changed files with 6 additions and 4 deletions

View File

@ -887,10 +887,12 @@ sammy.get
var similarity_element = $( 'dt.similarity', options_element );
if ( is_t && schema_browser_data.types[field] && schema_browser_data.types[field].similarity ) {
var similarity = schema_browser_data.types[field].similarity
$( 'dd.similarity', options_element ).remove();
similarity_element
.show()
.after(['<dd class="similarity">', similarity.details.esc(), ' (', similarity.className.esc(), ') </dd>'].join(""));
if (similarity.details && similarity.className) {
$( 'dd.similarity', options_element ).remove();
similarity_element
.show()
.after(['<dd class="similarity">', similarity.details.esc(), ' (', similarity.className.esc(), ') </dd>'].join(""));
}
} else {
$( '.similarity', options_element ).hide();
}