. NET software xcopy form integration SOLR Search Engine

Source: Internet
Author: User
Tags solr lucidworks

SOLR is an open-source Enterprise Search Service Based on luncene. It provides a package and ready-to-use solution [using luncene integration requires processing index management, analyzer, and other issues, self-implementation is still relatively troublesome] SOLR provides a lot of auxiliary functions for external HTTP services. The core is integrating with luncene.

Lucid imaginationIs the first known cial company exclusively dedicated to Apache Lucene/SOLR open source technology. Provides commercial solutions

In. NET software, if green integration is more convenient, otherwise it will be difficult to install a string of things, which cannot reflect the deployment form of. Net xcopy. This article focuses on. NETProgramDescribes how to integrate the SOLR service.

On the other hand, the release of release e.net (C #) lags behind that of luncene. Therefore, SOLR is a good solution (SOLR can be updated almost synchronously with luncene. After all, there is little coupling between the two)

Refer to official website

Http://lucene.apache.org/solr

Http://www.lucidimagination.com/

Concept

SOLR 1.4 Enterprise Search serverless lucidworks-solr-refguide-1.4.pdf these two books on SOLR enhanced processing content and syntax are described in detail, specific configuration and use can refer to the two books

Solrcores

It's possible to segment SOLR into multiple virtual instances, or cores, each with its own configuration and indices. cores may be dedicated to a single application or to very different ones, but all are administered through a common administration interface. you can create new solrcores on the fly, shutdown cores, even replace one running core with another, all without ever stopping or restarting your servlet container.

Solrcores is useful for groups to manage indexes. For example, all content can be separated when an index library is too large, or it is an independent resource.

SOLR green service configuration

Because of the differences between the existing 32-bit and 64-bit systems, taking 32-bit as an example (the 64-Bit performance is higher, and I found that the performance is almost doubled, JDK and tomcat are different architectures released separately. 32-bit and 64-bit are the main differences)

The directory structure of the X86 architecture is as follows:

(The Tomcat 7 and jetty7 used by the Service are troublesome to run)

JDK deployment: place the entire JDK directory installed on other machines on JDK.

Tomcat 7: Put the entire Tomcat directory installed on other machines on TomcatLucid imaginationIn the SolrInstaller-1.4.1.jar, The SOLR. War of lucidworks \ webapps \ SOLR. War is placed in the tomcat7 \ webapps directory.

SOLR: SOLR directory is the default solrcores configuration files and related libraries, the default index file also exists in this directory (COREX is one of the core), For details refer to: http://cid-56b433ad3d1871e3.office.live.com/self.aspx/.Public/solr86.rar

Root directory: startup and service run files, see download: http://cid-56b433ad3d1871e3.office.live.com/self.aspx/.Public/solr86.rar

For example, start service start. bat.

Set java_home = % Cd % \ JDK \

Set classpath = % Cd % \ JDK \ Lib;

Set Path = % PATH %; % java_home %

Set catalina_home = % Cd % \ tomcat7

Cd % 0 \..\

Tomcat7 \ bin \ Catalina. BAT Run

: Set/p m = press Enter:

SOLR. xmlFor solrcoresConfiguration File

<? XML version = "1.0" encoding = "UTF-8"?>

<SOLR persistent = "false" sharedlib = "lib">

<Cores adminpath = "/admin/cores" shareschema = "true">

<Core name = "COREX" instancedir = "COREX"/>

</Cores>

</SOLR>

Demonstration COREXConf in the directoryKey Files

Solrconfig. xml

Schema. xml

JDBC. xml: Set the index for the database

Lib: JDBC driver of sqljdbc4.jar SQL Server

Data: Default INDEX DIRECTORY

After the above configuration, you can use start. bat on any deployed machine to start the SOLR service, stop. BAT to close the service, SVC. Bat *** install the service, and run SOLR green.

If an error occurs, check the cause in the atat7 \ logs \ Catalina. *****. log.

After it is started, you can use the SOLR Service

Total Portal

Http: // localhost: 8080/SOLR/

A solrcore Management Portal (such as COREX)

HTTP: /localhost: 8080/SOLR/COREX/admin/

Database imported population

Http: // localhost: 8080/SOLR/COREX/admin/dataimport. jsp? Handler =/dataimport

You only need to follow JDBC. XML to create a database, you can use the above address to import data to create an index

. Net Integration

Based on the dry principle, it is better to use the existing database [write your own according to the agreed HTTP protocol format, of course, there is no problem]

Mausch-SolrNet-0.3.0-0-g9fd45cd.zip

This is a relatively new project

Solrsharp-Dec-30-2007.zip

This project was updated earlier and has been updated less recently.

The following is a sample example of solrnet, which is quite effective.

 

 

Search Performance

After the solution is completed, if you are worried about the performance, you can look at the performance, if it is difficult to collect millions or tens of millions of data, you can download a lot of open data http://musicbrainz.org/doc/Database_Download at musicbrainz.org (it is best to use the database format)

I tested the newly created index on 2.8gcpu. About 4-0.6 million data entries in one file ~ 5 minutes, 6 million articles 20 ~ Completed in 25 minutes (the 64-bit version speed is not doubled), and the speed is still quite fast. The query on this index is generally completed in dozens of milliseconds, if you have higher search quality and performance requirements, you can first modify the SOLR configuration and add related plug-ins. Generally, the problem should be solved (there are many Lucene-based solutions ), if you have any problems, you can develop and customize your own

So far, we have added the search function to our application. [Note SOLR authorization protocol for integrated and released products and solutions]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.