[Reprinted] BooleanQuery is useful in search.

Source: Internet
Author: User

[Reprinted] BooleanQuery is useful in search.

In the search, we may encounter different fields in the index file to be searched, and there is an operational relationship with or not between different fields. For example, what keywords must exist in this xx field, another XXX field can exist or does not have any keywords. This requires BooleanQuery to obtain a combined search object and perform a combined search.

 

BooleanClause is a subsentence in BooleanQuery. This class defines a static final internal class Occur that defines the BooleanQuery OPERATOR:

Public static final Occur MUST = new Occur ("MUST"); // corresponds to the operation.
Public static final Occur shold = new Occur ("shold"); // or operation
Public static final Occur MUST_NOT = new Occur ("MUST_NOT"); // non-Calculation

Original article: http://blog.csdn.net/rick_123/article/details/6637121


What is the use of multiple spaces plus signs for writing search results in Baidu?

If you find that some types of web pages in the search results are not needed because they are what you want to see, and these web pages contain specific keywords, use the plus sign syntax, only the webpages with specific keywords are displayed. For example, if you only want to view webpages that contain "movie of the Condor Hero", you can use the keyword "movie of the Condor Hero" as the search condition, only when the search results exist at the same time.
"Heroes" and "Movies" are displayed in the search results.

If you find that some types of web pages you do not want to see in the search results and contain specific keywords, use the minus sign syntax, you can remove all these webpages that contain specific keywords.
For example, you may find many TV series webpages in the hope of searching for the heroes of the arms in terms of martial arts novels. Then you can query the TV series:
Note that there must be a space between the first keyword and the minus sign. Otherwise, the minus sign is treated as a hyphen, And the minus sign syntax function is lost. There is no space between the minus sign and the next keyword.

What is the use of search functions in EXCEL?

Lookup function in Excel

Author: Personal Computer Editorial Department updated: Source: Personal Computer

Excel provides a variety of table search commands and methods, the most commonly used when the number of LOOKUP, VLOOKUP, HLOOKUP, and multiple IF flow commands. It is hard to say which of the above methods has better results and which is more suitable for your situation. What's more, in the search process of large data tables, we often need to mix these methods to achieve the best results. This article only introduces the three methods for searching in EXCEL.

Search function
The working mechanism of all search functions is roughly the same. For example, if you enter the model of a part, the search function returns the detailed description of the corresponding part. If you enter a person name, it returns the contact address of the corresponding contact. Mobile phones also have the search function: select the contact name to display their phone numbers.
The LOOKUP function in Excel has two types: Vector class and matrix class. The vector class only searches for a given value in a single column or in a single row, and assigns the value to a specified position in the table. That is to say, the parameters you want to provide include the row or column you want to search for and the row or column in which the return value is located.
LOOKUP is rarely used in matrix-type applications, as Microsoft says, "this function is only compatible with other software ". In Excel, this type of matrix search can be replaced by VLOOKUP and HLOOKUP.
Figure 1: Enter all data related to community activities in the table
As mentioned above, in vector type applications, You need to specify three parameters for the LOOKUP function: Search value, search range, and result storage range. To make it clearer, you can create a table named "data" just like me. Here I choose to put the data in the range of B2: E4 (1 ). Select this range and enter "table" (2) In the name column ). Here we are most concerned with the data in column B and column D-community activities and dates. Select B2: B5 and enter "community activity" in the name column ". Because column D already has the title "date", you can borrow it directly. Select D1: D5 and press Shift + Ctrl + F3. When the "specify name" check box is displayed, select "first line" and click "OK ".
Figure 2: select and name the data area
Name another page of the file "community News" and enter "= LOOKUP (D2, Community activity, date)" in the B2 field of the page) "You can enter the" Owner's Annual Meeting "in the D2 format, and B2 displays the activity date" July 22, July 7 ", enter "Spring Dance" to display the corresponding date (3 ). However, when you enter the name of the other two activities, the b2-gram returns "N/A" (meaning the value is unavailable ). Why? Because LOOKUP first needs to sort all data items used as search criteria in ascending order before normal search can be performed, in this example, starting with the owner's annual meeting, the letter Y will block the search program from continuing to search for the other two activities starting with C and X.
Figure 3: The current message can be kept as usual
Solution
To solve this problem, click "data" and select "sort" to sort column B in ascending order. In this way, the LOOKUP function returns all search results correctly.
A more convenient method is to replace the LOOKUP command with the VLOOKUP command. VLOOKUP is different from LOOKUP. Four parameters must be specified: The Search condition, the location of the matrix where the data table or data is located, the columns to be searched, and a logical value used to solve the LOOKUP problem that needs to be searched in ascending order.
Here we still use the table not sorted in Figure 1 as an example. The value of the search condition is still specified by D2 in the "Community News" table. The biggest difference between LOOKUP and VLOOKUP is that in VLOOKUP, the number of the column where all search conditions are located is always the first column in the entire data area, that is, the B2 column called "community activity" in the area named "table. The third parameter in the function is the number of the column where the result is located. This number is sorted from the first column in the "table" area. Column B should be represented by "1" here.
... The remaining full text>

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.