You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2013/01/17 12:21:42 UTC
svn commit: r1434619 - in /lucene/dev/branches/branch_4x: ./ solr/
solr/CHANGES.txt solr/example/
solr/example/solr/collection1/conf/velocity/head.vm
solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js
Author: janhoy
Date: Thu Jan 17 11:21:42 2013
New Revision: 1434619
URL: http://svn.apache.org/viewvc?rev=1434619&view=rev
Log:
SOLR-4309: /browse: Improve JQuery autosuggest behavior (merge from trunk)
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/solr/ (props changed)
lucene/dev/branches/branch_4x/solr/CHANGES.txt
lucene/dev/branches/branch_4x/solr/example/ (props changed)
lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/head.vm
lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js
Modified: lucene/dev/branches/branch_4x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/CHANGES.txt?rev=1434619&r1=1434618&r2=1434619&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_4x/solr/CHANGES.txt Thu Jan 17 11:21:42 2013
@@ -38,7 +38,19 @@ Upgrading from Solr 4.1.0
Detailed Change List
----------------------
-(No changes yet)
+New Features
+----------------------
+
+Bug Fixes
+----------------------
+
+* SOLR-4309: /browse: Improve JQuery autosuggest behavior (janhoy)
+
+Optimizations
+----------------------
+
+Other Changes
+----------------------
================== 4.1.0 ==================
Modified: lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/head.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/head.vm?rev=1434619&r1=1434618&r2=1434619&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/head.vm (original)
+++ lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/head.vm Thu Jan 17 11:21:42 2013
@@ -20,7 +20,11 @@
'v.template': 'suggest'
}
}
- );
+ ).keydown(function(e){
+ if (e.keyCode === 13){
+ $("#query-form").trigger('submit');
+ }
+ });
// http://localhost:8983/solr/terms?terms.fl=name&terms.prefix=i&terms.sort=count
});
Modified: lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js?rev=1434619&r1=1434618&r2=1434619&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js (original)
+++ lucene/dev/branches/branch_4x/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js Thu Jan 17 11:21:42 2013
@@ -325,6 +325,7 @@ $.Autocompleter = function(input, option
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
+ data = null; // Avoid buggy cache and go to Solr every time
// recieve the cached data
if (data && data.length) {
success(term, data);
@@ -398,7 +399,7 @@ $.Autocompleter.defaults = {
max: 100,
mustMatch: false,
extraParams: {},
- selectFirst: true,
+ selectFirst: false,
formatItem: function(row) { return row[0]; },
formatMatch: null,
autoFill: false,