Facebook data is stored in a document repository (Nosql), and effective indexing is used for quick tag searches and searches. This approach to searching and storing data is markedly different from storing and searching data based on relational databases.
Google also uses a similar scheme to display the entire network and quickly returns the result.
Thus, in simpler terms, data is stored and indexed like Google indexes messages, the only difference is that the data also lies with Facebook.
Related technologies Bigdata , Mongodb , Apache Hadoop . And one of the leading index management and search algorithms is Lucene . Apache Elasticsearch is a convenient package for Lucene.
Thus, facebook considers these critical security measures, such as a tag (in plain language), and makes google like a search and presents you with a nice interface, not like a search engine.
When setting up your system, you can use elasticsearch to speed up the search. Elasticsearch simplifies the implementation of lucene. He will definitely have a certain learning curve. Elasticsearch can also be used with rdbms , in which case your data is stored in a database, but indexes are also supported for faster searches. It will definitely be disk space. This allows you to have many criteria, but still allows you to quickly get the result.
Quick tutorial on elasticsearch.
source share