Frame: lucene.net

Source: Internet
Author: User

Lucene.Net Performance "Eighth" Summary: First, indexreader performance analysis Indexreader completed the heavy work of opening all index files and providing the underlying reader API, while Indexsearch was much simpler. Since opening a indexreader requires a large overhead, it is best to reuse a Indexreader instance during all searches and open the new Indexreader only when necessary. In addition, you can create indexsearcher directly from the index directory, in which case the system will establish its own private indexreader, and if you close searcher at this point, its colleagues will also close their indexreader. Because the Indexreader is opened by Indexsearcher. Read the full posted @ 2014-04-10 17:55 inverse mind reading (404) | Comments (2) Edit

Chinese word "Seventh" Summary: First, the method of Word segmentation mainly has the following kinds of methods: 1, single-word segmentation is to put a paragraph of text in accordance with each word to build the index. If used to slice "I love your great China", it will be cut into "I", "Love", "You", "Wei", "Big", "", "middle", "country". This kind of segmentation efficiency is low, but also can solve some problems, better than nothing. 2, dichotomy method is to put a paragraph of text each of the two adjacent words counted as a word. Also for the above sentence will be cut into "I Love", "Love You", "You Wei", "Great", "big", "in", "China" 7 words. 3, dictionary method is to create a dictionary file, and then use a dictionary and text paragraph to match, so as to obtain the results of the word segmentation. In this method, dictionaries and matching algorithms are the key. It's easy to make a dictionary, and not to maintain a dictionary ... Read the full posted @ 2014-04-09 10:24 Inverse Mind reading (723) | Comments (0) Edit

Search results Processing and display summary of the sixth: first, extract the search results 1, Topdocs object Description Maxscore: the highest score; Totalhits: The total number of matching results; Scoredocs: the document array to match (the document ID and score can be obtained internally); Here's a look at the results obtained: Console.WriteLine (Docs. Maxscore); Output Highest score Console.WriteLine (Docs. Totalhits); Number of output search results foreach (Scoredoc d in Docs. Scoredocs)//Output document score with document ID {Console.WriteLine (... Read the full posted @ 2014-04-03 16:48 Inverse mind Reading (255) | Comments (0) Edit

Advanced search "Fifth" Summary: first, the concept of the search request search requests, the user input keywords, and then the program to analyze keywords, to obtain the real intention of the user search. Lucene provides a set of Queryparser classes to resolve search requests. This class is available for use. 1, the basic use of Queryparser queryparser used to analyze the user input keywords, the keyword into the query object. Its construction method is as follows: Queryparser parser = new Queryparser (Lucene.Net.Util.Version.LUCENE_30, "title", New StandardAnalyzer ( LUCENE.NET.UTIL.VERSION.L read the full text posted @ 2014-04-02 12:07 Inverse Mind reading (775) | Comments (0) Edit

Index management Summary of the fourth: first, index management 1, view information about the index to view the information about the index, there is probably the following method: Read the information about the index through the IndexWriter class and display it. The information about the index is read by Indexreader and its subclasses, and it is displayed. View information about the index through a visualizer. 1. Using the IndexWriter class to read the information about the index using IndexWriter reading is not the best method. 2. Using Indexreader and its subclasses to read the information about the index Indexreader class is a class that is designed to read index information, an abstract class that contains Filterindexreader, Multireader, Parallelreader such as subclasses. Indexreader Class pass ... Read the full posted @ 2014-04-01 10:11 Inverse mind Reading (382) | Comments (0) Edit

Perform a search summary of the third article: first, the basic way to perform a search Using Lucene.Net to perform a search, you first create the Indexsearcher object, then encapsulate the search criteria entered by the user through the term and query objects, and finally encapsulate the results in the Hits object, which is returned to the user. 1. Create the Finder object: Indexsearcher The method for creating the Indexsearcher object: Indexsearcher searcher = new Indexsearcher (index directory instance); Creating a Indexsearcher object is easy, and after it is created, you can use it to search. The most common way to do this is search (), which returns a result set object, hits, using the search method. 2. Package Search ... Read the full posted @ 2014-03-28 13:41 Inverse mind Reading (417) | Comments (0) Edit

Building the index Second article summary: first, understanding the process of creating an index the process of creating an index is similar to writing a book. The process of creating an index is as follows: Build the indexer indexwriter, which is equivalent to the framework of a book. Create Document object documents, which is equivalent to an article. (the corresponding database is a table) to establish an information Field object, which is equivalent to an article in the title, body and so on. (the corresponding database is a field) adds the field to the document. Add the document to the IndexWriter. Close the indexer IndexWriter. There are three basic steps to creating an index: Create a field. The field is organized into a document so that the packaging of an article is completed. Organize multiple document into a indexwriter ... Read the full posted @ 2014-03-26 17:31 Inverse mind Reading (359) | Comments (0) Edit

Lucene.Net Basic Example "first" Summary: Lucene.Net is a ported version of the Java Platform Search plugin Lucene. It is mainly used in the development of search engines, site search and so on. Before opening, write the simplest demo, let yourself first experience the charm of the next lucene.net, by the way to build the environment. static void Main (string[] args) {//write data to Index Analyzer Analyzer = new StandardAnalyzer (Lucene.Net.Util.Version.LUCENE_30); Directory directory = new Ramdir ... Read the full text

Frame: lucene.net

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.