You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2012/09/21 19:22:27 UTC

svn commit: r1388574 [45/45] - in /lucene/dev/branches/LUCENE-2878: ./ dev-tools/ dev-tools/eclipse/ dev-tools/eclipse/dot.settings/ dev-tools/idea/ dev-tools/idea/.idea/ dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/ dev-tools/idea/lucene/anal...

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cloud.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cloud.js?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cloud.js (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cloud.js Fri Sep 21 17:21:34 2012
@@ -589,41 +589,35 @@ var init_tree = function( tree_element )
 
                     var data_element = $( '#data', this );
 
-                    if( 0 !== parseInt( response.znode.prop.children_count ) )
-                    {
-                      data_element.hide();
-                    }
-                    else
-                    {
-                      var highlight = false;
-                      var data = '<em>File "' + response.znode.path + '" has no Content</em>';
+                    var highlight = false;
+                    var data = '<em>File "' + response.znode.path + '" has no Content</em>';
 
-                      if( response.znode.data )
+                    if( response.znode.data )
+                    {
+                      var classes = '';
+                      var path = response.znode.path.split( '.' );
+                      
+                      if( 1 < path.length )
                       {
-                        var classes = '';
-                        var path = response.znode.path.split( '.' );
-
-                        if( 1 < path.length )
-                        {
-                          highlight = true;
-                          classes = 'syntax language-' + path.pop().esc();
-                        }
-
-                        data = '<pre class="' + classes + '">'
-                             + response.znode.data.esc()
-                             + '</pre>';
+                        highlight = true;
+                        classes = 'syntax language-' + path.pop().esc();
                       }
+
+                      data = '<pre class="' + classes + '">'
+                           + response.znode.data.esc()
+                           + '</pre>';
+                    }
                                
 
-                      data_element
-                          .show()
-                          .html( data );
+                    data_element
+                        .show()
+                        .html( data );
 
-                      if( highlight )
-                      {
-                        hljs.highlightBlock( data_element.get(0) );
-                      }
+                    if( highlight )
+                    {
+                      hljs.highlightBlock( data_element.get(0) );
                     }
+                    
                   },
                   error : function( xhr, text_status, error_thrown)
                   {

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cores.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cores.js?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cores.js (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/cores.js Fri Sep 21 17:21:34 2012
@@ -365,6 +365,12 @@ sammy.get
                       },
                       error : function( xhr, text_status, error_thrown )
                       {
+                        var response = null;
+                        eval( 'response = ' + xhr.responseText + ';' );
+
+                        var error_elem = $( '.error', div_action.filter( ':visible' ) );
+                        error_elem.show();
+                        $( 'span', error_elem ).text( response.error.msg );
                       },
                       complete : function()
                       {

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/dataimport.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/dataimport.js?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/dataimport.js (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/dataimport.js Fri Sep 21 17:21:34 2012
@@ -528,10 +528,22 @@ sammy.get
                   array.push( { name : 'rows', value: rows } );
                 }
 
+                $( 'input:checkbox', form ).not( ':checked' )
+                  .each( function( i, input )
+                  {
+                    array.push( { name: input.name, value: 'false' } );
+                  }
+                );
+
                 var custom_parameters = $( '#custom_parameters', form ).val();
                 if( custom_parameters.length )
                 {
-                  array.push( { name : 'custom_parameters', value: custom_parameters } );
+                  var params = custom_parameters.split( '&' );
+                  for( var i in params )
+                  {
+                    var tmp = params[i].split( '=' );
+                    array.push( { name : tmp[0], value: tmp[1] } );
+                  }
                 }
               },
               success : function( response, text_status, xhr )

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/schema-browser.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/schema-browser.js?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/schema-browser.js (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/js/scripts/schema-browser.js Fri Sep 21 17:21:34 2012
@@ -871,7 +871,7 @@ sammy.get
         var pig_element = $( 'dt.position-increment-gap', options_element );
         if( is_f && schema_browser_data.fields[field] && schema_browser_data.fields[field].positionIncrementGap )
         {
-          $( 'dt.position-increment-gap', options_element )
+          $( 'dd.position-increment-gap', options_element )
             .remove();
 
           pig_element
@@ -883,7 +883,20 @@ sammy.get
           $( '.position-increment-gap', options_element )
             .hide();
         }
-                
+
+        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
+            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();
+        }
+
         var analyzer_element = $( '.analyzer', data_element );
         var analyzer_data = null;
 
@@ -1190,4 +1203,4 @@ sammy.get
       trigger_params
     );
   }
