Hello!
Today we will talk about Elasticsearch (hereinafter ES) full-text search engine, with which
platform Docsvision 5.5 works.

')
1. Installation
You can download the latest version via the link:
www.elastic.co/downloads/elasticsearchScreenshot installer below:

2. Functional check
After installation is complete, go to
http: // localhost: 9200 /A page with ES status should be displayed, example below:

If the page does not open, make sure the Elasticsearch service is running. On Windows, this
Elasticsearch service.

3. Connect to Docsvision
Connection to Elasticsearch is configured on the full-text service page.
indexing.

Here you need to specify:
1. Address of the Elasticsearch server (set during installation).
2. The string to connect to the database.
3. Address Docsvision (in the format ConnectAddress =
http: // SERVER / DocsVision / StorageServer / StorageServerService.
asmx )
4. On the “Cards” and “References” tabs, you need to configure the data that
need to index.
You also need to make sure that the account under which the Docsvision service is running
Fulltext Indexing service, has access to the Docsvision database in MS SQL.
After connecting, you need to make sure that tasks with the prefix are created in the MS SQL database:
“DV: FullText_ <NIDEN_> _CardWithFilesPrepareRange”

After completing the settings in the Windows client, the search string will be unlocked.
4. REST API Elastic
An administrator can get various information about how Elasticsearch works by using
provided by the REST API.
In the following examples, we will use the Insomnia Rest Client.
Getting general information
As soon as the service started and started working (http: // localhost: 9200 / in the browser), you can
execute the query:
http: // localhost: 9200 / _cat / health? vGet the answer about the status of the Elasticsearch service (in the browser):

Insomnia Status Response:

Pay attention to the Status - Green, Yellow, Red. Official documentation states the following statuses:
• Green - Everything is good (Cluster is fully operational)
• Yellow - All data is available, but some replicas in the cluster have not yet been allocated for their
• Red - Some data is not available for any reason (the cluster itself is functioning normally)
Getting states about nodes in a cluster and their state (I have 1 node):
http: // localhost: 9200 / _cat / nodes? v
All indices ES:
http: // localhost: 9200 / _cat / indices? v
In addition to indexes from Docsvision, there may be indexes of other applications - heartbeat,
kibana - if you use them. Necessary from unnecessary can be sorted. For example,
We take only the indices, in the name of which there is a% card% in the title:
http: // localhost: 9200 / _cat / indices / * card *? v & s = index
Elasticsearch configuration
Retrieving Elasticsearch settings:
http: // localhost: 9200 / _nodesThe result will be quite extensive, including the paths to the logs:

How to know the list of indexes, we already know, Docsvision does this automatically, giving the name of the index in the format:
<name_BD + typeIndexedCards>
You can also create your own independent index:
http: // localhost: 9200 / customer? prettyOnly it will not be GET, but a PUT request:

Result:

The following query will show all indexes, including new ones (customer):
http: // localhost: 9200 / _cat / indices? v
5. Getting information about indexed data
Status of Elasticsearch indexes
After the initial configuration by Docsvision is completed, the service should be ready to work and start indexing the data.
First of all, we check that the indices are filled and their size is larger than the standard “bytes” by the familiar query:
http: // localhost: 9200 / _cat / indices? vas a result, we see: 87 “tasks” and 72 “documents” were indexed in terms of our SED:

After some time, the results are as follows (by default, job indexing is run every 5 minutes):

We see that the number of documents has increased.
How to understand that the desired card is indexed?
• First, you need to make sure that the card type in Docsvision matches the data specified in the Elascticsearch settings.
• Secondly, wait until the array of cards is indexed - if you get to Docsvision, it should take some time before the data appears in the storage.
• Thirdly, you can search the card by CardID. This can be done by query:
http: // localhost: 9200 / _search? q = _id = 2116C498-9D34-44C9-99B0-CE89465637C9If there is a card in the vault, we will see its “raw” data, if not, we will see something like this:

Card search in Elasticsearch node
Find a document that matches the Description field:
http: // localhost: 9200 / _search? q = description: Outgoing tv1Result:

Search for a document that has the entry 'Inbox' in Description
http: // localhost: 9200 / _search? q = description like InboundResult:

Search card by the contents of the attached file

Find all the document type cards:
http: // localhost: 9200 / _search? q = _type: CardDocumentor all task type cards:
http: // localhost: 9200 / _search? q = _type: CardTaskUsing the
and constructions
and parameters that Elasticsearch gives in the form of JSON, you can build such a query:
http: // localhost: 9200 / _search? q = _type: CardTask and Employee_RoomNumber: Eagle office and Employee_FirstName: KonstantinIt will show all job type cards, among users whose FirstName = Konstantin, and located in the Orel Office.
In addition to
LIKE, there are other documented parameters:
unlike, fields, docs, content, etc.
All of them are described
here .
That's it for today!
# docsvision
# docsvisionECM
Useful links:
- Insomnia Rest client https://insomnia.rest/download/#windows
- https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
- https://www.elastic.co/guide/en/elasticsearch/reference/1.4/_exploring_your_data.html
- https://stackoverflow.com/questions/50278255/elasticsearch-backup-on-windows-and-restore-on-linux
- https://z0z0.me/how-to-create-snapshot-and-restore-snapshot-with-elasticsearch/
- https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html#_document_input_parameters
- http://qaru.site/questions/15663281/elasticsearch-backup-on-windows-and-restore-on-linux