Apache Solr

     
    Solr is a popular open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search. Solr is highly scalable, providing distributed search and index replication, and it powers the search and navigation features of many of the world's largest internet sites.

    How to start/stop the Apache Solr server?

    You can use the "ctlscript.sh" utility which is in the installation directory.

    linux_platform.png On Linux:

    $ ./ctlscript.sh start solr
    

    mac_platform.png On OS X: There is a "control" graphical tool in the installation directory or you can use the "ctlscript.sh" utility from a Terminal.

    host:~ user$ cd /Applications/application-version
     host:~ user$ ./ctlscript.sh start solr
    

    The Solr server is running in the 8983 port by default. If you are trying to connect your remote application to the Solr server, check that you have not any firewall running in that port. If you are runing it in Amazon EC2, check that your security group has this port open. You get more info about how open a firewall port for Virtual Appliances.

    How to access to Sorl Admin page?

    You can access your Solr admin page by opening a browser and typing http://127.0.0.1:8983/solr/admin.
     
    If you are trying to access to Solr Admin page in a BitNami Cloud Hosting server or an Amazon Machine Image (AMI)  you can create an SSH tunnel sending your requests to your server from 127.0.0.1 (localhost). Notice that this is not necessary if you have already opened port 8983 in your securitly group.
     
    You should follow these steps to create the tunnel:

    1. Get your SSH private key if you don't have it already. More info

    2. Create the tunnel.

    - If you are in Linux or Mac you can run the following in a console in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):

    $ ssh -N -L 18983:127.0.0.1:8983 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
    

    - If you are using Windows, you can use Putty:

    • Follow the steps described here
    • Before opening the connection. Go to Connection -> SSH -> Tunnels, enter the values below and click "Add" button:
      • Source port: "18983"
      • Destination: "localhost:8983" 
    • Click Open

    3. While the tunnel is active you can connect to the web application at http://127.0.0.1:18983/solr/admin in your browser.

    How to configure the Apache Solr server?

    The BitNami Apache Solr Stack contains an example configuration in the installdir/apache-solr/solr folder. You can configure the conf/schema.xml and conf/solrconfig.xml files.

    You can find a Drupal 7 with Solr configuration example at http://blog.bitnami.org/2012/05/new-bitnami-apache-solr-stack.html.

    How to enable the Apache Solr logs?

    Since 3.X version, Apache Solr log files are not enabled by default. If you want to enable the log files, you can uncomment the following section in the installdir/apache-solr/etc/jetty.xml

     

        <Ref id="RequestLog">
          <Set name="requestLog">
            <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
              <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
              <Set name="filenameDateFormat">yyyy_MM_dd</Set>
              <Set name="retainDays">90</Set>
              <Set name="append">true</Set>
              <Set name="extended">false</Set>
              <Set name="logCookies">false</Set>
              <Set name="LogTimeZone">GMT</Set>
            </New>
          </Set>
        </Ref>
    
    Tag page (Edit tags)
    • No tags
    Page statistics
    35392 view(s), 16 edit(s) and 5982 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments