# Index user create account info

**URL:** <https://discuss.elastic.co/t/index-user-create-account-info/132358>\
**Category:** Elasticsearch\
**Created:** [May 17, 2018, 2:45pm UTC](https://discuss.elastic.co/t/index-user-create-account-info/132358 "2018-05-17T14:45:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwmouawad](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mwmouawad](https://discuss.elastic.co/u/mwmouawad)\
**Post date:** [May 17, 2018, 2:45pm UTC](https://discuss.elastic.co/t/index-user-create-account-info/132358/1 "2018-05-17T14:45:47Z")

</div>

Hello everyone i'm bulding a social media app. I'm planning to use elasticsearch as the search engine for the user search in the app. I'm using currently a PostGreSQL database as my source of truth, where all my users information are stored at. I'm looking for tips on how to implement elasticsearch, while still keeping my postgresql database as my primary database for storage.

When a user creates an account, I create a new row in my database. However, with elasticsearch as a search engine a want a near realtime update so as when someone creates an account, I may search for it instantly. Should I then, when a user creates an account create two requests, one for storing the data on my database and one for my elasticsearch instance?. If so, should I do this using the index API or bulk API (it is a single request for each user)?

Thnak you,

---

<div class="post-metadata">

**Author:** ![remco\_zwaan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/remco_zwaan/32/129991_2.png) [@remco\_zwaan](https://discuss.elastic.co/u/remco_zwaan)\
**Post date:** [May 17, 2018, 2:55pm UTC](https://discuss.elastic.co/t/index-user-create-account-info/132358/2 "2018-05-17T14:55:46Z")

</div>

checkout this post

> **[INSERT INTO LOGSTASH SELECT DATA FROM DATABASE
	  	 | Elastic](https://www.elastic.co/blog/logstash-jdbc-input-plugin)**
>
> Ever want to search your database entities from Elasticsearch? Now you can use Logstash to do just that! In this blog we introduce the JDBC input, which has been created to import data ...

---

<div class="post-metadata">

**Author:** ![mwmouawad](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@mwmouawad](https://discuss.elastic.co/u/mwmouawad)\
**Post date:** [May 17, 2018, 3:08pm UTC](https://discuss.elastic.co/t/index-user-create-account-info/132358/3 "2018-05-17T15:08:50Z")

</div>

HI I forgot to mention that I use logstash currently to send data from my databases to elasticsearch (for data analysis). Is it better to use logstash with a scheduler set to the minimum of time or index the document directly to elasticsearch.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 14, 2018, 3:08pm UTC](https://discuss.elastic.co/t/index-user-create-account-info/132358/4 "2018-06-14T15:08:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
