Permalink
Browse files

releasing 0.2.4

  • Loading branch information...
1 parent f3ba992 commit 4bbd535622603ab12d3eec01ee7b3a61fbc7b88d @ryanb committed Jun 23, 2009
Showing with 10 additions and 5 deletions.
  1. +3 −0 CHANGELOG
  2. +1 −1 Rakefile
  3. +2 −1 lib/xapit/adapters/abstract_adapter.rb
  4. +4 −3 lib/xapit/index_blueprint.rb
View
@@ -1,5 +1,8 @@
+*0.2.4* (June 23rd, 2009)
+
* only create/update record in index if it matches xapit find conditions
+
*0.2.3* (June 18th, 2009)
* adding compatability with Xapit Sync
View
@@ -2,7 +2,7 @@ require 'rubygems'
require 'rake'
require 'echoe'
-Echoe.new('xapit', '0.2.3') do |p|
+Echoe.new('xapit', '0.2.4') 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"
@@ -27,7 +27,8 @@ def self.for_class?(member_class)
end
# Fetch a single record by the given id.
- def find_single(id)
+ # The args are the same as those passed from the XapitMember#xapit call.
+ def find_single(id, *args)
raise "To be implemented in subclass"
end
@@ -93,13 +93,14 @@ def position_of_field(field_attribute)
index + facets.size + sortable_attributes.size
end
- # Add a single record to the index
+ # Add a single record to the index if it matches the xapit options.
def create_record(member_id)
member = @member_class.xapit_adapter.find_single(member_id, *@args)
@indexer.add_member(member) if member
end
- # Update a single record in the index
+ # Update a single record in the index. If the record does not match the xapit
+ # conditions then it is removed from the index instead.
def update_record(member_id)
member = @member_class.xapit_adapter.find_single(member_id, *@args)
if member
@@ -109,7 +110,7 @@ def update_record(member_id)
end
end
- # Remove a single record from the index
+ # Remove a single record from the index.
def destroy_record(member_id)
Xapit::Config.writable_database.delete_document("Q#{@member_class}-#{member_id}")
end

0 comments on commit 4bbd535

Please sign in to comment.