1C Enable full-text search. Full text search. What is a quick search

Full text search - Let me find text informationplaced almost anywhere in the configuration used. In this case, it is possible to search for the necessary data either throughout the configuration as a whole, or by narrowing the search area to several objects (for example, certain types of documents or reference books). Search criteria themselves may vary in a rather wide range. That is, it is possible to find the necessary data, without even remembering exactly where they are stored in the configuration and exactly recorded.

Full-text search provides the following features:

  • There is support for transliteration (writing Russian words Latin symbols in accordance with GOST 7.79-2000). Example: "Russian phrase" \u003d "Russkaya Fraza".
  • There is support for substitution (writing a part of the symbols in the Russian words by classmate Latin symbols). Example: "Russrfz frap" (the end of each word is typed by a latin, for example, as a result of an operator error).
  • There is a possibility of fuzzy search (the letters in the found words may differ) indicating the threshold of fuzziness. Example: When specifying in the search bar, the word "hello" and a nonsense of 17%, we will find all similar words with errors and without: "Hi", "Pret", "Resort".
  • It is possible to specify the search area for selected metadata objects.
  • Full-text indexing of standard field names ("Code", "Name", etc.) is made in all configuration languages.
  • The search is made taking into account the synonyms of Russian, English and Ukrainian languages.
  • The morphological dictionary of the Russian language contains a number of specific words related to the areas of activity automated using the "1C: Enterprise" program system.
  • Standardly, the vocabulary bases and dictionaries of the Tezaurus and the synonyms of the Russian, Ukrainian and englishwhich are provided by the company "Informatik."
  • The search can be carried out using wildcard characters ("*"), as well as indicating search operators ("and", "or", "not", "near") and specialsimeters.

Full-text search can be carried out in any configuration on the 1C platform: Enterprise 8

In order to open the full-text search box, you must perform the following:

Normal application - menu item Operations - Management of full-text search.

Controlled application - menu item Main Menu - All Functions - Standard -Managing full-text search.


  • Update the index - Creating an index / index update;
  • Clear the index - zeroing the index (recommended after updating all data);
  • item Allow the fusion of indexes - responsible for merging the main and additional index.

Full-text search is carried out using a full-text index. In the absence of an index, a full-text search as such is not possible. In order for the search to have a result, all the necessary data should be included in the full-text index. If the user is entered into the database new data, they should be included in the index in question, otherwise they will not participate in the search. To avoid this, you need to update the full-text index. When updating, the system analyzes only certain types of data: a string, reference type (references to documents, reference books), number, date, repository. If the user does not have access rights to certain information, he will not be able to see it in the search results. It should also be remembered that in the properties of objects on which the search will occur should be set to Full-text search - usewhich is default.

How can you notice the property Use Installed for the entire reference book Counterpartiesbut this can be done for each of its proper type props.

Consider the full-text index, which consists of two parts (indexes): the main index and additional. High data search speed is provided by the main index, but its update occurs relatively slowly, depending on the amount of data. The additional index is opposite. The data is added to it much faster, but the search is carried out slower. The system searches simultaneously in both indices. Most of the data is mainly in the index, and the data added to the system fall into the additional index. While the amount of data in the additional index is small, the search for it occurs relatively quickly. At that moment, when the load on the system is small, the fusion of indexes occurs, as a result of which the additional index is cleared, and all data is placed in the main index. The fusion of indexes is preferable to perform at that time when the load on the system is minimal. For this purpose, you can create regulated tasks and tasks on the schedule.

Special operators allowed when specifying a search expression

The mechanism of full-text search allows writing of the part of the symbols of the Russian word classic latin characters. The result of the search does not change.

Two operators near

  • simplified. At a distance of 8 words from each other
  • Near / [+/-] n - Search for data in one details at a distance of N-1 words between them.

The sign indicates in which direction from the first word will be the search for the second. (+ - after, - before)

The group symbol "*" can only be used as the end of the word

Operator Fucetitude "#". If it is not known exact writing name, name.

