Sorry, I'm not quite sure what the problem is - you seem to have jumped onto 
this thread, but is disk space the issue you're facing? Or is it something 
else? I'd not suggested upgrading here, that's all...

That said, you've got an awful lot of facets and sortable fields - are all of 
these needed? Because they'll definitely slow down indexing and increate the 
file size.

-- 
Pat

On 10/05/2010, at 12:52 PM, ruskie lee wrote:

> Thanks Pat for your kind reply. I have upgraded to version 1.3.16 as u 
> suggested, but the problem still persists.
> So here is the code for my two models, hope you could find sth wrong in here 
> (^_^) :
> ######################## Person.rb ###############################
> class Person < ActiveRecord::Base
>   #acts_as_ferret :fields => [:firstname, :lastname, :middlename]
>   
>   belongs_to :user, :class_name => 'Goldberg::User', :foreign_key => 'g_id'
>   has_many :countryaffiliations, :foreign_key => 'people_id'
>   has_many :emailaddresses, :foreign_key => 'people_id'
>   has_many :languages, :foreign_key => 'people_id'
>   has_many :contactnumbers, :foreign_key => 'people_id'
>   has_many :educationrecords, :foreign_key => 'people_id'
>   has_many :workexperiences, :foreign_key => 'people_id'
>   has_many :addresses, :foreign_key => 'people_id'
>   has_many :skills, :foreign_key => 'people_id'
>   has_many :referees, :foreign_key => 'people_id'
>   has_many :courses, :foreign_key => 'people_id'
>   has_many :achievements, :foreign_key => 'people_id'
>   has_many :affiliations, :foreign_key => 'people_id'
>   has_many :employmentinformations, :foreign_key => 'people_id'
>   has_many :interests, :foreign_key => 'people_id'
>   has_many :salaryinformations, :foreign_key => 'people_id'
>   has_many :testimonials, :foreign_key => 'people_id'
>   has_many :contentsettings, :foreign_key => 'people_id'
>   validates_presence_of(:firstname)
>   validates_presence_of(:lastname)
>   validates_presence_of(:gender)
>   validates_presence_of(:maritalstatus)
>   define_index person_index do
>     indexes lastname, :sortable => true, :facet => true
>     indexes firstname, :sortable => true, :facet => true
>     indexes middlename, :sortable => true, :facet => true
>     indexes identification, :sortable => true, :facet => true
>  indexes emailaddresses(:address), :as => :emailaddresses_address, :sortable 
> => true
>  indexes workexperiences(:description), :as => :workexperiences_description, 
> :sortable => true
>  indexes countryaffiliations(:location), :as=> :countryaffiliations_location, 
> :sortable=>true, :facet=>true
>  indexes countryaffiliations(:affiliationtype), 
> :as=>:country_affiliationtype, :sortable=>true
>  indexes languages(:name), :as=>:language, :sortable=>true
>  indexes skills(:skillname),:as=>:skill, sortable=>true
> # has agent_id, created_at, updated_at
>   end
>  sphinx_scope(:find_job_bykeyword){|keyword|
>  {:conditions=>{:title|| :company|| :position||:number || :description|| 
> :requisites || :dateposted|| :dateclosed=>keyword}}
>  }
>  sphinx_scope(:by_alphabet_country) { |fname,country|
>     {:conditions => {:firstname=>fname+"*",:countryaffiliations_location => 
> country}}
>  }
>  sphinx_scope(:by_all) { |language,country,skill|
>     {:conditions => {:language=>language,:countryaffiliations_location => 
> country, :skill=>skill}}
>  }
>  sphinx_scope(:by_country_skill){|country,skill|
>  {:conditions=>{:countryaffiliations_location 
> =>country,:skill=>"*"+skill+"*"}}
>  }
> end
> Goldberg::User.class_eval do
>   has_many :people, :foreign_key => 'g_id'
> end
> ###############################################################
> ####################### Job.rb ###################################
> class Job < ActiveRecord::Base
>   belongs_to :user, :class_name => 'Goldberg::User', :foreign_key => 'g_id'
>   
>   validates_presence_of(:title, :message => "Position title can't be blank")
>   validates_presence_of(:company, :message => "Company name can't be blank")
>   validates_presence_of(:positiontype, :message => "Industry can't be blank")
>   validates_presence_of(:dateposted, :message => "Date posted can't be blank")
>   validates_presence_of(:dateclosed, :message => "Date closed can't be blank")
>    define_index:job_index do
>     indexes title, :sortable => true, :facet => true
>     indexes company, :sortable => true, :facet => true
>     indexes positiontype, :sortable => true, :facet => true
>     indexes number, :sortable => true, :facet => true
>     indexes salaryrangemin, :sortable=>true, :facet=>true
>     indexes description, :sortable => true, :facet => true
>     indexes requisites, :sortable => true, :facet => true
>     indexes dateposted, :sortable => true, :facet => true
>     indexes dateclosed, :sortable => true, :facet => true
>    end
> end
> Goldberg::User.class_eval do
>   has_many :jobs, :foreign_key => 'g_id'
> end
>  
> ###############################################################
> On Sun, May 9, 2010 at 12:51 PM, Pat Allan <[email protected]> wrote:
> It's probably worth increasing the memory limit for indexer, via the 
> mem_limit setting:
> http://freelancing-god.github.com/ts/en/advanced_config.html
> (see about halfway down the page)
> 
> Not sure if that will fix things, but it's definitely worth a shot.
> 
> --
> Pat
> 
> On 07/05/2010, at 2:31 PM, Gedeon wrote:
> 
> > Hi all,
> >
> > Thanks to Pat, I got the search working properly now. However,
> > indexing is now giving me a headache...
> >
> > As explained in my previous threads, I'm trying to index and search
> > Projects. It worked fine in development, with a very small test
> > database. However, in production (with tables under 2k records),
> > indexing seems to take loads of disk space (which is released once
> > indexing is over). Some examples:
> >
> >    indexes writeboards.writeboard_comments.body, :as
> > => :mr_comment_body (1158 rows, 416kb)
> >    indexes folders.project_documents.description, :as
> > => :file_description (1457 rows, 352kb))
> >
> >    has memberships.user_id, :as => :member_ids, :type => :multi (652
> > rows, 56kb)
> >    has "IF(projects.private = 0, '0',
> > GROUP_CONCAT( memberships.user_id))", :as => :members_or_public, :type
> > => :multi
> >
> >       requires 1.4GB
> >       -----------
> > Now, the same without :members_or_public:
> >    indexes writeboards.writeboard_comments.body, :as
> > => :mr_comment_body
> >    indexes folders.project_documents.description, :as
> > => :file_description
> >
> >    has memberships.user_id, :as => :member_ids, :type => :multi
> >
> >
> >       requires 1.1GB
> >       -----------
> > Without :member_ids :
> >       indexes writeboards.writeboard_comments.body, :as => :mr_comment_body
> >        indexes folders.project_documents.description, :as
> > => :file_description
> >
> >       75MB
> >       ------------
> >
> > Obviously, there is an issue with has memberships.user_id, :as
> > => :member_ids, :type => :multi
> >
> >
> >
> >
> > Also, without the :member_ids, adding indexes requires more and more
> > disk space:
> >       indexes writeboards.name, :as => :writeboard_name
> >       indexes writeboards.writeboard_contents.body, :as => :mr_content_body
> >       indexes writeboards.writeboard_comments.body, :as => :mr_comment_body
> >        indexes folders.project_documents.description, :as
> > => :file_description
> >       indexes folders.project_documents.filename, :as => :file_name
> >       indexes folders.description, :as => :folder_description
> >       indexes folders.name, :as => :folder_name
> >
> >    requires 1GB of disk space for indexing.
> >
> > Is that a normal behaviour? If not, has anyone encountered this
> > problem? Any idea what I should check to fix it?
> > All my tables are pretty small and  "many indexes" + "member_ids"
> > always crashes because I do not have enough space on the hard disk.
> > Will I need 10Gb of disk space for indexing tables with 10k+ rows?
> > All this is without the use of wildcards, infix or prefix. Enabling
> > them does not seem to have any effect on the disk space required.
> >
> > --
> > 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.
> >
> 
> --
> 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.
> 
> 
> 
> -- 
> 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.

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