Formulate a complex query consisting of: Examples of request conditions. To find a stable phrase, put the words in quotation marks

The Direct Commander Query Language allows you to create complex criteria for selecting objects: impose various conditions on field values ​​and combine them using logical operators.

The request is entered in the text filter line at the bottom of any Commander panel. A query using Boolean operators begins with a character = .

  • Making a request
  • Queries from multiple conditions
  • Query language operators

Making a request

A simple request consists of three parts:

Field Operator Meaning

For example, request title ~ crackers will show all ads that have the word “crackers” in the Title column.

Start typing with the symbol = . In this case, an icon appears in the input line. Field names and operators can be selected from pop-up tips.

When entering a value, please note:

If the query is not written correctly, the icon in the input line changes to and an error message appears.

Queries from multiple conditions

To create combined queries, you can use the operators & (logical AND) and | (logical OR).

The conditions in the query are executed strictly from left to right, but you can change the order using parentheses. Conditions enclosed in parentheses take precedence over the standard sequence.

Example 1

Words ~ matches | Words ~ sugar

This query selects phrases that contain the keyword “matches” or “sugar”.

Example 2

Words ~ matches | Words ~ sugar & Rate > 1

This query selects phrases that simultaneously meet two conditions:

    Have a search bid greater than 1.

Example 3

Words ~ matches | (Words ~ sugar & Rate > 1)

This query selects phrases that meet at least one of two conditions:

Query language operators

Depending on the field, the following types of statements are used in DCQL.

Operator Meaning Example Result
~ Contains = geotargeting ~ Austria
!~ Does not contain = geotargeting!~ Austria
= Moderation!~ [Waiting]
= Equal/same = geotargeting = Australia
= Number =
!= Not equal/does not match = geotargeting!= Australia
= Number!=
> More = ctr > 0.5
< Less = ctr< 0.5
>= Greater than or equal to = Rate >= 1
<= Less than or equal to = Rate<= 1
&
|
Operator Meaning Example Result
~ Contains = geotargeting ~ Austria Selects ad groups that have “Australia” or “Austria” in the Geotargeting column
= \"Image name\" ~ Ads are selected that have a name containing the substring “black” or “white” in the Image Name column.
= Moderation ~ [Accepted; Draft] Ads that have the value “Accepted” or “Draft” in the Moderation column are selected.
!~ Does not contain = geotargeting!~ Austria Ad groups are selected, except for those with geotargeting “Australia” or “Austria”
= title!~ [matches crackers] Ads are selected whose value in the Title column does not contain the substrings “matches” and “crackers”
= Moderation!~ [Waiting] Ads are selected that have any value other than “Pending” in the Moderation column.
= Equal/same = geotargeting = Australia Only those groups that have the geotargeting “Australia” are selected
= Number = Ads with numbers 111111 and 222222 are selected.
!= Not equal/does not match = geotargeting!= Australia Groups are selected except those with geotargeting “Australia”
= Number!= Ads with numbers other than 111111 and 222222 are selected.
> More = ctr > 0.5 Phrases with a CTR greater than 0.5 are selected
< Less = ctr< 0.5 Phrases with a CTR less than 0.5 are selected
>= Greater than or equal to = Rate >= 1 Phrases are selected that have a search bid greater than or equal to 1
<= Less than or equal to = Rate<= 1 Phrases are selected that have a search bid less than or equal to 1
& Logical "AND" in complex queries = number ~ 123 & status = \"running shows\" Ads are selected that contain the numbers 123 in the number and are in the “Impressions in Progress” state.
| Logical "OR" in complex queries = name ~ matches | name ~ sugar Ads are selected whose title contains the word “matches” OR the word “sugar”

Attention.

Operators > , >= , < And <= can only be used for columns with numeric values.

Key query(key search; key words, keyword, key phrase, keyword) is a query (word, phrase or phrase) that a search engine user enters into the search bar, trying to find information (products) that most closely matches this query.

Search engines, accordingly, try to provide the user with information that most closely matches his request. For this purpose, special algorithms are developed, as a result of which the search engine tries to assess how relevant a particular page of sites indexed by the robot is to the entered query.

Types of Key Queries

All key queries that are part of the semantic core of a website or online store are divided into various groups. In turn, these groups are divided into:

Types of keywords by content:

    Information Key Queries

    These are requests of an informative nature, i.e. those queries that when entering into a search engine, users expect to find information of one kind or another. An example of information requests is “how to choose a TV”, “iPad-2 testing results”, “Moscow news”, etc.

    Navigation keywords

    These are queries entered into a search engine that users want to find an answer to questions like “How to find this?”, “Where could it be?”, “Which store to buy from?” as well as, for example, “manager vacancies”, “lawnmower.ru”, “weather”

    Transactional keywords

    this type of query is usually asked to a search engine when the user knows for sure and wants to buy a certain product, for example: “buy a gas heating boiler”, “buy a phone”

    Common Key Queries

    all other key queries that cannot be classified into any of the above categories are usually keywords consisting of one word, for example: “linoleum”, “car”, “new items”).

Types of key queries by frequency of use per month:

  1. High frequency queries— These are requests that have the highest frequency of demand among Internet users, i.e. These are queries that are entered into the search bar tens or even hundreds of thousands of times during the month. As a rule, these are keywords of fairly general concepts or, say, generalizing ones. For example: “car”, “air conditioners”, “buy a TV”.
  2. Mid-frequency keywords- more specific keyword phrases that usually contain at least three words: “buy an LCD TV”, “how to promote a website”, “tour to Spain”. Such requests are made from several thousand to tens of thousands of times a month.
  3. Low frequency queries are key words and phrases that are quite rarely used by Internet users: “buy Samsung LCD TV”, “best car TV”. The number of such requests per month may be less than a thousand.

Degree of competition for key queries:

Highly competitive, medium competitive and low competitive. This is determined by how significant, informative, high-quality and large sites, online stores or blogs are on the first page of search results for these queries. Also, competition for a specific request depends on the activity of the owners of these very sites, stores and blogs and on the actions they take to promote their resources.

The higher quality and more authoritative the sites that rank in the top 10 search results, from the search engine’s point of view, the higher the degree of competition of the entered search query. As you understand, the higher the competition, the more difficult it is to promote a site for such a request.

Geographical distribution of key queries:

Based on geography, search queries can be divided into “geo-dependent” and “geo-independent” queries. For example: “buy kiprich” or “dentistry Moscow” will most likely be tied to a specific area due to the economic feasibility of purchasing it or ordering a certain service by the user. But for a request like “download video,” geography has absolutely no meaning.

Selection of keywords for promotion

Selecting keywords to promote a website or online store is an important stage in promoting the entire resource. Selection of keywords (in other words, compiling a semantic core) is the process of compiling a list of keywords and (or) phrases that reveal in more detail the content of a website or online store.

Each of the requests should describe the content of a single page of the site as succinctly as possible, i.e. answer the question “What will the user find on this page?” By answering this question for yourself, you can edit the content of your online store page accordingly and achieve greater conversion when users visit your site.

How to choose the right keywords for an online store?

Online stores have some specifics when promoting them in search engine results. When selecting keywords to promote an online store, you should pay special attention to the following points:

  • Choose key queries and transactional phrases for your online store - after all, you are most interested in precisely those visitors who are ready to buy the product sold in your store and who carry out a targeted search on the Internet for this particular product
  • Try to use keywords that most accurately reflect the content of the page of your online store for which you are selecting them. You should not use the most high-frequency words and keywords - as this will only lead to unnecessary waste of the budget during subsequent promotion and will not necessarily lead to an increase in sales. These words are usually of an informational type and they will bring a large number of visitors to your site, but, as experience shows, there will not be a large number of sales.
  • Use only one or two key queries per promoted page. This will allow you to most accurately optimize the page content specifically for these requests.

Here are a few simple rules for forming a query in the Yandex search engine.

Keywords in the query should be written in lowercase (small) letters.

This will ensure that all keywords are searched, not just those that start with a capital letter.

When searching, all forms of the word are taken into account according to the rules of the Russian language, regardless of the form of the word in the query.

For example, if the word “know” was specified in the query, then the words “we know”, “you know”, etc. will also satisfy the search condition.

To find a stable phrase, you should enclose the words in quotation marks.

For example, “porcelain dishes”.

To search by exact word form, you need to put an exclamation mark in front of the word.

For example, to search for the word “September” in the genitive case, you would write “!September”.

To search within the same sentence, words in the query are separated by a space or an & sign.

For example, “adventure novel” or “adventure&romance”. Several words typed in a query, separated by spaces, mean that they all must be included in one sentence of the document being searched.

If you want only those documents that contain each word specified in the query to be selected, put a plus sign “+” in front of each of them. If, on the contrary, you want to exclude any words from the search result, put a minus “-” in front of this word. The signs “+” and “-” must be written separated by a space from the previous one and together with the next word.

For example, the query “Volga-car” will find documents that contain the word “Volga” and not the word “car”.

When searching for synonyms or words with similar meanings, you can put a vertical bar “|” between words.

For example, for the query “child | baby | baby" documents with any of these words will be found.

Instead of one word in a query, you can substitute an entire expression. To do this, you need to put it in brackets

For example, “(child | toddler | children | infant) + (care | parenting).”

The "~" (tilde) sign allows you to find documents with a sentence containing the first word but not the second.

