-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fuzzy search and custom analysis #7
Merged
datenimperator
merged 9 commits into
refinerycms-contrib:master
from
bricesanchez:master
Nov 23, 2015
Merged
Add fuzzy search and custom analysis #7
datenimperator
merged 9 commits into
refinerycms-contrib:master
from
bricesanchez:master
Nov 23, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm working to fix the specs, it's not yet ready to be merged. |
I'm not able to fix the tests, my last work is this : # spec/features/index_context_spec.rb
require "spec_helper"
module Refinery
describe "elasticsearch index", type: :feature do
let(:home_page_title) { 'Home' }
let(:home_page) { Page.create(title: home_page_title) }
before do
Elasticsearch.setup_index(delete_first:true)
# Stub the menu pages we're expecting
::I18n.default_locale = Globalize.locale = :en
allow(Page).to receive(:fast_menu).and_return([home_page])
end
context "on create" do
it "displays the Home result" do
visit refinery.elasticsearch_search_path(q: home_page_title)
within "#search-results" do
expect(page).to have_content(home_page_title)
end
end
end
context "on update" do
let(:home_page_title_updated) { "#{home_page_title} updated" }
before do
home_page.update(title: home_page_title_updated)
end
it "displays the Home updated result" do
visit refinery.elasticsearch_search_path(q: home_page_title_updated)
within "#search-results" do
expect(page).to have_content(home_page_title_updated)
end
end
end
end
end I always have no results, i think elasticsearch doesn't now what is indexed |
It's ready to be reviewed and merged :) |
@datenimperator Do you have time to review this PR ? |
datenimperator
added a commit
that referenced
this pull request
Nov 23, 2015
Add fuzzy search and custom analysis
Thanks ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.