Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

releasing 0.2.3

  • Loading branch information...
commit fe6af8c962f933c8c881156bf75f1d7c248b4d6a 1 parent 78ab3eb
@ryanb authored
Showing with 15 additions and 1 deletion.
  1. +9 −0 CHANGELOG
  2. +1 −1  Rakefile
  3. +5 −0 lib/xapit/index_blueprint.rb
View
9 CHANGELOG
@@ -1,3 +1,12 @@
+*0.2.3* (June 18th, 2009)
+
+* adding compatability with Xapit Sync
+
+* adding create/update/destroy record methods for modifying a single record in index
+
+* allow ranges to be specified in conditions array
+
+
*0.2.2* (June 16th, 2009)
* performance improvements
View
2  Rakefile
@@ -2,7 +2,7 @@ require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('xapit', '0.2.2') do |p|
+Echoe.new('xapit', '0.2.3') do |p|
p.summary = "Ruby library for interacting with Xapian, a full text search engine."
p.description = "Ruby library for interacting with Xapian, a full text search engine."
p.url = "http://github.com/ryanb/xapit"
View
5 lib/xapit/index_blueprint.rb
@@ -79,26 +79,31 @@ def index_all
end
end
+ # The Xapian value index position of a sortable attribute
def position_of_sortable(sortable_attribute)
index = sortable_attributes.map(&:to_s).index(sortable_attribute.to_s)
raise "Unable to find indexed sortable attribute \"#{sortable_attribute}\" in #{@member_class} sortable attributes: #{sortable_attributes.inspect}" if index.nil?
index + facets.size
end
+ # The Xapian value index position of a field attribute
def position_of_field(field_attribute)
index = field_attributes.map(&:to_s).index(field_attribute.to_s)
raise "Unable to find indexed field attribute \"#{field_attribute}\" in #{@member_class} field attributes: #{field_attributes.inspect}" if index.nil?
index + facets.size + sortable_attributes.size
end
+ # Add a single record to the index
def create_record(member_id)
@indexer.add_member(@member_class.xapit_adapter.find_single(member_id))
end
+ # Update a single record in the index
def update_record(member_id)
@indexer.update_member(@member_class.xapit_adapter.find_single(member_id))
end
+ # Remove a single record from the index
def destroy_record(member_id)
Xapit::Config.writable_database.delete_document("Q#{@member_class}-#{member_id}")
end
Please sign in to comment.
Something went wrong with that request. Please try again.