For example, the query “books ~ store” will find all documents containing the word “books”, next to which (within the sentence) there is no word “store”.

If the operator is repeated once (for example, & or ~), the search is performed within the sentence. The double operator (&&,~~) specifies a search within a document.

For example, the query “cancer ~~ astrology” will find documents with the word “cancer” that are not related to astrology.

Let's return to the example with aquarium fish. After reading several documents offered by the search engine, it becomes clear that searching for information on the Internet should not begin with choosing aquarium fish. An aquarium is a complex biological system, the creation and maintenance of which requires special knowledge, time and serious investment.

Based on the information received, a person searching on the Internet can radically change the strategy for further search by deciding to study specialized literature related to the issue under study.

To search for literature or full-text documents, the following query is possible:

“+(aquarium | aquarist | aquarium hobby) + for beginners + (advice | literature) + (article | thesis | full text) - (price | store | delivery | catalog).”

After processing the request by the search engine, the result was very successful. Already the first links lead to the required documents.

Now you can summarize the search results, draw certain conclusions and decide on possible actions:

  • Stop further search, since for various reasons you are unable to maintain an aquarium.
  • Read the suggested articles and start setting up an aquarium.
  • Look for materials about hamsters or budgies.

Questions.

1. What type of search is the fastest and most reliable?

2. Where can a user find Web page addresses?

3. What is the main purpose of a search engine?

4. What parts does a search engine consist of?

5. What search engines do you know?

6. What is the technology for searching using the search engine's rubricator?

7. What is the technology for searching by keywords?

8. When should you specify + or - in the search criteria?

9. What search criteria in Yandex are specified by the following phrase:

(nanny|educator|governess)++(care|education|supervision)?

10. What does doubling the sign (~~ or ++) mean when forming a complex query?

Exercise.

Task 1. Search through catalogues.

Using the search engine directory, find the following information (as directed by your teacher):

1. Lyrics of a song by a popular music group

2. Repertoire of the Mariinsky Theater for the current week

3. Characteristics of the latest mobile phone model from a well-known company (of your choice)

4. Recipe for Ukrainian borscht with dumplings

5. Long-term weather forecast in your region (at least 10 days)

6. Photo of your favorite contemporary singer

7. Approximate cost of a multimedia computer (price list)

8. Information about vacancies for the position of secretary in your region or city

9. Horoscope of your zodiac sign for the current day

Based on the search results, make a written report in Word: present the material found, copied and formatted in the document. Submit your report to your teacher.

Task 2. Forming a request using the exact title or quote.

You know the exact title of the document, for example, “Hygienic requirements for personal electronic computers and work organization.” Formulate a query to search the Internet for the full text of a document.

Save the search result in your folder. Show it to your teacher.

Task 3. Formation of complex queries.

  • In any search engine, create a query to search for information about the Russian bath. Eliminate offers of services, advertising of bath accessories and other advertising. Focus your search on the effect of a Russian bath on the body.
  • Create a complex query to find information on caring for indoor cats. Exclude large cats (such as lions) from your search, as well as offers to buy, sell, photos for wallpaper, etc.
  • Formulate the text of the request and the search result in Word and present it to the teacher.

Task 4. Thematic search.

By all means known to you, search the Internet for information on the history of the development of computer technology. Perform your search in various areas: historical situation, technology, personalities. Present your search results in the form of a presentation. Use a multi-stage table of contents in the form of hyperlinks in your presentation.

The queries that we studied earlier are called query-selections. When they are saved in the machine's memory, only the specified search conditions are saved. Every time you run a request for execution, a so-called dynamic data set. He doesn't really exist.

Change request is a query that makes changes to multiple records in one operation. There are four types of change requests: to delete, to update, to add records, and to create a table.

Removal request used to automatically delete a group of records that meet certain conditions from one or more tables. Moreover, you can only delete the entire record, and not individual fields within it.

The operation of deleting records cannot be undone, so it is recommended to create a backup copy of the table before performing it.

Sequencing:

1. In query designer mode, enter the “Query” menu and select the “Delete” command. An additional “Delete” line will appear.

2. In the “Selection condition” line, indicate which records should be deleted.

Neither Figure 4.22 shows the designer window, in which those who have passed the exams for two will be excluded from the students receiving the scholarship. Please note that in the version that we have implemented, students who received bad marks in three exams are deprived of scholarships, if we moved the conditions for passing two in English to one line below (the “or” line), and a bad mark in mathematics would be written even lower, this would mean searching for students who received a bad mark on at least one exam.

Request to update records. Makes general changes to a group of records that are selected using conditions in one or more tables. This type of query allows you to change data in existing tables.

