# Speed of elastic search

**URL:** <https://discuss.elastic.co/t/speed-of-elastic-search/326554>\
**Category:** Elasticsearch\
**Created:** [February 27, 2023, 8:46am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554 "2023-02-27T08:46:26Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 8:46am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/1 "2023-02-27T08:46:26Z")

</div>

How to increase Elasticsearch speed . I am uploading 75 files at a time and i want to add pdf file content into database.But it is taking 15-20 min.  
Any suggestions.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 10:33am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/2 "2023-02-27T10:33:37Z")

</div>

I have used fscrawler . I am starting fscrawler using shell\_exec command for one loop when I am doing bulk upload. And my update\_rate is 15m . The Elasticsearch taking too much time to read contents of file.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 27, 2023, 11:36am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/3 "2023-02-27T11:36:16Z")

</div>

I don't think it's Elasticsearch cause.

FSCrawler is mono-threaded. So it could take time specifically if you are using OCR.  
It would help if you share the FSCrawler logs.

If problem, please run FSCrawler using `--debug` option so we can see more details.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 11:54am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/4 "2023-02-27T11:54:52Z")

</div>

Okay Sir, I will check and get back to you.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 12:04pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/5 "2023-02-27T12:04:27Z")

</div>

When I upload any files through bulk upload .Then can we Add/Edit/Delete only that files to Elastic search Database instead of creating index everytime.  
Because i am starting fscrawler everytime so that it may be taking time.

OCR is set to true.Need to make false on server ?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 27, 2023, 1:00pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/6 "2023-02-27T13:00:18Z")

</div>

> When I upload any files through bulk upload

I'm not sure to understand. What do you mean? What are you doing?

> Then can we Add/Edit/Delete only that files to Elastic search Database instead of creating index everytime.

I don't understand. Could you clarify?

> Because i am starting fscrawler everytime so that it may be taking time.

Once FSCrawler has ran and is in "sleep" mode, the next run will only collect new/updated/deleted files.

> OCR is set to true.Need to make false on server ?

If you don't want OCR and have Tesseract available in the path, yes, set ocr to false.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 1:05pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/7 "2023-02-27T13:05:07Z")

</div>

Sir I have one module through which i am uploading 75 files at a time through bulk upload in PHP. So after adding that files in folder. I am starting fscrawler using shell\_exec command once. So it is updating Elasticsearch index . And after that i am taking content from elastic query and adding that content in database. But this process taking time. iwant to speed up this process.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 27, 2023, 1:09pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/8 "2023-02-27T13:09:25Z")

</div>

On server we kept elastci search on .But when i Add/Edit/Delete any file then i am starting fscrawler in one loop using shell\_exec command.

On local server working fast but on live server taking time

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [February 28, 2023, 7:43am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/9 "2023-02-28T07:43:25Z")

</div>

How can we speed up to read large scale data upto 30K?  
Please reply for all above queries.

---

<div class="post-metadata">

**Author:** ![Keith\_Massey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/keith_massey/32/83666_2.png) [@Keith\_Massey](https://discuss.elastic.co/u/Keith_Massey)\
**Post date:** [February 28, 2023, 10:30pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/10 "2023-02-28T22:30:05Z")

</div>

> [@smitak](#):
>
> i want to add pdf file content into database

It's unclear to me what exactly you're using, but if you're doing this via the [attachment processor](https://www.elastic.co/guide/en/elasticsearch/reference/master/attachment.html), we very recently found and fixed a tika logging configuration problem there that under some circumstances could cause _severe_ performance problems. Take a look at [https://github.com/elastic/elasticsearch/pull/93878](https://github.com/elastic/elasticsearch/pull/93878). If you are seeing a lot of logging in your Elasticsearch logs or stderr (and assuming you're using the attachment processor), then this could be your problem. If you are not seeing any, then this is probably not your problem.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [March 4, 2023, 7:53am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/11 "2023-03-04T07:53:48Z")

</div>

While uploading large amount of files giving timeout error.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 4, 2023, 8:30am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/12 "2023-03-04T08:30:19Z")

</div>

Most likely you are using the bulk API, right?  
Send smaller bulk requests. That could help.

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [March 4, 2023, 9:00am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/13 "2023-03-04T09:00:18Z")

</div>

Not using bulk API concept. Ulpoading bulk files using PHP function.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 4, 2023, 9:30am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/14 "2023-03-04T09:30:48Z")

</div>

How?

---

<div class="post-metadata">

**Author:** ![smitak](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@smitak](https://discuss.elastic.co/u/smitak)\
**Post date:** [March 4, 2023, 9:58am UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/15 "2023-03-04T09:58:36Z")

</div>

We are saving files in folder and then adding into database.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 4, 2023, 8:41pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/16 "2023-03-04T20:41:03Z")

</div>

I meant: which code?

You should really give a lot of details about what you are doing and how if you want to get meaningful answers.

---

<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:** [April 1, 2023, 8:41pm UTC](https://discuss.elastic.co/t/speed-of-elastic-search/326554/17 "2023-04-01T20:41:46Z")

</div>

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