The plugin begins to suffer from it's very very specific options
syntax. This is not very user friendly. I'd prefer an options
syntax wich takes out the xapian specific stuff and adds some more
flexiblity.
In my opinion the an aax-index could be specified this way:
class WhateverClass < ActiveRecord::Base
acts_as_xapian do
# just index one or more fields as text
index :column1, :column2, :column3
# index one field with specific options
index :column4, :prefix => 'title', :sortable => true
# index one or multiple fields as sortables only. do not index them as text.
index :column2, :column3, :as => :sortable
# index one or multiple fields as values for range searching.
index :column5, :column6, :as => :value
end
end
The biggest problem is the xapian specific way to handle terms
and values. In order to index a term or value you have to give
xapian an identifier for them, so they can be stored seperately
from other terms. And the query parser needs to know wich term maps
to wich identifier.