mirror of https://github.com/apache/lucene.git
SOLR-3734: Improve Schema-Browser Handling for CopyField using dynamicField's
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1392318 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f1bb4ff1aa
commit
a91a798e34
|
@ -51,6 +51,9 @@ Optimizations
|
|||
* SOLR-3614: Fix XML parsing in XPathEntityProcessor to correctly expand
|
||||
named entities, but ignore external entities. (uschindler, hossman)
|
||||
|
||||
* SOLR-3734: Improve Schema-Browser Handling for CopyField using
|
||||
dynamicField's (steffkes)
|
||||
|
||||
Bug Fixes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -114,6 +114,18 @@
|
|||
padding-left: 5px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .partial
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .partial p
|
||||
{
|
||||
background-image: url( ../../img/ico/exclamation-button.png );
|
||||
background-position: 0 50%;
|
||||
padding-left: 21px;
|
||||
}
|
||||
|
||||
#content #schema-browser #data #field .field-options .options dt,
|
||||
#content #schema-browser #data #field .field-options .options dd
|
||||
{
|
||||
|
|
|
@ -267,19 +267,23 @@ sammy.bind
|
|||
if( 'field' === type )
|
||||
{
|
||||
navigation_data.fields.push( value );
|
||||
|
||||
if( app.schema_browser_data.relations.f_t[value] )
|
||||
{
|
||||
navigation_data.types.push( app.schema_browser_data.relations.f_t[value] );
|
||||
}
|
||||
|
||||
if( app.schema_browser_data.relations.f_df[value] )
|
||||
{
|
||||
navigation_data.dynamic_fields.push( app.schema_browser_data.relations.f_df[value] );
|
||||
}
|
||||
|
||||
if( 0 !== app.schema_browser_data.fields[value].copySources.length )
|
||||
if( app.schema_browser_data.fields[value].copySources && 0 !== app.schema_browser_data.fields[value].copySources.length )
|
||||
{
|
||||
navigation_data.copyfield_source = app.schema_browser_data.fields[value].copySources;
|
||||
}
|
||||
|
||||
if( 0 !== app.schema_browser_data.fields[value].copyDests.length )
|
||||
if( app.schema_browser_data.fields[value].copyDests && 0 !== app.schema_browser_data.fields[value].copyDests.length )
|
||||
{
|
||||
navigation_data.copyfield_dest = app.schema_browser_data.fields[value].copyDests;
|
||||
}
|
||||
|
@ -490,30 +494,39 @@ sammy.bind
|
|||
|
||||
for( var field in app.schema_browser_data.fields )
|
||||
{
|
||||
app.schema_browser_data.fields[field].copySourcesRaw = null;
|
||||
|
||||
if( app.schema_browser_data.fields[field].copySources &&
|
||||
0 !== app.schema_browser_data.fields[field].copySources.length )
|
||||
var copy_dests = app.schema_browser_data.fields[field].copyDests;
|
||||
for( var i in copy_dests )
|
||||
{
|
||||
app.schema_browser_data.fields[field].copySourcesRaw =
|
||||
app.schema_browser_data.fields[field].copySources;
|
||||
var copy_dest = copy_dests[i];
|
||||
if( !app.schema_browser_data.fields[copy_dest] )
|
||||
{
|
||||
app.schema_browser_data.fields[copy_dest] = {
|
||||
partial : true,
|
||||
copySources : []
|
||||
};
|
||||
}
|
||||
|
||||
app.schema_browser_data.fields[field].copyDests = [];
|
||||
app.schema_browser_data.fields[field].copySources = [];
|
||||
if( app.schema_browser_data.fields[copy_dest].partial )
|
||||
{
|
||||
app.schema_browser_data.fields[copy_dest].copySources.push( field );
|
||||
}
|
||||
}
|
||||
|
||||
for( var field in app.schema_browser_data.fields )
|
||||
{
|
||||
if( app.schema_browser_data.fields[field].copySourcesRaw )
|
||||
{
|
||||
var copy_sources = app.schema_browser_data.fields[field].copySourcesRaw;
|
||||
var copy_sources = app.schema_browser_data.fields[field].copySources;
|
||||
for( var i in copy_sources )
|
||||
{
|
||||
var target = copy_sources[i].replace( /^.+:(.+)\{.+$/, '$1' );
|
||||
var copy_source = copy_sources[i];
|
||||
if( !app.schema_browser_data.fields[copy_source] )
|
||||
{
|
||||
app.schema_browser_data.fields[copy_source] = {
|
||||
partial : true,
|
||||
copyDests : []
|
||||
};
|
||||
}
|
||||
|
||||
app.schema_browser_data.fields[field].copySources.push( target );
|
||||
app.schema_browser_data.fields[target].copyDests.push( field );
|
||||
if( app.schema_browser_data.fields[copy_source].partial )
|
||||
{
|
||||
app.schema_browser_data.fields[copy_source].copyDests.push( field );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -763,6 +776,9 @@ sammy.get
|
|||
}
|
||||
$( '.name', head_element ).html( field.esc() );
|
||||
|
||||
$( '.partial', data_element )
|
||||
.toggle( !!schema_browser_data.fields[field].partial );
|
||||
|
||||
// -- properties
|
||||
var properties_element = $( 'dt.properties', options_element );
|
||||
if( flags )
|
||||
|
|
|
@ -31,6 +31,12 @@ limitations under the License.
|
|||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="partial">
|
||||
|
||||
<p>Because your Index is empty, we have not enough Information about this Field</p>
|
||||
|
||||
</div>
|
||||
|
||||
<dl class="options clearfix">
|
||||
|
||||
<dt class="field-type">Field-Type:</dt>
|
||||
|
|
Loading…
Reference in New Issue