Software and means 1C: Programming.

Operator Synonyms "!". Allows you to find the word and its synonyms

How to programmatically update the full-text search index?

Code 1C V 8.x Procedure Update Index () Export
Full-textsPoysk. Vectiteindex ();
Extrudresses

Example of full-text data search

Definition of variable listpost

Code 1c v 8.x to list |

In addition, in the processing procedure, the form of a form of a form will determine that this variable will contain a list of full-text search by which we will search in data

Code 1C V 8.x Operating Procedure ()
ListPudicity \u003d full-texticalPoisk. Create aspisses ();
Extrudresses

Now for the Find button, you will write a code that will allow us to search in accordance with the expression that is specified in the Search Engine field.

Code 1C V 8.x Procedure Folding (Element)
ListPrust.strocco \u003d Search Recovery;
Attempt
ListPrust. Forward ();
An exception
WARNING (Query ());
Celebrations;
If the listpiece. Fully care () \u003d 0 then
Elementforms. Measure. Description \u003d "No found";
Elementforms. Results. Software setting ("");
Otherwise
Submission result ();
Ended;
Extrudresses

First, in this procedure, we set the search expression entered by the user, as a search string for full-text search. Then we perform the first method (), which actually starts the full-text search and returns the first portion of the results. By default, the portion contains 20 items. After that, we analyze the number of items in the search list. If it does not contain a single element, then we are displayed in the form of the appropriate message. Otherwise, the dislocation procedure is called (), which displays the results obtained by the user.

Create a procedure in the form module with the same name and write code in it,

Code 1C V 8.x Tempulture procedure ()
Elementforms. Measure. Description \u003d "Shown" + string (listpoint. Proposition () + 1) + "-" + string (listpoint. Proposition () + list.
Result \u003d list. PouringCreusing (typewriting additivesTexto.HTMLText);
Elementforms. Results. Set the settect (result);
Accessibility ();
Extrudresses

Actions performed in this procedure are simple. First we form a message about which items are displayed and how many elements are found. Then we get the result of full-text search in the form of HTML text and display this text in the HTML document field located in the form.

In conclusion, we transmit management to the accessibility procedure () in order to make accessible or, on the contrary, to prohibit access to the previous portion and the next portion (depending on which portion of the results obtained is displayed). The text of this procedure is presented in the code.

Code 1C V 8.x Procedure Accessible Points ()
Elementforms. Insertion. Availability \u003d (ListPrust. Runnerity () - listpost. Promotion ())\u003e listpost. Number ();
Elementforms. Demanding. Availability \u003d (listpost. PromotionPosition ()\u003e 0);
Extrudresses

Now you need to create the handlers for pressing the previous items () and as follows ().

Code 1C V 8.x Procedure Previous Positioning (Element)
Listpoint. Conducting ();
Submission result ();
Extrudresses
Procedure Next Search (Element)
Listpoint. Next ();
Submission result ();
Extrudresses

The final "stroke" will be the creation of an ONClick event handler field of the HTML document field located in the form. The fact is that the result of the full-text search presented in the form of HTML text contains hyperlinks to the elements numbers search list. And we would like to go to the user when switching the user to this link to open the form of the object that contains in this element of the list. To do this, we will intercept an ONClick event of an HTML document contained in the HTML document field to receive the number of the list from the hyperlink and open the form of the appropriate object. The ONClick event handler text is presented in the code

Code 1C V 8.x Release ProcedureOnclick (element, pevtobj)
HTMLELEMENT \u003d pevtobj.srcelement;
// Check the element identifier
If (htmlelement.id \u003d "FullTextSearchListItem") then
// Get the file name (search list number),
// contained in the hyperlink
The list \u003d HTMLELEMENT.NAMEPROP;
// Get a search list string by number
Selected \u003d list [number list];
// Open the form of the found object
Open-outset (selected.
pevtobj.returnvalue \u003d false;
Ended;
Extrudresses

The functionality of the new search is based on two mechanisms:
- full-text search (it works very quickly and requires minimum computational resources);
- Search by means of DBMS (in general, the search duration and costs of computational resources are proportional to the amount of information in the table).

In the current implementation, the search will be included in the list. without use Full-text search in the following cases ():
- Full-text index is turned off at the level information base;
- the object of the main table is not indexed by a full-text index;
- As a result of searching with full-text search, an error was obtained.

If the full-text search is included in the information base, and the index is not updated at all or partly (from my practice 95% of the information bases of customers), the user when searching will receive either unreliable or empty search result.

We ask the company 1C - how to be? How to guarantee the accuracy of search results always?
We get the answer: Yes, in order for the search results to be relevant to the full-text search, you need to ensure that the full-text search index is relevant. There is no other options for efficient and actual search. ().

Does there be a "current full-text index"? Depends on the number of users, the intensity of changing information in the database and frequency of the index update. Usually the index update is started in 60 seconds. Well, if there were not many objects changed, and the procedure managed to process all changes for these 60 seconds. And if you made a double-minded group of documents, or mass rewriting of the reference book? In this case, no one can guarantee the time through which the search for the index will again give reliable data.
In principle, this is not particularly critical than several situations. A frequent version of the user is to install in the list of selection for some value, such as "counterparty", enter a new or copy existing document and write down. With old search new document It was instantly visible in the list. Now the user will see it only through N seconds at best, where N is rather closer to 50-60 seconds than 2-3.
If you do not notice that there is no new document and on selected results provide information to anyone, then it will be obviously unreliable.

It was in case normal work with an information base. What will happen in specific situations? I will give a couple of examples.
1) In the working database, the full-text index is turned on and often updated. The user asks to deploy him a copy of the working base, which is on data analysis on it.
We restore the backup and give access. That's just a full-text search will not work, because index is not stored in the DBMS, but in separate files (and in the file, and in the client-server version). There is no index in the DT file.
those. So that the user can use the list search - you need to turn off the full-text index in this database. True, the user will be slightly surprised by the fact that the search will be performed much longer. Or rebuild the index throughout the database.

2) (relevant for less large bases). In the working database, the full-text index is turned on and often updated. The end of the month comes and the closing of the period begins. We begin massively ship and minimize documents. To reduce the load on the system, block the execution of regulatory tasks, respectively, and the update index stops. Users will, to put it mildly, in bewilderment - there are no new or modified documents in the lists. The only output is to disable the full-text search for the information base, and, accordingly, to get even more hardware on the equipment due to heavy search for all details.

Thus, it seems to me, the index update operation will become another headache of administrators of information bases.
The system previously guaranteed 100% accuracy and relevance of information at any time, now turns into reference systemin which it is impossible to be completely confident.
And users get another reason for the reproach of IT Schnikov - "Your system is incorrectly working."

In this article, I will tell you about the function of quick search 1c enterprise 8. What quick search? Very simple. Quick search is one of the ways of navigating in large lists of 1C records. These can be lists of documents, directories, registers are all that is represented by tables.

What is a quick search?

The quick search function in the documents 1c enterprise is extremely convenient and allows you not to scroll through huge data arrays (for example, using the scroll bar), and immediately go to the desired location in the list. Unfortunately, the novice users of 1c enterprise 8 (including 1C accounting 8) initially do not use the ability to quickly search, preferring to flipping lists of documents manually (and they can be highly big). This article will help you deal with the use of a quick search in 1C.

First of all, it should be noted that in the configurations of 1c enterprise 8 built on managed forms, quick search works otherwise than in previous versions 1C. Therefore, we will analyze separately the use of quick search in managed formas and in ordinary.

Quick search in 1C Accounting 8.2

In versions of 1C accounting from 8.0 to 8.2 Function is intended for transition To the desired part of the list. For example, look at the Account Plan window shown in the figure.


