From 70897331c0dfadee2e3f6fcc6ada809c73b0e292 Mon Sep 17 00:00:00 2001 From: Erik Hatcher Date: Thu, 1 Feb 2007 05:16:11 +0000 Subject: [PATCH] an example of the accented characters of the example data being displayd from Flare via solrb git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@502126 13f79535-47bb-0310-9956-ffa450edef68 --- client/ruby/flare/app/controllers/browse_controller.rb | 1 + client/ruby/flare/app/controllers/i18n_controller.rb | 5 +++++ client/ruby/flare/app/views/i18n/index.rhtml | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 client/ruby/flare/app/controllers/i18n_controller.rb create mode 100644 client/ruby/flare/app/views/i18n/index.rhtml 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