-);
\ No newline at end of file
+);

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/cores.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/cores.html?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/cores.html (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/cores.html Fri Sep 21 17:21:34 2012
@@ -36,19 +36,19 @@ limitations under the License.
           <input type="hidden" name="action" value="CREATE">
 
           <p class="clearfix"><label for="add_name">name:</label>
-          <input type="text" name="name" id="add_name" placeholder="new_core"></p>
+          <input type="text" name="name" id="add_name" value="new_core"></p>
 
           <p class="clearfix"><label for="add_instanceDir">instanceDir:</label>
-          <input type="text" name="instanceDir" id="add_instanceDir" placeholder="new_core"></p>
+          <input type="text" name="instanceDir" id="add_instanceDir" value="new_core"></p>
 
           <p class="clearfix"><label for="add_dataDir">dataDir:</label>
-          <input type="text" name="dataDir" id="dataDir" placeholder="data"></p>
+          <input type="text" name="dataDir" id="dataDir" value="data"></p>
 
           <p class="clearfix"><label for="add_config">config:</label>
-          <input type="text" name="config" id="add_config" placeholder="solrconfig.xml"></p>
+          <input type="text" name="config" id="add_config" value="solrconfig.xml"></p>
 
           <p class="clearfix"><label for="add_schema">schema:</label>
-          <input type="text" name="schema" id="add_schema" placeholder="schema.xml"></p>
+          <input type="text" name="schema" id="add_schema" value="schema.xml"></p>
 
           <div class="cloud">
 
@@ -60,6 +60,12 @@ limitations under the License.
 
           </div>
 
+          <p class="clearfix error">
+
+            <span></span>
+
+          </p>
+
           <p class="clearfix buttons">
             <button type="submit" class="submit"><span>Add Core</span></button>
             <button type="reset" class="reset"><span>Cancel</span></button>

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/dataimport.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/dataimport.html?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/dataimport.html (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/dataimport.html Fri Sep 21 17:21:34 2012
@@ -112,7 +112,7 @@ limitations under the License.
       <label for="custom_parameters">
         <a rel="help">Custom Parameters</a>
       </label>
-      <input type="text" id="custom_parameters" value="">
+      <input type="text" id="custom_parameters" value="" placeholder="key1=val1&amp;key2=val2">
 
       <button type="submit">Execute Import</button>
     

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/query.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/query.html?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/query.html (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/query.html Fri Sep 21 17:21:34 2012
@@ -56,6 +56,11 @@ limitations under the License.
         </label>
         <input type="text" name="fl" id="fl" value="" title="Field list, comma separated.">
 
+        <label for="df">
+          <a rel="help">df</a>
+        </label>
+        <input type="text" name="df" id="df" value="" title="Default search field">
+
         <label for="wt">
           <a rel="help">wt</a>
         </label>
@@ -84,7 +89,7 @@ limitations under the License.
       <fieldset class="dismax optional">
         <legend>
           <label for="dismax" class="checkbox">
-            <input type="checkbox" name="dismax" id="dismax" value="true">
+            <input type="checkbox" name="defType" id="dismax" value="dismax">
             dismax
           </label>
         </legend>
@@ -123,38 +128,38 @@ limitations under the License.
       <fieldset class="edismax optional">
         <legend>
           <label for="edismax" class="checkbox">
-            <input type="checkbox" name="edismax" id="edismax" value="true">
+            <input type="checkbox" name="defType" id="edismax" value="edismax">
             <strong>e</strong>dismax
           </label>
         </legend>
         <div class="fieldset">
 
         <label for="edismax_q_alt">q.alt</label>
-        <input type="text" name="q.alt" id="edismax_q_alt">
+        <input type="text" name="q.alt" id="edismax_q_alt"  title="Alternate query when 'q' is absent.">
 
         <label for="edismax_qf">qf</label>
-        <input type="text" name="qf" id="edismax_qf">
+        <input type="text" name="qf" id="edismax_qf" title="Query fields with optional boosts.">
 
         <label for="edismax_mm">mm</label>
-        <input type="text" name="mm" id="edismax_mm">
+        <input type="text" name="mm" id="edismax_mm" title="Min-should-match expression.">
 
         <label for="edismax_pf">pf</label>
-        <input type="text" name="pf" id="edismax_pf">
+        <input type="text" name="pf" id="edismax_pf" title="Phrase boosted fields.">
 
         <label for="edismax_ps">ps</label>
-        <input type="text" name="ps" id="edismax_ps">
+        <input type="text" name="ps" id="edismax_ps" title="Phrase boost slop.">
 
         <label for="edismax_qs">qs</label>
-        <input type="text" name="qs" id="edismax_qs">
+        <input type="text" name="qs" id="edismax_qs" title="Query string phrase slop.">
 
         <label for="edismax_tie">tie</label>
-        <input type="text" name="tie" id="edismax_tie">
+        <input type="text" name="tie" id="edismax_tie" title="Score tie-breaker. Try 0.1.">
 
         <label for="edismax_bq">bq</label>
-        <input type="text" name="bq" id="edismax_bq">
+        <input type="text" name="bq" id="edismax_bq" title="Boost query.">
 
         <label for="edismax_bf">bf</label>
-        <input type="text" name="bf" id="edismax_bf">
+        <input type="text" name="bf" id="edismax_bf" title="Boost function (added).">
       
         </div>
       </fieldset>

Modified: lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/schema-browser.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/schema-browser.html?rev=1388574&r1=1388573&r2=1388574&view=diff
==============================================================================
--- lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/schema-browser.html (original)
+++ lucene/dev/branches/LUCENE-2878/solr/webapp/web/tpl/schema-browser.html Fri Sep 21 17:21:34 2012
@@ -35,6 +35,8 @@ limitations under the License.
 
             <dt class="field-type">Field-Type:</dt>
 
+            <dt class="similarity">Similarity:</dt>
+
             <dt class="properties">Properties:</dt>
 
             <dt class="schema">Schema:</dt>