Hi Pat,

I'm constantly rebuilding...
This is my define_index block:

define_index do
        indexes :grade, :sortable => true
        indexes :EC, :sortable => true
        indexes self.school_class.title, :as
=> :school_classname, :sortable => true
        indexes self.subject.title, :as => :subjectname, :sortable =>
true
        indexes :semester, :sortable => true
        indexes :periode, :sortable => true
        indexes :created_at, :sortable => true
        indexes "DATE_FORMAT(assessments.created_at,'%Y%m%d%H%M
%S')", :as => :created_at_condensed, :sortable => true
        indexes :type, :sortable => true
        indexes
[self.student.firstname,self.student.prefix,self.student.lastname], :as
=> :student_fullname, :sortable => true
        indexes self.student.lastname, :as
=> :student_lastname, :sortable => true
        indexes "DATE_FORMAT(assessments.created_at,'%d-%m-%Y')", :as
=> :creation_date_european
        indexes
[self.person.firstname,self.person.prefix,self.person.lastname], :as
=> :person_fullname, :sortable => true
        indexes self.person.lastname, :as
=> :person_lastname, :sortable => true
        has :id, :as => :assessment_id
        has "IF(STRCMP(assessments.type,'CollectiveAssessment'),
0,1)",:type => :integer, :as => :is_collective_assessment
        has "IF(DATE_FORMAT(assessments.assessed_at,'%m') > 9,
CONCAT(DATE_FORMAT(assessments.assessed_at,'%Y'),DATE_FORMAT(assessments.assessed_at,'%Y')
+1),
CONCAT(DATE_FORMAT(assessments.assessed_at,'%Y')-1,DATE_FORMAT(assessments.assessed_at,'%Y')))
",:type => :integer, :as => :school_year
        has :created_at, :as => :assessment_created_at
        has :grade, :as => :assessment_grade
        has :EC, :type => :integer, :as => :assessment_EC
        has :periode, :type => :integer, :as => :assessment_periode
        has :semester,:type => :integer, :as => :assessment_semester
        set_property :delta => :delayed
    end

Thank you!

Melissa

On Jun 4, 8:53 pm, Pat Allan <[email protected]> wrote:
> Hi Melissa
>
> Can you share what your define_index block looks like?
>
> Also, have you restarted *and* reindexed Sphinx on your test server since 
> making index structure changes? This can be done with the ts:rebuild task.
>
> Cheers
>
> --
> Pat
>
> On 04/06/2011, at 7:07 PM, melissa wrote:
>
>
>
>
>
>
>
> > To solve the sorting problem I used an attribute, which worked in
> > development.
> > But now I get in the test environment: index assessment_delta: sort-by
> > attribute 'created_at_sort' not found
>
> > Basically, what is happening I think, is that the attributes are not
> > being recognised. I think that this could potentially explain both
> > my :sphinx_select and my current sort-by attribute problem, since both
> > depend apon an attribute.
>
> > Is the only way to solve this to switch environment?
>
> > Melissa
>
> > On Jun 4, 1:33 pm, melissa wrote:
> >> About what I thought was caching is actually a sorting problem.
> >> All the results are there, just not in the right order. I'll post the
> >> solution if I can find it.
>
> > --
> > 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 
> > athttp://groups.google.com/group/thinking-sphinx?hl=en.

-- 
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.

Reply via email to