The window highlighted some row. Pay attention to the unauthorized triangle from the strips to which the red arrow indicates. As in other Windows programs, where there are lists (for example, in the conductor), the position of this marker (triangle) determines the sorting of the list as a whole - in which column the marker is installed, on the same and the entire list will be sorted. In the figure, the marker is in the code column, therefore, the account invoice will be sorted by code.

The marker can be moved from one column to another, clumsy on the desired column ( on the heading column!) Mouse. If the marker is already standing in the current column, then the click will lead to a change in the sort direction to the opposite (i.e., from more to a smaller or vice versa). This is standard behavior for any windows programs. What is the feature of this marker in 1c enterprise and how is it connected with the rapid search?

Quick search in 1C lists Enterprise 8 is carried out by column in which the marker is standing. In this case, the quick search in the account plan will be carried out by column code.

There was an important part of the article, but without JavaScript it is not visible!

How to enjoy fast search in 1c? Easily! Just start printing what you want to find in this column.. Where there is a marker. In the example, in the figure above, you must enter the account number. For example, you want to find a score of 50 cashier. In this case, enter ( mouse click no anywhere!) The number 50 from the keyboard and if in this column there is an account with the same number (and it, of course, is), then the list scrolls to this line, and the string itself will be dedicated. The result is shown in the screenshot of the account plan below.

website_

The text on which the arrow indicates, i don't need to wash - He will disappear.

If you start typing the word "ticket" in the above example, the text at the bottom of the window will be entered, and then stacked. It happens because as soon as start The entered quick search string ceases to match the beginning of at least one line in this column, 1C enterprise concludes that the desired line is not found and automatically erases it. Concerning you should remember two rules.

In 1c enterprise 8 quick search is made at the beginning of the line, i.e. The column is searched for a coincidence of the input text with the beginning of one of the rows of this column.
This implies an important recommendation: when entering data to reference books, call the items so that it is convenient to search with quick search. For example, the name of the counterparty is better to write as "NameFirma LLC" than "LLC NameFirma. And all the more should not be used in the name of quotes and other unnecessary symbols ( we are talking On filling the field name in forms).

If you started entering text, and it is erased - what you are looking for is missing in this column! In this case, check the input language, as well as the column in which a quick search is made. Typical error - not that column is selected. For example, the marker is installed in the code column, and the search is made by the name of the account.

Quick search in 1C Accounting 8.3

Now let's see what is the difference between a quick search in version 1c enterprise 8.3. Use is largely similar to version 8.2, but there is one significant difference that should be remembered.

In 1C accounting 8.3, as well as in any other configurations on managed forms (the newest interface) works as a filter. Simply put, as a result of a quick search function, part of the list hiding.

How to use it, we will figure out with you now. To begin with, look at the screenshot of the 1C Accounting Account Plan 8.3, which is reduced below.

website_

As you can see, the same marker in one of the columns. The search is also made by the column in which the marker is installed. It all remains unchanged. However, if you start typing text (in the example, the account number), then the following will occur.

website_

As you can see, the search box has simply opened automatically. The same window will open if you click on the search button on the window toolbar (in the figure is underlined). As a result, when you click in the search window, find the find (in the picture is hidden behind the drop-down menu) or just ENTER, then get the following result.

website_

It seems that quick search in 1C Accounting 8.3 Just leaves the visible part of the list that satisfies the search conditions. In this case, the Find button disappears, and instead it appears a lens with a cross (in fig. Stressed), when you click on which the list returns to the initial state (This remains highlighted a string found as a result of quick search).

Another important feature of the quick search in 1C Accounting 8.3 - The coincidence is not looking for at the top of the line, as in version 8.2, but is a search for a coincidence with any part of the rows in the column. Thus, if the counterparty is called "Ltd.phirma LLC", and when searching to start entering "Namefirma LLC", then there will still be a string!

We draw conclusions

Thus, a quick search in 1C Accounting 8.2 and earlier versions is intended to scroll through the list to the desired line, and in 1C Accounting 8.3 Quick search works as a regular filter, hiding unnecessary part of the list.

