Elasticsearch: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
| Line 12: | Line 12: | ||
SELECT COUNT(*) FROM MY_TABLE | SELECT COUNT(*) FROM MY_TABLE | ||
</pre> | </pre> | ||
== Truncate the index == | |||
Elasticsearch: [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html Delete API | Elasticsearch Guide [8.15] | Elastic]<ref>[https://stackoverflow.com/questions/31929695/truncate-index-in-elasticsearch python - Truncate index in elasticsearch - Stack Overflow]</ref> | |||
<pre> | |||
DELETE /MY_INXEX/ | |||
</pre> | |||
MySQL [https://dev.mysql.com/doc/refman/8.4/en/truncate-table.html MySQL :: MySQL 8.4 Reference Manual :: 15.1.37 TRUNCATE TABLE Statement] | |||
<pre> | |||
TRUNCATE MY_TABLE | |||
</pre> | |||
== References == | |||
<references /> | |||
[[Category: MySQL]] [[Category: Search]] | [[Category: MySQL]] [[Category: Search]] | ||
Revision as of 14:41, 15 October 2024
Count the number of documents
Elasticsearch: Count API | Elasticsearch Guide [8.15 Elastic]
GET /MY_INXEX/_count
MySQL MySQL :: MySQL 8.4 Reference Manual :: 5.3.4.8 Counting Rows
SELECT COUNT(*) FROM MY_TABLE
Truncate the index
Elasticsearch: Delete API | Elasticsearch Guide [8.15 | Elastic][1]
DELETE /MY_INXEX/
MySQL MySQL :: MySQL 8.4 Reference Manual :: 15.1.37 TRUNCATE TABLE Statement
TRUNCATE MY_TABLE