Git Product home page Git Product logo

refinerycms-search's Introduction

Refinery Framework

This is a little project to see if we can write a tidy underlying framework.

refinerycms-search's People

Contributors

adamico avatar anitagraham avatar awagener avatar bricesanchez avatar chrisftw avatar djones avatar dmoose avatar dreamboostme avatar duarme avatar joemsak avatar kgautreaux avatar mamedov avatar markprovan avatar matho avatar mattherick avatar mhaylock avatar mirosr avatar nickurban avatar parndt avatar robyurkowski avatar shanser avatar simi avatar snake66 avatar snowsunny avatar ugisozols avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

refinerycms-search's Issues

Need way to specify model name in search results

If you have a searchable model like Refinery::News::Item, it will show up as "News::Item" in the search results. Given that module and class names don't necessarily form a human-readable label, a way to override the automatic name with a string would be a ideal. If I find a clean way to get around this, I will submit a pull request.
refinery search results model name issue

cannot load such file -- refinery/core/nil_user

I'm trying to install gem 'refinerycms-search' for the project. But when running 'rails generate refinery: search' the error is as shown. Please tell me the reason.

rails generate refinery:search
/home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in require': cannot load such file -- refinery/core/nil_user (LoadError) from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in block in require'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in load_dependency' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in require'
from /home/thanh/monnhatban/config/initializers/refinery/core/authorisation_adapter.rb:1:in <top (required)>' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in load'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in block in load' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in load_dependency'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in load' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/engine.rb:652:in block in load_config_initializer'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/notifications.rb:166:in instrument' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/engine.rb:651:in load_config_initializer'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/engine.rb:616:in block (2 levels) in <class:Engine>' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/engine.rb:615:in each'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/engine.rb:615:in block in <class:Engine>' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:30:in instance_exec'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:30:in run' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:55:in block in run_initializers'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:228:in block in tsort_each' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:421:in block in each_strongly_connected_component_from' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:44:in each'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:44:in tsort_each_child' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:415:in call'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:415:in each_strongly_connected_component_from' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:349:in block in each_strongly_connected_component'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in each' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in call'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:226:in tsort_each'
from /home/thanh/.rvm/rubies/ruby-2.3.4/lib/ruby/2.3.0/tsort.rb:205:in tsort_each' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/initializable.rb:54:in run_initializers'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/application.rb:352:in initialize!' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/railtie.rb:194:in public_send'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/railtie.rb:194:in method_missing' from /home/thanh/monnhatban/config/environment.rb:5:in <top (required)>'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in require' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in block in require'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in load_dependency' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in require'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/application.rb:328:in require_environment!' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:142:in require_application_and_environment!'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:128:in generate_or_destroy' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:50:in generate'
from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in run_command!' from /home/thanh/.rvm/gems/ruby-2.3.4/gems/railties-4.2.0/lib/rails/commands.rb:17:in <top (required)>'
from script/rails:6:in require' from script/rails:6:in

'

NoMethodError: undefined method `safe_constantize'

Was getting this error. Traced it to the search engine model.

For some reason my enable_for configs are coming through as classes and not strings as is expected by the search_engine model and safe_constantize is not defined on Active::Record classes. I had to comment out for it to work.

jess@1c277b9

This is what my search config looks like:

Refinery::Search.configure do |config|
  config.enable_for = ["Refinery::Page", "Refinery::Projects::Property", "Refinery::Blog::Post"]
  # config.page_url = "/search"
  config.results_per_page = 50
end

Any idea how an array of strings could be converted to an array of classes? I check code and can't find anything in the search gem that would suggest conversion.

[4] pry(Refinery::Search::SearchEngine)> Refinery::Search.config.enable_for
=> [Refinery::Page(id: integer, parent_id: integer, path: string, slug: string, custom_slug: string, show_in_menu: boolean, link_url: string, menu_match: string, deletable: boolean,draft: boolean, skip_to_first_child: boolean, lft: integer, rgt: integer, depth: integer, view_template: string, layout_template: string, created_at: datetime, updated_at: datetime),
 Refinery::Projects::Property(id: integer, title: string, photo_id: integer, body: text, side_bar: text, position: integer, created_at: datetime, updated_at: datetime, published: boolean, featured: boolean, architect: string, owner_developer: string, general_contractor: string, address: string, city: string, state: string, county: string, completion_date: string, structure_type: string, services_provided: string, related_links: string, photo_credit: string, latitude: decimal, longitude: decimal, in_the_works: boolean, zip: string, projectid: string)]

I tried creating another array in the config and it comes out just fine:

Refinery::Search.configure do |config|
...
  config.enable_for_model = ["Refinery::Page", "Refinery::Projects::Property", "Refinery::Blog::Post"]
...
end
[2] pry(Refinery::Search::SearchEngine)> Refinery::Search.config.enable_for_model.first
=> "Refinery::Page"

Must not be an issue for anyone else, but thought I'd throw it out and see if anyone has suggestions.

Error when searching with news engine

NoMethodError:

undefined method `item_url' for #<ActionDispatch...> 