Full text search mechanism in 1C Allows you to quickly find the information you need. This species The search is particularly effective if the information base has a large amount of information, and it is also not for sure that the user you are interested in are, or as often happens, their exact name is not known. To open the full-text search box, you must perform the following: Menu item Operations Control of full-text search .

In this window, you can observe three buttons: Setting - Enabling / disable full-text search;

Update the index Creating an index / index update; Clear the index - zeroing the index (recommended after updating all data); paragraph Allow fusion indexesresponsible for the merger of the main and additional index.

Full-text search is carried out using a full-text index. In the absence of an index, a full-text search as such is not possible. In order for the search to have a result, all the necessary data should be included in the full-text index. If the user is entered into the database new data, they should be included in the index in question, otherwise they will not participate in the search. To avoid this, you need to update the full-text index. When updating, the system analyzes only certain types of data: Row, reference type data (links to documents, directories), Number, date, storage. If the user does not have access rights to certain information, he will not be able to see it in the search results. It should also be remembered that in the properties of objects on which the search will occur should be set to Full-text search - usewhich is default.

How can you notice the property Use Installed for the entire reference book Regoomero. but this can be done for each of its proper type props.

Consider a detailed full-text index, which consists of two parts (indexes): main index and additional . High data search speed is provided by the main index, but its update occurs relatively slowly, depending on the amount of data. The additional index is opposite. The data is added to it much faster, but the search is carried out slower. The system searches simultaneously in both indices. Most of the data is mainly in the index, and the data added to the system fall into the additional index. While the amount of data in the additional index is small, the search for it occurs relatively quickly. At that moment, when the load on the system is small, the fusion of indexes occurs, as a result of which the additional index is cleared, and all data is placed in the main index. The fusion of indexes is preferable to perform at that time when the load on the system is minimal. For this purpose, you can create regulated tasks and tasks on the schedule.

Consider the case automatic update Index when you start the application. This case is suitable for single-user databases (as single-user databases, such products can be 1C Accounting Basic, 1C Simplified) Since with a large number of users the update will occur after the application is launched by each of the users, which will very much affect the system performance.

To begin with, create a common module and call it, for example PP. In it wept the following procedure:

Procedure Upgrade Index () Export

Full-textsPoysk. Vectiteindex ();

Extrudresses

Also set the properties as in the figure.

Then click right-click mice on the configuration name in the configuration tree and execute the command Open the managed application module. Choose in a small window from above a predefined function Priorocommallium and put the following line in this procedure:

UpgradesFextOPEECTOESPOVEEPOPEEKS ();


Save the changes made. Thus, after each launch of the application, the index will be updated automatically.

Now consider the case when users are several. Here we use Regulatory tasks (in Configurator mode: In the configuration tree - General - regulatory tasks).In this case, we are only interested in two tasks: Update inductionExtectoching and fusion indemnity.In the properties of these tasks choose schedule and click on the fourth Open.

Configure schedules from both tasks. There is no recommendations for configuration in this case, here the setting is determined on the basis of the features of the system (load, the amount of information, the frequency of its update etc.). The tasks themselves will not work for themselves, we will need to have a running program session in mode Enterpriseswhich will be responsible for performing these tasks. Immediately it should be noted that this option Works used for file System. In this session, expectation processing must be launched that calls the built-in language method. This treatment will have the following form:

We turn into the enterprise mode and do the following: Let's start our processing, which in this case will be called every 5 seconds and, in turn, calls the "PerformingCadded () method". This method Checks whether it is time to perform tasks according to their schedule. Next, go to the menu item Operations - Constants - Setting up the program - Data exchange tab.

We define a user session that will be responsible for the execution and set the survey interval of regulatory tasks. It is not recommended to work in this session, as this may affect the system performance. Also on ITS disks there is processing " Started plants", Which forcibly launches the regulatory tasks for the choice of user. The form of this processing is as follows:

Thus, all preparatory work is performed and can be proceeding directly to the search for data.

To start working with full-text search, you must execute the following command: Menu Service à Data Search.

After that, the following window will appear:

