Skip to content

Commit

Permalink
switch jquery to use /suggest and eliminate/move all params to solrco…
Browse files Browse the repository at this point in the history
…nfig.xml defaults
  • Loading branch information
hossman committed Apr 9, 2011
1 parent 28732f9 commit ee15e41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/isfdb-solr-home/conf/solrconfig.xml
Expand Up @@ -120,6 +120,8 @@ http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/conf/solrconf
<int name="spellcheck.count">5</int>
<bool name="spellcheck.collate">true</bool>
<int name="spellcheck.maxCollations">10</int>
<str name="v.template">suggest</str>
<str name="wt">velocity</str>
</lst>
<arr name="components">
<str>suggest</str>
Expand Down
12 changes: 2 additions & 10 deletions src/isfdb-solr-home/conf/velocity/head.vm
Expand Up @@ -28,18 +28,10 @@

<script>
$(document).ready(function(){
$("\#q").autocomplete('#{url_for_solr}/terms', { ## backslash escaped #q as that is a macro defined in VM_global_library.vm
extraParams:{
'terms.prefix': function() { return $("\#q").val().toLowerCase();},
'terms.sort': 'count',
'terms.fl': 'catchall',
'wt': 'velocity',
'v.template': 'suggest'
}
## backslash escaped #q as that is a macro defined in VM_global_library.vm
$("\#q").autocomplete('#{url_for_solr}/suggest', {
}
);

// http://localhost:8983/solr/terms?terms.fl=name&terms.prefix=i&terms.sort=count
});

</script>

0 comments on commit ee15e41

Please sign in to comment.