• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

What is the advantage of using ElasticSearch as the search engine?

Scheduled Pinned Locked Moved Solved
Q&A
elastic search user search
1
4
12.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    dan
    last edited by 11 May 2020, 17:40

    What is the advantage of using ES over the database as the search engine?

    From the docs we can choose either, but I am interested to know what I would be missing if I were to use DB as the search engine instead of Elastic.

    --
    FusionAuth - Auth for devs, built by devs.
    https://fusionauth.io

    1 Reply Last reply Reply Quote 0
    • D
      dan
      last edited by 11 May 2020, 17:42

      TL:DR, Elasticsearch is much more powerful than DB. But if you only have a couple thousand users and don’t need to perform sophisticated queries, the upside is that you don’t need to run Elasticsearch as a separate component.

      The DB search doesn’t provide the full search query capabilities that ES does. It also won’t scale to millions of users nearly as well as ES does.
      This doc has some information on the differences: https://fusionauth.io/docs/v1/tech/apis/users#search-for-users

      Some higher level details here as well : https://fusionauth.io/docs/v1/tech/core-concepts/users#user-search

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • D
        dan
        last edited by 11 May 2020, 17:42

        You can always change your mind as well. If you start with db for ease of development, setup and maintenance, you can then later switch to elastic, and perform a reindex operation to initialize the elasticsearch index.

        Or vice versa. It just requires a config change, a restart and then an index operation to move to Elasticsearch.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 1
        • D
          dan
          last edited by 2 Jun 2020, 15:52

          Here's a doc about how to switch search engines: https://fusionauth.io/docs/v1/tech/tutorials/switch-search-engines

          --
          FusionAuth - Auth for devs, built by devs.
          https://fusionauth.io

          1 Reply Last reply Reply Quote 0
          • First post
            Last post