Let's say that initially students were awarded a scholarship in the amount of 34 rubles. (Fig. 4.23). Then they decided to increase the scholarship by 50 rubles. This can be done using an update request. To create an update request, in the Query Builder mode, select the “Query” / “Update” menu command. A new line “Update” will appear at the bottom of the form, into which you should enter an expression for the calculation (Fig. 4.24).

Rice. 4.22. Delete Request Designer Window

Rice. 4.23. Source data table

Rice. 4.24. Update Request Designer Window

When you run a run request, a message appears that you must confirm. After you confirm updating the records, the appearance of the screen will not change; all changes occur only with the table. To view them, open the table. The values ​​in the “Scholarship” field should increase.

Update queries allow you to make changes not only to all table records, but also to individual records that are found based on certain conditions. In this case, in the “Selection condition” line, conditions are entered that determine which records to select for change, and in the “Update” line they indicate how they should be changed.

After passing the exam, the dean's office decided to deprive all students of their scholarships who received at least one bad mark in the session. A request was made and... It should be noted that the printed 0 in the “Update” line means that the scholarship will be equal to 0, but not in all records, but in those that satisfy the conditions given in the adjacent column (Fig. 4.25).

Rice. 4.25. Update Request Designer Window

Conditions are combined with the word OR (or VT=2, or Mathematics=2, or English=2).

Let’s add a new field “Dormitry” to the table, but we won’t fill it in manually, leaving it empty. Let's determine who needs a dormitory, considering that if a student lives in Donetsk, a dormitory is not required, but if living in other cities, it is required (Fig. 4.26).

Let's launch the execution request by clicking on the button, and then open the table. For clarity purposes, all columns are hidden except the “Last Name” and “Dormitry” columns (Fig. 4.27).

As you can see, the update request is very convenient, allowing you to automatically change outdated information to new information, change the contents of tables according to certain conditions.

Rice. 4.26. Update Request Designer Window

Rice. 4.27. Result of the update request

By using add request tables, you can add records from one table to the end of the table you specify or several tables. creates a new table based on all or part of the data from one or more tables.

Let's say you want to create two tables based on an existing one, but transfer information about students who need a dormitory into the first table, and information about students living in Donetsk into the second table. This operation is performed using a table creation query (Figure 4.28).

For this:

~ transfer to the query those fields that should be in the table;

~ indicate the selection conditions;

~ enter the “Query” / “Table Creation” menu, in the window that appears, enter the name of the table to be created, in our case it is called “Nonresident”;

~Run the execution request. Agree to create a new table;

The table will appear in the list of existing tables .


Rice. 4.28. Table Creation Query Design Window



Other news

Main topics of the paragraph:

♦ three ways to search the Internet;
♦ search servers;
♦ search engine query language.

Three ways to search the Internet

Search engine query language

A group of keywords formed according to certain rules - using a query language - is called a request to the search server. The query languages ​​for different search servers are very similar. You can learn more about this by visiting the “Help” section of the desired search server. Let's look at the rules for forming queries using the Yandex search engine as an example.

Operator syntax What does operator mean? Example request
space or & Logical AND (within a sentence) physiotherapy
&& Logical AND (within document) recipes && (processed cheese)
| Logical OR photo | photography | snapshot | photographic image
+ Mandatory presence of the word in the found document +to be or +not to be
() Grouping words (technology | production) (cheese | cottage cheese)
~ Binary operator AND NOT (within a sentence) banks ~ law
~~
or
-
Binary AND NOT operator (within document) Paris guide ~~ (agency | tour)
/(n m) Distance in words (minus (-) - back, plus (+) - forward) suppliers /2 coffee
music /(-2 4) education
vacancies - /+1 students
“ ” Search for a phrase "Little Red Riding Hood"
Equivalent: red
/+1 hat
&&/(n m) Distance in sentences
(minus (-) - back,
plus (+) - forward)
bank && /1 taxes

To get the best search results, you need to remember a few simple rules:

1. Do not search for information using only one keyword.
2. It is better not to enter keywords with a capital letter, as this may lead to the fact that the same words written with a lowercase letter will not be found.
3. If you don't get any results from your search, check if there are any spelling errors in your keywords.

Modern search engines provide the ability to connect a semantic analyzer to a generated query. With its help, you can enter a word and select documents in which derivatives of this word are found in various cases, tenses, etc.

Questions and tasks

1. What are the three main ways to search for information on the World Wide Web?
2. How do links to specific documents get into search engines?
3. Formulate a complex query consisting of several keywords using the query language of the Yandex system.

What You Should Learn from Chapter 1

Exchange information with the local network server of the school computer class.
Send and receive emails.
Order news from newsgroups.
Receive information from a Web page whose address you know.
Search for information on the Internet using search programs.

Edited Date: Saturday, 29 June 2019