Hey guys,
sorry for the double-posting, but i think i left out a relevant piece
of information:
I can do the following query in "ruby script/console":
[1] Track.search 'guitar', :page => 1, :per_page => 4, :conditions
=> {:title => "Goodnight Bad Morning"}
which yields exactly the results i expected.
But still something like:
[2] Track.search 'guitar', :page => 1, :per_page => 4, :conditions
=> {:beat => true}
yields 0 results.
So, since [1] is successful and [2] not, i guess it has something to
do with my model / migration:
Here is my complete migration:
class CreateTracks < ActiveRecord::Migration
def self.up
create_table :tracks do |t|
t.string :artist
t.string :title
t.column :content, :mediumblob
t.integer :track_length
t.text :tags
t.text :short_description
t.text :full_description
# if no information is entered, we set it to id=1, which means
'no selection'
t.integer :descriptive_speed_id, :default => 1
t.integer :exact_speed, :default => 1
t.integer :bitrate
t.integer :category_id
t.boolean :loop, :default => false
t.boolean :beat, :default => false
t.boolean :vocals, :default => false
t.timestamps
end
end
And here is the relevant part of my model:
define_index do
# enable keyword search 'tags', 'artist','title',
'short_description', 'full_description'
indexes tags, :sortable => true
indexes short_description, :sortable => true
indexes full_description, :sortable => true
indexes artist, :sortable => true
indexes title, :sortable => true
# enable wildcard-search
set_property :enable_star => true
set_property :min_prefix_len => KEYWORD_SEARCH_MIN_PREFIX_LEN
has track_length
has exact_speed
end
The only difference is, that i have no index defined for the field
"beat" (not sure if that is needed?).
Anyway, i added
indexes beat, :sortable => true
to the above index-section, rebuilded the index, but still -> no
results.
What am i missing here?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---