'Is Elasticsearch is a seperate database or does it work with MongoDB or others?

Is Elasticsearch a database itself? Is it safe to use it as my primary database? Is it secure as my primary database to store sensitive data?



Solution 1:[1]

Elasticsearch is a standalone database. Its main use case is for searching text and text and/number related queries such as aggregations. Generally, it's not recommended to use Elasticsearch as the main database, as some operations such as indexing (inserting values) are more expensive compared to other databases.

You can use Elasticsearch along with any other database such as MongoDB or MySQL, where the other databases can act as the primary database, and you can sync Elasticsearch with your primary database for the "searchable" parts of the data.

Elasticsearch works well with a number of other products from Elastic such as Logstash for logging purposes and Kibana for visualization purposes.

Elasticsearch homepage has a well-written description of it and its main use cases.

Solution 2:[2]

You might want to look at below link to understand Elasticsearch's usefulness as a database and what tradeoffs you have make in order to use it as a primary database

https://www.elastic.co/blog/found-elasticsearch-as-nosql

In general, Elasticsearch has been primarily used as an index store for retrieving/searching data really fast. Elasticsearch is powered by Lucene which is a high performance , text search engine library , which makes it a very powerful tool to provide an on top full-text search platform for applications. But it is usually recommended that your "source of truth" database is separate from Elasticsearch index data itself and also because nature of its primary operation ( full-text search ) it has not focussed on other aspects of database such as durability , security and write consistency etc. Hope this helps.

Solution 3:[3]

I used ELK stack only one time to monitor the log file from an application. The 'database' used is Elasticsearch. And it does seem as though it is positioned to be a primary database that is also "Open source and free to use."

Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

My understanding is that the entire ELK stack is comprised of three tools. Namely it is ELK Stack: Elasticsearch, Logstash, Kibana. Where Elasticsearch is a search and analytics engine. Logstash is a server?side data processing pipeline that ingests data from multiple sources simultaneously, transforms it, and then sends it to a "stash" like Elasticsearch. Kibana lets users visualize data with charts and graphs in Elasticsearch. That's from their site at: https://www.elastic.co/elk-stack

I am curious what others have to say and will have to follow your question. I currently work with Oracle and SQL Server for our application and would like to see how we could leverage additional database software in the future. Open source is always intriguing.

Solution 4:[4]

I would use types.FunctionType to represent a function:

>>> import types
>>> types.FunctionType
<class 'function'>
>>>
>>> def func():
...     pass
...
>>> type(func)
<class 'function'>
>>> isinstance(func, types.FunctionType)
True
>>>

You could also use a string literal such as 'function', but it looks like you want an actual type object.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Behrooz
Solution 2 fatcook
Solution 3 MrStoner
Solution 4 OctopuSS7