Apache solr (2), apachesolr
In the previous article, I tried to install and configure solr and how to search for solr, today, I tried to connect solr to the MySQL database (only a single table, one-to-many, and many-to-many have yet to be studied)
1. MySQL directory structur
The previous article tried to install and configure SOLR, and how SOLR retrieved it today, trying to simply connect SOLR to the MySQL database (only to try out single table, one-to-many, and many-to-many, yet to be researched)1. mysql directory structure2. Create a new Democore3. The field field one by one for the new core and Field,field and MySQL database on th
The solr extension needs to be installed in win7. The xampp integrated environment used, php5.3.5. I downloaded the php_solr.dll file from the Internet and reconfigured the INI file. However, I used phpinfo to check whether the solr extension was added. After checking this information, some people said they wanted to install the solr extension in Windows 7 due to
"" Symbol and increment value, that is, JAKARTA4 Apache
Boolean operatorAND、||
Boolean operatorOR、
Boolean operator NOT、!、- (the exclusion operator cannot be a singleton query with the item usage)
+An operator exists that requires that the item after the symbol "+" must exist in the corresponding field of the document
()Used to form subqueries
[]Include range retrieval, such as retrieving a time period record, including the tail, date:[20
-oriented design, advanced ideas. Its efficiency is high, in the PIII 1G memory personal machine, 1 seconds can be accurate participle 1 million Chinese characters. Based on the unlimited number of dictionary files for the effective segmentation of the article, so that the word classification can be defined. Be able to analyze the unknown words reasonably.
14, mmseg4j
MMSEG4J uses the Chih-hao Tsai mmseg algorithm (http://technology.chtsai.org/mmseg/) to implement the Chinese word breaker and
}}transformer's customization is very simple and completely non-intrusive, just to achieve PublicObject Transformrow (map PackageCom.mobcent.searcher.solr.searcher;ImportOrg.apache.solr.client.solrj.SolrQuery;ImportOrg.apache.solr.client.solrj.SolrServer;ImportOrg.apache.solr.client.solrj.SolrServerException;ImportOrg.apache.solr.client.solrj.impl.HttpSolrServer;ImportOrg.apache.solr.client.solrj.response.QueryResponse;ImportOrg.apache.solr.common.SolrDocumentList; PublicclassCopyofsolrsearcher
Because the work requires that you want to install the SOLR extension under Win7. Use the XAMPP integrated environment, php5.3.5. Downloaded the Php_solr.dll file on the web, reconfigured the INI file, but found that the SOLR extension was not added with phpinfo view. After checking, some people say that the IIS environment uses PHP_SOLR_VC9, and Apache should us
. Previously, many developers used custom encoding rules to deal with this situation, but Lucene 2.9 already comes with a method for dealing with numbers. The field and query classes index and search with appropriate precision, which greatly reduces the number of keywords to be searched and significantly improves the query response capability.
Version 2.9 also introduces a new query type and a wider range of keyword queries (wildcard, prefix, etc.),
Recently, because of job needs, I need to learn lucene. No way can only degree Niang, understand some of the approximate and thought.1. What is Lucene? In simple terms, it is a search engine technology, open-source, highly extensible search Engine library.Mapping relationships1. What is full text search? Briefly introduced below.For example, if you enter Lucene,
length
c = foreach B generate Group, COUNT ($1);
--Output printing
Dump C;
(2) Question two: How to query the length of a non-participle field in Apache SOLR, how many records are there? SOLR does not directly provide such a function like Java lenth, or the size of pig inside a function, then how should we query it?
article so that you can define the word classification. Ability to properly parse unknown words.
14. mmseg4j
Mmseg4j uses the Chinese word divider implemented by the mmseg algorithm (http://technology.chtsai.org/mmseg/) of Chih-hao Tsai, and implements Lucene analyzer and SOLR tokenizerfactory to facilitate use in Lucene and
:Https://github.com/mausch/SolrNet Solrnet does not attempt to abstract much over SOLR, it's assumed that you know what SOLR are and how to use it, just as Yo U need to know relational databases before using an ORM.If you ' re not familiar with SOLR, take your time to follow the SOLR tutorial, see the FAQ and the docs
This article transferred from: http://www.cnblogs.com/ibook360/archive/2011/11/07/2239247.htmlIn Tomcat6, add SOLR access to the following methods:Edit Tomcat6/catalina/localhost/solr.xmlRefer to the Tomcat configuration documentation: Http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Remote_Address_FilterTo enable the above configuration to take effect, you will also need to re-enable the Tomcat security mechanismEdit sudo vi/etc/default/tomc
org.apache.lucene.index.IndexWriterConfig.setIndexWriter(IndexWriterConfig.java:148) at org.apache.lucene.index.IndexWriter.Principle Analysis
Analysis constructor: New indexwriter (directory, indexwriterconfig );
1 public IndexWriter(Directory d, IndexWriterConfig conf) throws IOException {2 conf.setIndexWriter(this); // prevent reuse by other instances3 ……4 ……5 ……6 }
Focus on the second line Conf. setindexwriter (this );
1 private SetOnce
In this case, the wirter variable
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.