Pressing the button Settingswill appear the field with additional settings, such as: Restriction of the search area, Fuzzy, Size portion(In this case, the value \u003d 5, which means the output of five search results per page). Parameter Fuzzy denotes the mismatch of the characters in search request and received during the search for information. Fuzzy Sets the percentage ratio.

Full text search can use the following operators:

In addition, the mechanism of full-text search allows writing of a part of the symbols of the Russian word classic latin characters. The result of the search does not change.

In the client-server version, job scheduler is engaged in the task scheduler.

Task Scheduler is active component Servers, i.e. Regardless of the availability of client connections with the server, it can perform regulatory tasks. The activity of the planner is especially noticeable when it consistently polls all information bases for the presence of regulatory tasks in them. The planner may postpone the survey of a specific information base if the connection is imposed on the information base or blocking the regulatory tasks.

The current list of regulatory tasks in the scheduler can automatically change (for example, when a new or already existing regulatory task is created). In any case, the task mechanism ensures the relevance of the list of regulatory tasks of the scheduler and its compliance with the lists of regulatory tasks of the cluster information bases.

After the initial list of regulatory tasks has been successfully received, the scheduler periodically checks whether the requests for the completion of background tasks did not do any regulatory tasks in accordance with their schedule. After the task is obtained by the workflow, the workflow establishes a connection to the information base and performs the task within this compound. Since the workflow is optimized for multiplayer work, only the first creation of a connection with an information base is a cost operation. Installation of subsequent connections with the same information base occupies significantly less than time and resources, because Most internal data structures are divided between connections to one information base. After completing the task, the workflow notifies the planner on a successful or unsuccessful task execution. In the case of a software failure, the planner can restart the regulatory task (if the failure occurred during execution background task, it will not be restarted).

Thank you!

Tip1: Disable full-text search *

Most accountants do not know about the existence of this function and never use it (service - data search)

The 1C full-text search mechanism allows you to find information in 1C keywords (By analogy with searching on the Internet, when you enter the word, and you are issued query results). At the same time, the search time significantly depends on the volume of the base and can take several hours. Disable full-text search mechanism does not affect other functions and stability of 1C.

The mechanism of full-text search in 1C is enabled by default. To disable full-text search, you need to go Operations - Control of full-text search-The setting and remove the sign " Allow full-text search»

Disable full-text search mechanism is carried out in the monopoly mode (no one should work in the program except you) **

Disabling full-text search mechanism gives an increase in productivity up to 10%.

Tip2: Recalculation of results *

Most accountants do not know about the existence of this operation, and it must be performed every month.

Results are 1C mechanisms for quick access to the data in the formation of reports and the implementation of various computing operations.

In order to perform the results of the results, you need to go to the operation - management of the results, set the date for which you calculate the results (beginning of the current month) in the "All Registers" section and click the "Run" button

Recalculation of results is carried out in monopoly mode (no one should work in the program except you) **

Recalculation of results gives an increase in productivity up to 10%.

Tip3: Disable Leverage Objects ***

Most accountants do not know about the existence of this function and do not use it.

Unlike the standard registration log, the viewing of objects will allow to store information not only about which user worked with the document, but what exactly it changed (service is the history of object changes). This mode is useful, but it is recommended to include it only for a specific list of documents, because It leads to a decrease in the performance of 1C and an increase in the information base.

Versioning configuration is carried out through the operations - configurations of the program. If the setting is not required, you need to remove the sign "Use Leverage Objects".

If the setting is needed for a specific list of documents, then go to "Setting up the objects of objects" and right-click setting the "Version" for the desired objects **

Turning off versioning gives an increase in performance to 5%.

_________________________________________________________________

* For configurations based on "1C: Managing the Production Enterprise", "1C: Complex Automation", "1C: Company Accounting 2.0", "1C: Trade Management 10.3"

** Before performing regulatory operations with the base, it is necessary to create a copy of the base.

*** For configurations based on "1C: Managing a manufacturing enterprise", "1C: Complex Automation".