README.rdoc in xapian_db-1.3.2 vs README.rdoc in xapian_db-1.3.3

- old
+ new

@@ -1,16 +1,7 @@ = XapianDb -{<img src="https://secure.travis-ci.org/garaio/xapian_db.png" />}[http://travis-ci.org/garaio/xapian_db] - -== Important Information - -Version 1.3 does not support YAML serialization for attributes anymore. If you don't apply a type information for an attribute (like attribute :birth, as: :date) in your blueprint, -the attribute gets stored as a string. The new preferred type for complex attributes is JSON. Why the change? We were experiencing a unacceptable performance hit when we switched from Syck to Psych. The new philosophy for blueprints is therefore explicit type information. lib/type_codec.rb contains the most common codecs and of course, you can add your own (see examples/custom_serialization.rb). - -<b>Please note: You may want to fine tune your blueprints and you MUST rebuild your xapian index when switching to version 1.3</b> - == What's in the box? XapianDb is a ruby gem that combines features of nosql databases and fulltext indexing into one piece. The result: Rich documents and very fast queries. It is based on {Xapian}[http://xapian.org/], an efficient and powerful indexing library. XapianDb is inspired by {xapian-fu}[https://github.com/johnl/xapian-fu] and {xapit}[https://github.com/ryanb/xapit]. @@ -71,10 +62,11 @@ # XapianDb configuration defaults: &defaults adapter: datamapper # Avaliable adapters: :active_record, :datamapper language: de # Global language; can be overridden for specific blueprints term_min_length: 2 # Ignore single character terms + enable_query_flags: FLAG_PHRASE, FLAG_SPELLING_CORRECTION development: database: db/xapian_db/development <<: *defaults @@ -89,13 +81,23 @@ ==== Available options - adapter: :active_record|:datamapper, default: :active_record - language: any iso language code, default: :none (activates spelling corrections, stemmer and stop words if an iso language code ist set) - term_min_length: <n>, default: 1 (do not index terms shorter than n) - - enable_phrase_search: true|false, default: false (see the xapian docs for an intro to phrase searching) - term_splitter_count: <n>, default: 0 (see chapter Term Splitting) + - enable_query_flags: <list of flags, separated by colons> + - disable_query_flags: <list of flags, separated by colons> + The following query flags are enabled by default: + + - FLAG_WILDCARD + - FLAG_BOOLEAN + - FLAG_BOOLEAN_ANY_CASE + - FLAG_SPELLING_CORRECTION + + See the xapian docs for all available query flags + If you do not configure settings for an environment in this file, xapian_db applies the defaults. === Configure an index blueprint In order to get your models indexed, you must configure a document blueprint for each class you want to index. You can pass the class name as a @@ -246,10 +248,10 @@ You can query objects of a specific class: results = Person.search "name:Foo" -You can search for exact phrases: +You can search for exact phrases (if the query flag is turned on): results = XapianDb.search('"this exact sentence"') If you want to paginate the result, pass the :per_page argument: