Mattias Bud
2007-Jun-08 11:29 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Hi I use Ferret 0.11.4 and the latest stabel version of the acts_as_ferret plugin. To the issue. if I do Model.rebuild_index and after that try to update one of my objects of that Model I get: File Not Found Error occured at <except.c>:117 in xpop_context Error occured in fs_store.c:329 - fs_open_input tried to open "/Users/mattias/Sites/thm/photo_archive/index/development/asset/_b.cfs" but it doesn''t exist: <No such file or directory> If I delete the entire index folder and update again it works fine. it breaks only if I do Model.rebuild_index. Any suggestions? -- Posted via http://www.ruby-forum.com/.
Mattias Bud
2007-Jun-08 11:32 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
More info: I can also make it work by doing. Model.rebuild_index Model.find_by_contents Then i can update/save a record again. -- Posted via http://www.ruby-forum.com/.
Benjamin Krause
2007-Jun-08 11:39 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
On 2007-06-08, at 1:29 PM, Mattias Bud wrote:> To the issue. if I do Model.rebuild_index and after that try to update > one of my objects of that Model I get: > > File Not Found Error occured at <except.c>:117 in xpop_context > Error occured in fs_store.c:329 - fs_open_input > tried to open > "/Users/mattias/Sites/thm/photo_archive/index/development/asset/ > _b.cfs" > but it doesn''t exist: <No such file or directory> > > If I delete the entire index folder and update again it works fine. it > breaks only if I do Model.rebuild_index.hey .. sounds like you had another process access/modify the index.. did you try it with the ferret drb server? Ben
Mattias Bud
2007-Jun-08 11:41 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Benjamin Krause wrote:> On 2007-06-08, at 1:29 PM, Mattias Bud wrote: > >> If I delete the entire index folder and update again it works fine. it >> breaks only if I do Model.rebuild_index. > > hey .. sounds like you had another process access/modify the > index.. did you try it with the ferret drb server? > > BenNo - local index. -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jun-08 11:58 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
On Fri, Jun 08, 2007 at 01:41:34PM +0200, Mattias Bud wrote:> Benjamin Krause wrote: > > On 2007-06-08, at 1:29 PM, Mattias Bud wrote: > > > >> If I delete the entire index folder and update again it works fine. it > >> breaks only if I do Model.rebuild_index. > > > > hey .. sounds like you had another process access/modify the > > index.. did you try it with the ferret drb server? > > > > Ben > > No - local index.is this in development mode with 1 mongrel instance? if yes, make sure your Mongrel doesn''t do index updates while you run rebuild_index from the console. Even better, run these tests without mongrel running, or in another RAILS_ENV. With multiple mongrels, use the DRb server. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
Mattias Bud
2007-Jun-08 12:03 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Jens Kraemer wrote:> On Fri, Jun 08, 2007 at 01:41:34PM +0200, Mattias Bud wrote: >> >> No - local index. > > is this in development mode with 1 mongrel instance? if yes, make sure > your Mongrel doesn''t do index updates while you run rebuild_index from > the console. Even better, run these tests without mongrel running, or in > another RAILS_ENV. > > With multiple mongrels, use the DRb server. > > JensI turned of mongrel and rebuilt - and it worked. Thanks for the help -- Posted via http://www.ruby-forum.com/.
Mattias Bud
2007-Jun-14 16:35 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Mattias Bud wrote:> Jens Kraemer wrote: >> On Fri, Jun 08, 2007 at 01:41:34PM +0200, Mattias Bud wrote: >>> >>> No - local index. >> >> is this in development mode with 1 mongrel instance? if yes, make sure >> your Mongrel doesn''t do index updates while you run rebuild_index from >> the console. Even better, run these tests without mongrel running, or in >> another RAILS_ENV. >> >> With multiple mongrels, use the DRb server. >> >> Jens > > I turned of mongrel and rebuilt - and it worked. > > Thanks for the helpWhen moving this to the production server it fails again. Here i have the same vesion of the gem and plug-in. The server runs lighttpd and fast-cgi. i can''t re-index this class if it has :index => :no. if I remove this from the :fields it works again. Looks like this acts_as_ferret({:store_class_name => true, :fields => { :title => {}, :date_comment_index => {:index => :no} } }, { :analyzer => Ferret::Analysis::StandardAnalyzer.new([]) }) As I said, if i remove :index => :no it works. Is the solution to change to DRb? mattias -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jun-15 07:38 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
On Thu, Jun 14, 2007 at 06:35:12PM +0200, Mattias Bud wrote:> Mattias Bud wrote: > > Jens Kraemer wrote: > >> On Fri, Jun 08, 2007 at 01:41:34PM +0200, Mattias Bud wrote: > >>> > >>> No - local index. > >> > >> is this in development mode with 1 mongrel instance? if yes, make sure > >> your Mongrel doesn''t do index updates while you run rebuild_index from > >> the console. Even better, run these tests without mongrel running, or in > >> another RAILS_ENV. > >> > >> With multiple mongrels, use the DRb server. > >> > >> Jens > > > > I turned of mongrel and rebuilt - and it worked. > > > > Thanks for the help > > When moving this to the production server it fails again. Here i have > the same vesion of the gem and plug-in. The server runs lighttpd and > fast-cgi. i can''t re-index this class if it has :index => :no. if I > remove this from the :fields it works again. > > Looks like this > acts_as_ferret({:store_class_name => true, > :fields => { :title => {}, > :date_comment_index => {:index => :no} > } > }, { :analyzer => > Ferret::Analysis::StandardAnalyzer.new([]) }) > > As I said, if i remove :index => :no it works. > > Is the solution to change to DRb?At least you should give it a try. However I cannot imaging how having a field indexed or not should influence rebuilding. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
Mattias Bud
2007-Jun-15 09:17 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Jens Kraemer wrote:> On Thu, Jun 14, 2007 at 06:35:12PM +0200, Mattias Bud wrote: >> >> >> fast-cgi. i can''t re-index this class if it has :index => :no. if I >> As I said, if i remove :index => :no it works. >> >> Is the solution to change to DRb? > > At least you should give it a try. However I cannot imaging how having a > field indexed or not should influence rebuilding. > > > JensYes - it''s very strange. This is what I get: ArgumentError (Argument Error occured at <except.c>:93 in xraise Error occured in index.c:270 - fi_check_params You can''t store the term vectors of an unindexed field ): /vendor/plugins/acts_as_ferret/lib/local_index.rb:217:in `add_field'' Does this help? mattias -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jun-15 11:59 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
On Fri, Jun 15, 2007 at 11:17:27AM +0200, Mattias Bud wrote:> Jens Kraemer wrote: > > On Thu, Jun 14, 2007 at 06:35:12PM +0200, Mattias Bud wrote: > >> >> > >> fast-cgi. i can''t re-index this class if it has :index => :no. if I > >> As I said, if i remove :index => :no it works. > >> > >> Is the solution to change to DRb? > > > > At least you should give it a try. However I cannot imaging how having a > > field indexed or not should influence rebuilding. > > > > > > Jens > > Yes - it''s very strange. This is what I get: > > ArgumentError (Argument Error occured at <except.c>:93 in xraise > Error occured in index.c:270 - fi_check_params > You can''t store the term vectors of an unindexed field > > ): > /vendor/plugins/acts_as_ferret/lib/local_index.rb:217:in `add_field'' > > Does this help?yeah, jusat do what it says - disable term vector storage by adding :term_vector => :no to the field options for the :index => :no field. AAF trunk now should handle this correctly :-) Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
Andreas Korth
2007-Jun-15 12:42 UTC
[Ferret-talk] [BUG] StandardTokenizer, multibyte and word boundaries
Hi, I''m not sure if this has been brought up before: I found a bug in StandardTokenizer which misinterprets non-ASCII characters as word boundaries. This happens only with words that contain non- alphanumeric characters. Consider this example: The text ''Gerd Schr?der Stra?e'' is properly tokenized to: ["Gerd", "Schr?der", "Stra?e"] as well as ''Gerd-Schroeder-Strasse'': ["Gerd-Schroeder-Strasse"] but ''Gerd-Schr?der-Stra?e'' yields: ["Gerd-Schr", "?der-Stra", "?e"] So apparently, multibyte and non-word characters don''t mix... Cheers, Andy
Mattias Bud
2007-Jun-15 15:16 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Jens Kraemer wrote:> On Fri, Jun 15, 2007 at 11:17:27AM +0200, Mattias Bud wrote: >> > >> /vendor/plugins/acts_as_ferret/lib/local_index.rb:217:in `add_field'' >> >> Does this help? > > yeah, jusat do what it says - disable term vector storage by adding > :term_vector => :no to the field options for the :index => :no field. > > AAF trunk now should handle this correctly :-) > > JensI have the trunk version. This removes the error but the search doen''t match what I was looking for. I have a large number of dates in dirrerent formats. Like this one 6.9.-8.9. 1796 When I search for 6.9.* - the result is blank. I''m maybee missing something here. mattias -- Posted via http://www.ruby-forum.com/.
Jens Kraemer
2007-Jun-18 19:54 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
On Fri, Jun 15, 2007 at 05:16:49PM +0200, Mattias Bud wrote:> Jens Kraemer wrote: > > On Fri, Jun 15, 2007 at 11:17:27AM +0200, Mattias Bud wrote: > >> > > >> /vendor/plugins/acts_as_ferret/lib/local_index.rb:217:in `add_field'' > >> > >> Does this help? > > > > yeah, jusat do what it says - disable term vector storage by adding > > :term_vector => :no to the field options for the :index => :no field. > > > > AAF trunk now should handle this correctly :-) > > > > Jens > > I have the trunk version. This removes the error but the search doen''t > match what I was looking for. I have a large number of dates in > dirrerent formats. > > Like this one 6.9.-8.9. 1796 > > When I search for 6.9.* - the result is blank. I''m maybee missing > something here.if this date string is in the date_comment_index field, you won''t find it as long as you say :index => :no. The correct choice for fields you want to search, but not to be tokenized is :index => :untokenized. :index => :no is only useful for fields you never want to search, but which should hold data to be retrieved later on. Jens -- Jens Kr?mer webit! Gesellschaft f?r neue Medien mbH Schnorrstra?e 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 kraemer at webit.de | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa
Mattias Bud
2007-Jun-18 20:03 UTC
[Ferret-talk] Errror on update after Model.rebuild_index
Jens Kraemer wrote:> On Fri, Jun 15, 2007 at 05:16:49PM +0200, Mattias Bud wrote: >> > AAF trunk now should handle this correctly :-) >> something here. > if this date string is in the date_comment_index field, you won''t find > it as long as you say :index => :no. The correct choice for fields you > want to search, but not to be tokenized is :index => :untokenized. > > :index => :no is only useful for fields you never want to search, but > which should hold data to be retrieved later on. > > Jens >Yes - I ran into that. After a lot of tests I now use untokenized_omit_norms which seems to give the correct result. Now I only have to index the date_comment twice. It also holds unsurten dates lite Around 1820. These chould be searchable with "Around" (find al unsurten dates) So now I index :date_comment_index => {}, :date_comment_index_untokenized => {:index => :untokenized_omit_norms} mattias -- Posted via http://www.ruby-forum.com/.