Changes:
- Add set_max_expansion option
Changes:
- Update sidekiq version
Fixes:
- Improved the code that reads the
xapian_db.yml
file to allow aliases in the yml file when using Ruby 3.1 or higher.
Fixes:
XapianDb.execute_block
now usesThread.current[:xapian_db_block_writer]
to store its block-local writer as to avoid leaking into another Thread
Fixes:
- xapian docs are deleted in the after commit hook in order to respect transaction rollbacks
Changes:
- Instantiation of a BigDecimal using 'BigDecimal.new()' has been replaced with the new format 'BigDecimal() -- this is compatible with BigDecimal v1.4.x and v2.0.x AND drops support for BigDecimal v1.3.5'
NOTE: Dropping support for BigDecimal v1.3.5 also drops the support of Ruby 2.2.x and earlier versions of Ruby.
Changes:
- add support for ruby > 2.3.x
Changes:
- changed ownership
Changes:
- Allow access to configured blueprints through XapianDb::DocumentBlueprint
Breaking Changes:
- search methods accept either a limit option OR page / per_page options, not both
Fixes:
XapianDb.database.delete_docs_of_class(klass)
now deletes docs of all descendants ofklass
, too (if tracked)
Changes:
- Ability to declare dependenices between blueprints
- Support for result ordering
- added a indexer preprocess callback to manipulate the terms that the indexer will index
Changes:
- The required Ruby version is now 2.0.0 since we started using keyword parameters in method definitions
- Ability do define and handle dependencies between blueprints (see README)
- explicit order option for searches
Fixes:
- path to database fixed in railtie
- fix for xapian > 1.2.15
Fixes:
- retry the search when a Xapian::DatabaseModifiedError occurs
Fixes:
- total_pages are calculated correctly when a limit option is passed (Thanks, Jan)
- fix for will_paginate support
Fixes:
- namespaced models work again with rails 4
Changes:
- Rails4 deprecation resolved
- licence information added tot the gemspec
Changes:
- support for sidekiq queues
Fixes:
- injected logical operators must be upper case in order to support Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE set to false
Changes:
- xapian query parser flags are now configurable (see README)
Breaking Changes:
- enable_phrase_search config option is no longer supported (use config.enable_query_flag Xapian::QueryParser::FLAG_PHRASE instead)
Changes:
- new no_split option for attributes and indexes; useful if you use a global term_splitter_count but want to disable splitting for a certain attribute
Fixes:
- json codec handles nil values gracefully
Breaking Changes:
- changed the internal serialization format for attributes; the new default is string, new codecs were added. YAML is not supported anymore, although you could implement a YAML-Codec on your own if you need it (see examples/custom_serialization.rb)
Changes:
- New option to enable / disable phrase search support
- term splitter option to boost "live queries" (see README)
Changes:
- Define the min length a term must have to make it into the index (see README)
- define if a method should be indexed with its method name so you can do field searches (e.g. name:kogler); defaults to true
Fixes:
- query result creation optimized (lower memory footprint, better performance)
Fixes:
- database reset removed since it has concurrency problems
Changes:
- progressbar gem replaced by ruby-progressbar
- XapianDb.rebuild_xapian_index resets the database to remove any stale index data
Fixes:
- Fixes requiring the environment when calling rake. Prevented eg creation of the database using rake db:create
Fixes:
- do not add attributes with null values to a document
Fixes:
- handle null values on date and datetime attributes correctly
Changes:
- access the attributes of a xapian document as a hash table (like active record)
Fixes:
- better indexing for attributes containing arrays (index rebuild recommended)
Features:
- Codec for DateTime objects added
- autoindex option for blueprints added
Fixes:
- the ActiveRecord after_commit hook must not reindex the object if it is a destroy action
Changes:
- avoid eager loading of model classes in a rails app. The blueprint configuration file (xapian_blueprints.rb) caused all referenced classes to get loaded and parsed on every request. While not a problem in production environments, it could be a huge performance hit in development (especially when using the asset pipleline with many assets). The solution is based on the proof of concept by Yves Senn. Simply use symbols or strings instead of the classes in your xapian_blueprints.rb and wrap base_queries inside a block. See the README for updated informations on how to configure blueprints.
- added a rails example app using datamapper
- added a rake task to rebuild the index
- internal refactorings / optimizations
Changes:
- removed dependency to xapian-ruby to allow custom installs of the xapian binaries (see chapter Installing xapian binaries in the README)
Fixes:
- always use the correct table name for order clauses when indexing
- allow nil values for attributes declared :as => :date
- lazy load queue writers (beanstalk_writer, resque_writer) when needed
Features:
- resultset accepts limit and paging options as strings
- added natural sort order option for blueprints (see README for details)
IMPORTANT: FULL INDEX REBUILD REQUIRED FOR THIS RELEASE!
Fixes:
- resque writer wasn't loaded when beanstalk wasn't installed (thanks, javierv)
Fixes:
- removed explicit dependency on resque
Fixes:
- find_similar_to supports the :limit option
Features:
- new index worker / writer for resque (thanks, Michael)
- support for namespaced models (thanks, Albert)
Fixes:
- removed loading of the deprecated rake task from the railtie
Fixes:
- weight option for attributes and indexed values was not correctly applied
Fixes:
- beanstalk_work flushes log messages (reinstall the worker script: rails generate xapian_db:install)
Features:
- massive performance optimization in rebuild_xapian_index
Fixes:
- fixed a bug in XapianDb.rebuild_xapian_index that did not index all records of a klass; it ist highly recommended to run Xapian.rebuild_xapian_index after installing this version
Features:
- base query option for blueprints; may speed up reindexing signifiantly if you index associations
Fixes:
- better handling of the beanstalk-client dependency
- recreate the xapian index database if the configured path exists but does not contain a valid xapian index
- support for non-integer primary keys (removed unneccesary to_i conversion)
Features:
- rails sample app upgraded to 3.1
- support for value range queries (strings, dates, numbers)
- sorting now works on a global query, too (XapianDb.search...)
- global factes queries have now the same options like class scoped facet queries
- Support for custom serialization into xapian documents; overwrite the serialization implementation in type_codec.rb or implement your own serialization for specific types (see examples/custom_serialization.rb)
- support to reindex a single object while evaluation an ignore_if block (if present)
IMPORTANT: YOU MUST REBUILD YOUR XAPIAN INDEX DATABASE SINCE THE INDEX STRUCTURE HAS CHANGED!
Features:
- find similar documents based on one or more reference documents
Features:
- faster install if the new, dependent gem containig xapian (xapian-ruby) is already installed
Fixes:
- fixed an issue in the beanstalk worker (delete task could not retrieve the xapian id from an already deleted object)
Fixes:
- handle attribute objects that return nil from to_s
Features:
- updated the xapian source to 1.2.6
- xapian source and build artefacts are removed after successful install
- added support for namespaced classes
Fixes:
- avoid stale blueprint setups when an indexed class is reloaded
Features:
- XapianDb.search accepts all options supported by XapianDb::Database.search
- Rails log entries include query execution time
- small changes to the beanstalk worker error handling
Features:
- the beanstalk worker is now implemented as a daemon script (execute 'rails generate xapian_db:install' to install it)
- execute a block with auto indexing disabled (see 'Bulk inserts / updates / deletes' in teh README)
- updated the xapian source to version 1.2.5
Fixes:
- indexing was broken in 0.5.8
Fixes:
- automatic reindexing of a changed object now works when using beanstalk and the worker rake task
Features:
- support for transactions (see the README for details)
Fixes:
- limit_value on the resultset is calculated again when the resultset is empty (thanks, Javi)
- added an order by id for rebuild_xapian_index to ensure that limit and offset work as expected
Features:
- option to specify a specific adapter for a blueprint overriding the global configuration
Features:
- documents returned by a query have the new score property that reflects the match relevance in percent (1-100%)
- added compatibility to the kaminari pagination gem (thanks, Javi)
- added support for phrase searches (XapianDb.search('"this exact sentence"'))
Fixes:
- ":memory:" as a configuration option for a database works again (was broken in 0.5.4)
- forcing utf-8 encoding on a spelling suggestion returned by the xapian query parser
Features:
- configure only those environments in xapian_db.yml where you want to override the defaults
- XapianDb.rebuild_xapian_index rebuilds the index for all blueprints
Fixes:
- relative database paths in the config file are resolved correctly when the Rails server is started as a daemon (-d)
Breaking Changes:
- the spelling suggestion of a query is now nil instead of an empty string if no suggestions were returned from xapian
- the resultset class (what you get back from a query) has been refactored for easier handling. See the README ("Process the results") for details
Fixes:
- index blueprints can now handle inheritance. If a class does not have its own index blueprint, xapian_db uses the index blueprint from its super class (if defined)
- Added an ignore option to the blueprint definition to filter out objects that should not go into the index
Features:
- xapian-core and xapian-ruby-bindings sources are now included and will be compiled and installed with the gem
Features:
- simple facet support for indexed classes. Any attribute can be used in a facet search
Fixes:
- attribute names that match a Xapian::Document method are not allowed
Features:
- beanstalk based index writer for production environments (multiple app instances, e.g. mongrel clusters, passenger...)
Features:
- added a sample rails application to the repo
- added the id attribute for documents based on ActiveRecord and Datamapper objects
Changes:
- removed the language_method option from the blueprint configuration since it gives unpredictable results
Bugfixes:
- fixed the initialization error in a Rails app if there is no xapian_db.yml config file
- fixed the fallback to the global language when a model has an unsupported language and a language method is configured in the blueprint
- fixed an issue with yaml deserialization of ActiveRecord objects (only the attributes hash should be serialized)
Bugfixes:
- fixed the handling of invalid page arguments in resultset.paginate. Invalid page arguments return an empty result set
- searches with an empty search expression do not raise an exception anymore and return an empty resultset
Features:
- Simple facets implementation. The only facet supported is the class name of the indexed objects
- Support for sorting (only for class searches, not for global searches)
- The result of a search can be used with will_paginate
Bugfixes:
- removed the class scope expression from the spelling suggestion when searching on a class
- keys of the attributes and index hashes are now sorted to be compatible with ruby 1.8 (which does not preserve the order of the keys in a hash)
- Fixed the problem that blueprint configurations got lost after the first request in the development env (Rails only). You should put your blueprints either into a class that is loaded by Rails or into the file config/xapian_blueprints.rb wich is loaded automatically by XapianDb
Since the internal structure of the index has changed, you must reindex your objects if you come from an earlier version of XapianDb!
Features:
- perform searches on indexed classes to scope the search to objects of a specific class
- specify multiple blueprint attributes and index methods in one statement (without specifying options)
- use blocks for complex attribute or index specifications
Changes:
- changed the implementation of Resultset.size to get more accurate estimations
- changed the indexing of active_record or datamapper models when declared as attributes or indexes in a blueprint (indexes now all attributes of the object instead of using to_s)
Features:
- Support for multi language stop words. The implementation was inspired by John Leachs xapian-fu gem
- Support for query spelling correction (similar to Google's 'did you mean...'). This feature is only available for persistent databases (due to a limitation of Xapian)
Changes:
- Languages must be configured by the iso language code (:en, :de, ...). No more support for the english language names (:english, :german, ...)
- Reduced the memory footprint when reindexing large tables
Features:
- Moved the per_page option from Resultset.paginate to Database.search
- Added support for language settings (global and dynamic per object)
- Added support for xapian stemmers
- Removed the dependency to progressbar (but it is still used if available)
- Made the rebuild_xapian_index method silent by default (use :verbose => true to get status info)
Bugfixes:
- Fixed the gemspec
Features:
- Rails integration with configuration file (config/xapian_db.yml) and automatic setup
Features:
- Blueprint configuration extended
- Adapter for Datamapper
- Search by attribute names
- Search with wildcards
- Document attributes can carry anything that is serializable by YAML
Proof of concept, not really useful for real world usage