In search/show.html.erb on this line:

 <%= link_to raw(result.title.gsub(/(#{Regexp.escape(params[:query])})/i, '<mark>\1</mark>')), result_url(result) %>
Stack trace:

actionpack (3.2.2) lib/action_dispatch/routing/routes_proxy.rb:34:in `method_missing'
actionpack (3.2.2) lib/action_dispatch/routing/polymorphic_routes.rb:127:in `polymorphic_url'
actionpack (3.2.2) lib/action_dispatch/routing/url_for.rb:150:in `url_for'
vendor/extensions/search/app/helpers/refinery/search_helper.rb:7:in `result_url'
vendor/extensions/search/app/views/refinery/search/show.html.erb:12:in `block in _vendor_extensions_search_app_views_refinery_search_show_html_erb__141027100073112144_2203181120'
vendor/extensions/search/app/views/refinery/search/show.html.erb:7:in `each'
vendor/extensions/search/app/views/refinery/search/show.html.erb:7:in `_vendor_extensions_search_app_views_refinery_search_show_html_erb__141027100073112144_2203181120'
actionpack (3.2.2) lib/action_view/template.rb:143:in `block in render'
activesupport (3.2.2) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.2) lib/action_view/template.rb:141:in `render'
actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:42:in `block (2 levels) in render_template'
actionpack (3.2.2) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
activesupport (3.2.2) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.2) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:41:in `block in render_template'
actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:49:in `render_with_layout'
actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:40:in `render_template'
actionpack (3.2.2) lib/action_view/renderer/template_renderer.rb:13:in `render'
actionpack (3.2.2) lib/action_view/renderer/renderer.rb:36:in `render_template'
actionpack (3.2.2) lib/action_view/renderer/renderer.rb:17:in `render'
actionpack (3.2.2) lib/abstract_controller/rendering.rb:109:in `_render_template'
actionpack (3.2.2) lib/action_controller/metal/streaming.rb:225:in `_render_template'
actionpack (3.2.2) lib/abstract_controller/rendering.rb:103:in `render_to_body'
actionpack (3.2.2) lib/action_controller/metal/renderers.rb:28:in `render_to_body'
actionpack (3.2.2) lib/action_controller/metal/compatibility.rb:50:in `render_to_body'
actionpack (3.2.2) lib/abstract_controller/rendering.rb:88:in `render'
actionpack (3.2.2) lib/action_controller/metal/rendering.rb:16:in `render'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render'
activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `block in ms'
/Users/Nic/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
activesupport (3.2.2) lib/active_support/core_ext/benchmark.rb:5:in `ms'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:40:in `block in render'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime'
activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:39:in `render'
refinerycms-pages (2.0.1) lib/refinery/pages/instance_methods.rb:27:in `render'
actionpack (3.2.2) lib/action_controller/metal/implicit_render.rb:10:in `default_render'
actionpack (3.2.2) lib/action_controller/metal/implicit_render.rb:5:in `send_action'
actionpack (3.2.2) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.2) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.2) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.2) lib/active_support/callbacks.rb:447:in `_run__2503327464324143695__process_action__3473978403548058199__callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.2) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.2.2) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.2.2) lib/active_support/notifications.rb:123:in `block in instrument'
activesupport (3.2.2) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (3.2.2) lib/active_support/notifications.rb:123:in `instrument'
actionpack (3.2.2) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.2.2) lib/action_controller/metal/params_wrapper.rb:205:in `process_action'
activerecord (3.2.2) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (3.2.2) lib/abstract_controller/base.rb:121:in `process'
actionpack (3.2.2) lib/abstract_controller/rendering.rb:45:in `process'
actionpack (3.2.2) lib/action_controller/metal.rb:203:in `dispatch'
actionpack (3.2.2) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.2.2) lib/action_controller/metal.rb:246:in `block in action'
actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `call'
actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:67:in `dispatch'
actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:30:in `call'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call'
railties (3.2.2) lib/rails/engine.rb:479:in `call'
railties (3.2.2) lib/rails/railtie/configurable.rb:30:in `method_missing'
journey (1.0.3) lib/journey/router.rb:68:in `block in call'
journey (1.0.3) lib/journey/router.rb:56:in `each'
journey (1.0.3) lib/journey/router.rb:56:in `call'
actionpack (3.2.2) lib/action_dispatch/routing/route_set.rb:594:in `call'
airbrake (3.0.9) lib/airbrake/rack.rb:27:in `call'
lib/canonical_redirect.rb:11:in `call'
warden (1.1.1) lib/warden/manager.rb:35:in `block in call'
warden (1.1.1) lib/warden/manager.rb:34:in `catch'
warden (1.1.1) lib/warden/manager.rb:34:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/cookies.rb:338:in `call'
dragonfly (0.9.10) lib/dragonfly/cookie_monster.rb:9:in `call'
activerecord (3.2.2) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `_run__1720640446410079874__call__3076861498807562369__callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.2) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.2) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
dragonfly (0.9.10) lib/dragonfly/middleware.rb:13:in `call'
dragonfly (0.9.10) lib/dragonfly/middleware.rb:13:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.2) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.2) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.2) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
actionpack (3.2.2) lib/action_dispatch/middleware/static.rb:61:in `call'
airbrake (3.0.9) lib/airbrake/user_informer.rb:12:in `call'
railties (3.2.2) lib/rails/engine.rb:479:in `call'
railties (3.2.2) lib/rails/application.rb:220:in `call'
rack (1.4.1) lib/rack/content_length.rb:14:in `call'
railties (3.2.2) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.4.1) lib/rack/handler/webrick.rb:59:in `service'
/Users/Nic/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/Nic/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/Nic/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

undefined method `with_query'

After upgrading to refinerycms 2.1, i'm getting this error when trying to search:

NoMethodError - undefined method with_query' for #<Refinery::Page::FriendlyIdActiveRecordRelation:0x007fd7a9d973e8>: activerecord (3.2.14) lib/active_record/relation/delegation.rb:45:inmethod_missing'

Looks llike this issue: https://travis-lite.com/refinery/refinerycms-search/jobs/7725259

Versions:
gem "refinerycms", "~> 2.1.0"
gem "refinerycms-search", :git => "git://github.com/refinery/refinerycms-search.git"

body_content_title doesn't display in result page

We are not able to display this code on the layout of the result page :

<% content_for :body_content_title do %>
  <%= t('.search_results_for', :what => params[:query]) %>
<% end %>

Do you know how we could fix this bug ?

Undefined method 'today' for Date:Class on Heroku.

Recently started getting the following error when deploying to Heroku, right after finishing the bundle.

Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
There was a NoMethodError while loading refinerycms-search.gemspec:
undefined method `today' for Date:Class from
/tmp/build_5m0dy09tdayg/vendor/bundle/ruby/1.9.1/bundler/gems/refinerycms-search-4e5895b92f52/refinerycms-search.gemspec:4:in
`block in <main>'

The .gemspec line is:
s.date = "#{Date.today.strftime("%Y-%m-%d")}"

Locally it's working all right, using bundler 1.3.2. So I'm thinking it could be due whether to a change on Heroku side or maybe Bundler. Haven't found anything on that, yet.

Any idea on what might be causing this?

Problem in search show view with regex

Hello!

There is a problem with this line of code in the searches show view (Line 12):

<%= link_to raw(result.title.gsub(/(#{params[:query]})/i,'<mark>\1</mark>')), result_url(result) %>

When the query param contains regex like characters it goes nuts (of course).

Porblems - search page content

Hi
I can search page title, but I can search page content.
How should I do?
Or
there is docs I can follow up?
Thank You!!

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "refinerycms-acts-as-indexed":
  In Gemfile:
    refinerycms-search was resolved to 4.0.0, which depends on
      refinerycms-acts-as-indexed (~> 4.0)

Could not find gem 'refinerycms-acts-as-indexed (~> 4.0)', which is required by gem 'refinerycms-search', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "refinerycms-acts-as-indexed":
  In Gemfile:
    refinerycms-search was resolved to 4.0.0, which depends on
      refinerycms-acts-as-indexed (~> 4.0)

Could not find gem 'refinerycms-acts-as-indexed (~> 4.0)', which is required by gem 'refinerycms-search', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "friendly_id":
  In Gemfile:
    refinerycms was resolved to 4.1.0, which depends on
      refinerycms-pages (= 4.1.0) was resolved to 4.1.0, which depends on
        friendly_id-mobility (~> 0.5) was resolved to 0.5.5, which depends on
          friendly_id (>= 5.0.0, <= 5.4.0)

    refinerycms was resolved to 4.1.0, which depends on
      refinerycms-pages (= 4.1.0) was resolved to 4.1.0, which depends on
        friendly_id (>= 5.1.0, < 5.3)

Bundler could not find compatible versions for gem "refinerycms-acts-as-indexed":
  In Gemfile:
    refinerycms-search was resolved to 4.0.0, which depends on
      refinerycms-acts-as-indexed (~> 4.0)

Could not find gem 'refinerycms-acts-as-indexed (~> 4.0)', which is required by gem 'refinerycms-search', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

refinerycms-search 1.0.0 is not available in rubygems.org

The latest version of refinerycms-search available on rubygems.org website is 0.9.8.

Therefore including gem 'refinerycms-search', '~> 1.0.0' in the Gemfile results in this error message.

Could not find gem 'refinerycms-search (~> 1.0.0)' in any of the gem sources listed in your Gemfile.

Resave / Rebuild index

I've removed my index (rm -rf tmp/index) and am trying to save all my pages as referenced in the readme. Running

Refinery::Page.all(&:save)

Seems to work fine for the default translations, but not for any other translations being used. However, if I go to the refinery admin (/refinery) and navigate to a :es translated page and save it, it'll show up in the search results.

I've tried:

Refinery::PagePart.all.map(&:save)
Refinery::PagePart::Translations.all.map(&:save)

But none seem to work. Is there a way in the console to force the index of the translated pages??

this gem cripples elastic beanstalk deployment

by hosting the gem at github instead of rubygems.org, which is the recommended strategy by github themselves: http://gems.github.com/ this happens:

http://stackoverflow.com/questions/13642171/elastic-beanstalk-ruby-rails-need-to-install-git-so-bundle-install-works-but-i/13657473#13657473

the new ruby container option for elastic beanstalk is really nice: http://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git and i suspect many ruby devs will try it out, it's unfortunate that such a simple thing to fix makes refinerycms so needlessly complicated to deploy to such a significant platform.

Searching not working entirely...

Hi

I'm using this gem on an existing Refinery project. The project has a loads of custom engines, pretty standard stuff.

The "Point" engine has a "project_external_id" field.

# encoding: UTF-8

module Refinery
  module Wayfinders
    class Point < Refinery::Core::BaseModel
      acts_as_indexed :fields => [:number, :project_external_id]
    end
  end
end

In my local db, I have at least 10 records, with project_external_id set to "760".

But, when I try search for "760", I get no search results.

Then I try to search for ex. "714", which is another project_external_id, and then I get 1 result for "714", and the actually all the results for "760"

image

If I clear out the search, I can see all the records belonging to "714" just fine.

image

This doesn't make any sense.

On another version of the same app, running an earlier version of Refinery and therefore using refinery-search 2.1.0, then the search for "760" works just fine:

image

What is happening?

Kind regards

search with chinese not work

Hi,

I'm search at admin/pages with chinese, don't have any results when the title exactly the same.

sflx refinery

I capture the search result page and print the params below. Params[:search] not change to ascii.

gem 'refinerycms', '> 3.0'
gem 'refinerycms-acts-as-indexed', '
> 3.0'
gem 'refinerycms-search', github: 'refinery/refinerycms-search', branch: 'master'

Is not searching in Page parts

I have Latest refinery 0.9.8.9. I didn't change anything in page or pageparts models. But If I'm trying to search for a word which is included into PagePart I get empty result.

Should I do any extra manipulations?

Need a little help getting started

The instructions say:

You'll also need to create a page (from the 'Pages' tab) with a custom URL of '/search'. You can set a custom URL for a page in the Advanced Options.

By this do you mean to put "/search" in the "Forward this page to another website or page" field on the advanced options? I don't see a way to create a custom url.

Thanks!

Dave

error: cannot load refinerycms/tags

followed the instructions to add refinerycms-tags to an existing rails app with refinerycms. So, in Gemfile, I have
gem 'refinerycms-tags', '~> 1.0.0'
when I tried
rails generate refinerycms_tags
I got the error:
/home/hau/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:74:in `require': cannot load such file -- refinerycms/tags (LoadError)

Actually I got the same error when I
rails console

2.0.3 - the "Search" function appears to not display results under certain circumstances

The "Search" on the "Pages" tab appears to intermittently not display results. Using 2.0.3, fresh install, added pages as follows (no sidebar content on these test pages):

Title: tgh
Body: tgh

Title: Tgh
Body: Tgh

Title: TGH
Body TGH

Title: tghtgh
Body: tghtgh

Searching for "tgh" displays no results, however this is in the logs: https://gist.github.com/2286650

It appears the first 3 pages are being found, per this line:

SELECT "refinery_pages".* FROM "refinery_pages" WHERE (refinery_pages.id IN (5,6,7)) ORDER BY lft ASC

Conversely, a search for "tghtgh" shows the last page is being found (or so it seems):

SELECT "refinery_pages".* FROM "refinery_pages" WHERE (refinery_pages.id IN (8)) ORDER BY lft ASC

You can see from this screenshot, it doesn't display results:

http://i43.tinypic.com/35a9d2f.png

Draft pages appear in search results

Draft pages should not be shown to the general public, but they still appear in the search results. I couldn't find a good way to patch in a quick fix, so I am recording the issue here. It seems like SearchEngine or Page could provide a way to specify an initial scope for the search.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.