README.rdoc in xapian_db-1.2.4 vs README.rdoc in xapian_db-1.2.4.1
- old
+ new
@@ -149,10 +149,10 @@
If you use associations in your blueprints, it might be a good idea to specify a base query to speed up rebuild_xapian_index calls (avoiding 1+n queries):
XapianDb::DocumentBlueprint.setup(:Person) do |blueprint|
blueprint.index :addresses
- blueprint.base_query Person.includes(:addresses)
+ blueprint.base_query { |p| p.includes(:addresses) }
end
You can specify a natural sort order for each class using a method symbol or a block. If you don't specify an order expression in your xapian query, the matches
are ordered by relevance and - within the same relevance - by the natural sort order. If you don't specify the natural sort order, it defaults to id. Examples: