Install tomcat: The code is as follows:Copy code Apt-get updateApt-get install tomcat6 tomcat6-admin Download and install apachesolr: The code is as follows:Copy code Wget http://mirrors.cnnic.cn/apache/lucene/solr/4.7.2/solr-4.7.2.tgzTar-vxf solr-4.7.2.tgzMkdir/opt/solrSolr-4.4.0/example/solr/*/opt/
Combine SOLR and Tomcat:1. Create a directory under D disk D:\DEMOS\SOLR2. Unzip the solr-4.9.0 file, I download here is this 4.9 version, will example folder in the Solr folder of all the files (not including the SOLR folder itself)Copy to the D:\DEMOS\SOLR directory3. Crea
Take a morning to learn about SOLR and solve the problem:
First understand what SOLR is:
SOLR is a high-performance, using JAVA5 development, SOLR based on Lucene's Full-text search server. At the same time, it has been extended to provide a richer query language than Lucene, while achieving configurable, scalable and
Tomcat/webapps directory, remember not to change the name of the War package2. Add the slf4j,commons-loggin.jar to the apache-tomcat-7.0.42\webapps\solr\web-inf\lib . The 2 jar packages are missing from Solr 's own war package3. Configure Solr.home. add such a section to Web. XML below apache-tomcat-7.0.42\webapps\solr\web-infChange the E:\solr_home to your own
Running SOLR is a simple task. It is not easy to make SOLR run your project efficiently. There are too many factors to consider. It is important to understand SOLR configurations. Understand the meaning of each configuration item in the configuration file!
In SOLR, schema. xml and solrconfig. xml under the
,solrconfig.xml, the two XML configuration will be detailed in the next blog, if you do not know how to configure, copy example/muticore/core1/conf inside the two files to come in.
6. Start Solr in Eclipse
Create a new server in the Servers window and add the newly created item to it;
Modify the port, double-click the newly created server, the port inside the modified http/1.1 8983, here can be customized
want to crawl the data of a watercress movie, which can be set:#注释掉这一行# skip URLs containing certain characters as probable queries, etc.#-[?*[emailprotected]=]# accept anything else#注释掉这行#+.+^http:\/\/movie\.douban\.com\/subject\/[0-9]+\/(\?.+)?$5 Setting the agent nameConf/nutch-site.xml:property> name>http.agent.namename> value>My Nutch Spidervalue>property>This step is seen from this book, Web crawling and Data Mining with Apache Nutch, page 14th.6 Installing SOLRBecause
Objective:The SOLR server is set up, and after the data is imported, it is applied to the project. So how do you integrate and apply SOLR in the project?Next, you'll integrate and apply SOLRI. Integration1. Introduction of the JAR package Properties> spring.data.solr.version>2.1.1.RELEASEspring.data.solr.version> Properties> dependencymanagement> Dependencies> Dependency>
.
Omitheader: Sets whether to ignore the query result return header information, the default is "false".
two. query Syntax
1. Match All documents: *:*
2. Force, block, and optional queries:1) Mandatory: Must be included in the query results (for example, only entry name containing the word make) Solr/lucene statement:+make, +make +up, +ma Ke +up +kiss2) Prohibited: (for example, all documents except those with Word believe)
to the sort mechanism that SOLR has defaulted on, default VSM, default Sortbyfield, default function collection including their combinations,The default booleanquery, Phrasequery, Luceneparser, Dismax parser, and so on, cannot meet the ordering requirements.Then you need to unveil and introduce your own sort.(3) sequencing is a dynamic processAbsolutely not once set, permanently valid. With changes in the data set, changes in business scenarios, chan
Tags: des style blog http io ar color OS useThe information that is typically searched is stored in the database, but we cannot search the database directly, so only the information that SOLR will search for is indexed on the search server and then used by clients.One, link database 1. SQL configurationTake SQL Server, for example, to download the jar package for SQL Server first:Http://msdn.microsoft.com/en-us/data/aa937724.aspxAfter decompression, c
: // localhost: 8888/SOLR/
Lucid encapsulates enhanced series of rest service APIs, such as http: // localhost: 8888/API/collections/collection1/CES. The most important role of rest APIS is to control and monitor data sources and indexes.
Stopping a program is to close jetty. SOLR web program analysis
Under LWE-core in the installation directory:
LWE-core \ doc: the content of the lucid document.
LW
dataimport.properties file, Then copy the file into the conf folder in your Solr_home directory ,Note that this Conf folder is not solr_home\collection1 under the Conf, but the Solr_home\conf folder, which previously did not exist and needs to be created by you. ,The fourth step, open the dataimport.properties file, m
Read Catalogue
Introduction
What is Lunece?
What is SOLR?
Java Environment Building
Variable configuration of Java environment construction
End
IntroductionA gentleman is born non-dissimilar also, good false in things also.Java and. Net which is good, we do not need to water fights, I think language is only our tool to achieve the purpose, a business scenario which is handy (including all languages except the two), of
[Java] Solr video tutorial and solr video tutorial for enterprise distributed search platform
Course BackgroundDistributed search engines that are highly available, scalable, and fault-tolerant. Solr is a high-performance full-text search server developed by Java 5 based on Lucene. At the same time, it is expanded to provide a richer query language
Label:The integration of SOLR and MySQL databases enables the creation of full-scale indexes and incremental indexes.The rationale is simple: Register SOLR's Dataimporthandler in the SOLR project and configure the MySQL data source and the data query SQL statement. When we use the SOLR background control page or directly access an address (given later),
This essentially Lucene analyzer CHAIN,SOLR is just handy: you can link tokenizer and filter by configuring an XML file. We sometimes need to use this chain in our own code. This article records how to do it.Look at the whole code first (groovy):Classmyanalyzer{defanalyzer=newanalyzer () { @Override Protectedtokenstreamcomponentscreatecomponents (strings) { defloader=newclasspathresourceloader () //createtokenizer deffactory=new Mmsegtokenizerfacto
1. Get Apache SOLRUse the following command:http://archive.apache.org/dist/lucene/solr/3.6.2/apache-solr-3.6.2.tgz2. UnzipUse the following command:-zxvf apache-solr-3.6.2.tgz3. Contents of SOLRView the contents of the directory below:What's important is the example directory, and we'll look at what the files are:You can see the
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.