Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

an example of the accented characters of the example data being displayd from Flare via solrb

Erik Hatcher70897331c0df
diff --git a/client/ruby/flare/app/controllers/browse_controller.rb b/client/ruby/flare/app/controllers/browse_controller.rb
index 1e3f1ecdc49..1ddb1d3c69d 100644
--- a/client/ruby/flare/app/controllers/browse_controller.rb
+++ b/client/ruby/flare/app/controllers/browse_controller.rb
@@ -8,6 +8,7 @@ class BrowseController < ApplicationController
@info = SOLR.send(Solr::Request::IndexInfo.new) # TODO move this call to only have it called when the index may have changed
@facet_fields = @info.field_names.find_all {|v| v =~ /_facet$/}
+ # TODO Add paging and sorting
request = Solr::Request::Standard.new :query => query,
:filter_queries => filters,
:facets => {:fields => @facet_fields, :limit => 20 , :mincount => 1, :sort => :count, :debug_query=>true}
diff --git a/client/ruby/flare/app/controllers/i18n_controller.rb b/client/ruby/flare/app/controllers/i18n_controller.rb
new file mode 100644
index 00000000000..ec54fda992a
--- /dev/null
+++ b/client/ruby/flare/app/controllers/i18n_controller.rb
@@ -0,0 +1,5 @@
+class I18nController < ApplicationController
+ def index
+ @results = SOLR.query("acute").hits
+ end
+end
\ No newline at end of file
diff --git a/client/ruby/flare/app/views/i18n/index.rhtml b/client/ruby/flare/app/views/i18n/index.rhtml
new file mode 100644
index 00000000000..d4d147345b4
--- /dev/null
+++ b/client/ruby/flare/app/views/i18n/index.rhtml
@@ -0,0 +1,3 @@
+<% @results[0]['features'].each do |f| %>
+ <%= f%>
+<% end %>
\ No newline at end of file