Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

releasing 0.2.4

  • Loading branch information...
commit 4bbd535622603ab12d3eec01ee7b3a61fbc7b88d 1 parent f3ba992
@ryanb authored
View
3  CHANGELOG
@@ -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  Rakefile
@@ -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"
View
3  lib/xapit/adapters/abstract_adapter.rb
@@ -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
View
7 lib/xapit/index_blueprint.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.