Hey there,
I am pretty sure I am doing something wrong, but for some reason new
entries/instances of a model which has the delta-index declaration
included do not show up in a generic, empty ("") search on that
model...
The ts declaration is like that:
define_index do
indexes title, :sortable => true
indexes cached_plaintext_question, :as => :question
indexes answers.cached_plaintext_body, :as => :answers
indexes cached_tag_list, :as => :tags
indexes user.name, :as => :user
indexes answered_by, user_id
has created_at
has answers(:id), :as => :answer_ids
set_property :delta => true
end
Now after creating a new new question (that's the model that's being
indexed/searched), and going back to the controller's index, which has
the following search code:
@search_options = {
:page => (params[:page] || 1),
:per_page => Question.per_page,
:include => :user,
:order => "created_at DESC",
:match_mode => :extended
}
@questions = Question.search((params[:search] || ""), @search_options)
.... @questions does not contain this new instance mentioned above,
but does after a full (re-)index.
Why's that?
Cheers, thanks & merry x-mas to everyone :)
-Jörg
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---