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 11:59:41 UTC
svn commit: r1434613 - in /lucene/dev/trunk/solr: CHANGES.txt
example/solr/collection1/conf/velocity/head.vm
example/solr/collection1/conf/velocity/jquery.autocomplete.js
Author: janhoy
Date: Thu Jan 17 10:59:40 2013
New Revision: 1434613
URL: http://svn.apache.org/viewvc?rev=1434613&view=rev
Log:
SOLR-4309: /browse: Improve JQuery autosuggest behavior
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/head.vm
lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1434613&r1=1434612&r2=1434613&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Thu Jan 17 10:59:40 2013
@@ -60,7 +60,20 @@ 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/trunk/solr/example/solr/collection1/conf/velocity/head.vm
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/head.vm?rev=1434613&r1=1434612&r2=1434613&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/head.vm (original)
+++ lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/head.vm Thu Jan 17 10:59:40 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/trunk/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js?rev=1434613&r1=1434612&r2=1434613&view=diff
==============================================================================
--- lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js (original)
+++ lucene/dev/trunk/solr/example/solr/collection1/conf/velocity/jquery.autocomplete.js Thu Jan 17 10:59:40 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,