Skip to content

Instantly share code, notes, and snippets.

@raphaelcosta
Created February 16, 2011 01:20
Show Gist options
  • Save raphaelcosta/828653 to your computer and use it in GitHub Desktop.
Save raphaelcosta/828653 to your computer and use it in GitHub Desktop.
define_index('entry_with_morph') do
indexes entry_values.value_string , :as => :values_string
has entry_values.value_decimal, :as => :values_decimal
has entry_values.value_integer, :as => :values_integer
has entry_values.value_date, :as => :values_date
has entry_values.database_field(:id),:as => :values_database_field_id
has database(:id), :as => :database_id
has has_error, entry_number , merged, merged_entry_id
set_property :morphology => 'metaphone'
where "(`merged` = '0' OR `merged` = 'false')"
end
define_index('entry_without_morph') do
indexes entry_values.value_string , :as => :values_string_normal
where "(`merged` = '0' OR `merged` = 'false')"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment