Setup sunspot solr with rails in production environment

前端 未结 2 1859
北恋
北恋 2020-11-30 18:34

I have tried various links but I can\'t seem to find a good resource on creating a running solr instance that works with rails in production.

I understand that you h

2条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 19:16

    This blog may solve your question:

    Install Solr 4.4 with Jetty in CentOS, and set up Solr server to work with Sunspot Gem. ( http://blogs.pigrider.com/blogs/26 )

    Below are some parts from the blog: ......

    8) Copy this configuration file schema.yml from your Rails application to the home directory of the running Solr 4.4 instance. It will overrider the Solr example configuration file there, and it will set up Solr 4.4 server to work with Sunspot Gem. cp /RailsApplicationPath/Solr/conf/schema.yml /opt/solr/solr/collection1/conf/.

    The home directory of the running Solr 4.4 instance is /opt/solr/solr/collection1/. You can find this information from Solr admin page http:// l o c a l h o s t :8983/solr/admin

    9) Add version field into the configuration file schema.yml to satisfy Solr 4.4 initialization requirement. Actually, two lines of code need to be added into the file. They are:

    
    
    
    

    The configuration file schema.yml eventually will look like:

    
      
        
        
      
    
      
        
        
      
    
      
    
    

    ......

提交回复
热议问题