Hello Dave, Hello all, I''ve got this error because I try to search something and sort it by name : Argument Error occured at <except.c>:93 in xraise Error occured in sort.c:551 - field_cache_get_index Cannot sort by field "name". It doesn''t exist in the index. The problem, occur when my index is empty, so the field "name" does not exists. -- Florent -- Posted via http://www.ruby-forum.com/.
Excerpts from Florent Solt''s message of Fri Mar 02 07:25:16 -0800 2007:> Argument Error occured at <except.c>:93 in xraise > Error occured in sort.c:551 - field_cache_get_index > Cannot sort by field "name". It doesn''t exist in the index. > > The problem, occur when my index is empty, so the field "name" does not > exists.What version of Ferret are you using? I submitted a patch for this a few months ago that Dave committed, though I''m not sure to which version. -- William <wmorgan-ferret at masanjin.net>
William Morgan wrote:> Excerpts from Florent Solt''s message of Fri Mar 02 07:25:16 -0800 2007: >> Argument Error occured at <except.c>:93 in xraise >> Error occured in sort.c:551 - field_cache_get_index >> Cannot sort by field "name". It doesn''t exist in the index. >> >> The problem, occur when my index is empty, so the field "name" does not >> exists. > > What version of Ferret are you using? I submitted a patch for this a few > months ago that Dave committed, though I''m not sure to which version.I''m using 0.11.2. -- Posted via http://www.ruby-forum.com/.
Excerpts from Florent Solt''s message of Fri Mar 02 09:43:23 -0800 2007:> >> The problem, occur when my index is empty, so the field "name" does not > >> exists. > > > > What version of Ferret are you using? I submitted a patch for this a few > > months ago that Dave committed, though I''m not sure to which version. > > I''m using 0.11.2.Ok, I''m actually thinking of a patch for a similar, but different issue. In this case Ferret''s behavior actually strikes me as correct. You haven''t defined the field, right? Does the error still occur with an empty index but where the field has been defined, e.g. via FieldInfos#create_index? -- William <wmorgan-ferret at masanjin.net>
On 3/5/07, William Morgan <wmorgan-ferret at masanjin.net> wrote:> Excerpts from Florent Solt''s message of Fri Mar 02 09:43:23 -0800 2007: > > >> The problem, occur when my index is empty, so the field "name" does not > > >> exists. > > > > > > What version of Ferret are you using? I submitted a patch for this a few > > > months ago that Dave committed, though I''m not sure to which version. > > > > I''m using 0.11.2. > > Ok, I''m actually thinking of a patch for a similar, but different issue. > > In this case Ferret''s behavior actually strikes me as correct. You > haven''t defined the field, right? Does the error still occur with an > empty index but where the field has been defined, e.g. via > FieldInfos#create_index?Hi Florent, I agree with William here. I think the behavior is correct as it is impossible to sort by a field which doesn''t exist. However, it was an extra line of code to make searches return an empty result set no matter what when the index is empty so I added it. You should no longer be getting a exception in this situation in 0.11.3. Cheers, Dave -- Dave Balmain http://www.davebalmain.com/