Skip to content

Instantly share code, notes, and snippets.

@nik9000
nik9000 / test.sh
Last active November 11, 2025 07:15
# ./gradlew run -Dtests.heap.size=2g -Dtests.jvm.argline="-da -dsa"
rm /tmp/bulk
for doc in {1..10000}; do
echo '{"index":{}}' >> /tmp/bulk
echo '{"@timestamp": '$doc', "i": [-'$doc', '$doc']}' >> /tmp/bulk
done
echo '{
"settings": {
# ./gradlew run -Dtests.heap.size=2g -Dtests.jvm.argline="-da -dsa"
rm /tmp/bulk
for doc in {1..10000}; do
jq . -R --slurp <<CAT > /tmp/big
$(($doc % 10)) She should have died hereafter;
There would have been a time for such a word.
Tomorrow, and tomorrow, and tomorrow
Creeps in this petty pace from day to day
To the last syllable of recorded time;
@nik9000
nik9000 / test.sh
Last active October 30, 2025 20:53
# ./gradlew run -Dtests.heap.size=2g -Dtests.jvm.argline="-da -dsa"
jq . -R --slurp <<CAT > /tmp/big
She should have died hereafter;
There would have been a time for such a word.
Tomorrow, and tomorrow, and tomorrow
Creeps in this petty pace from day to day
To the last syllable of recorded time;
And all our yesterdays have lighted fools
rm /tmp/bulk
for doc in {1..10000}; do
echo '{"index":{}}' >> /tmp/bulk
echo '{"@timestamp": '$(($idx * 10000 + $doc))', "field": "foo'$(($doc % 10))'"}' >> /tmp/bulk
done
for idx in {1..10}; do
curl -uelastic:password -XDELETE localhost:9200/test$idx
echo '{
rm /tmp/bulk
for doc in {1..10000}; do
echo '{"index":{}}' >> /tmp/bulk
echo '{"@timestamp": '$(($idx * 10000 + $doc))', "field": "foo'$(($doc % 10))'"}' >> /tmp/bulk
done
for idx in {1..10}; do
curl -uelastic:password -XDELETE localhost:9200/test$idx
echo '{
rm -f /tmp/bulk*
for a in {1..1000}; do
echo '{"index":{}}' >> /tmp/bulk
echo '{"text": "words words '$a'"}' >> /tmp/bulk
done
ls -l /tmp/bulk*
passwd="password"
curl -sk -uelastic:$passwd -HContent-Type:application/json -XDELETE localhost:9200/test
curl -sk -uelastic:$passwd -HContent-Type:application/json -XPUT localhost:9200/test -d'{
rm -f /tmp/bulk
for a in {1..1000}; do
echo '{"index":{}}' >> /tmp/bulk
echo '{"text":"text '$(printf %04d $a)'"}' >> /tmp/bulk
done
curl -s -uelastic:password -HContent-Type:application/json -XDELETE localhost:9200/test
for a in {1..1000}; do
echo -n $a:
curl -s -uelastic:password -HContent-Type:application/json -XPOST localhost:9200/test/_bulk?pretty --data-binary @/tmp/bulk | grep errors
diff --git a/x-pack/plugin/esql/qa/testFixtures/src/main/resources/match.csv-spec b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/match.csv-spec
new file mode 100644
index 00000000000..80e07e33b5c
--- /dev/null
+++ b/x-pack/plugin/esql/qa/testFixtures/src/main/resources/match.csv-spec
@@ -0,0 +1,21 @@
+keyword
+required_capability: match
+
+FROM employees
@nik9000
nik9000 / docs.sh
Last active January 2, 2024 21:03
docs
echo '{
"settings": {
"mapping.total_fields.limit": 20000,
"number_of_shards": 10,
"number_of_replicas": 0
},
"mappings": {
"properties": {
"f00000": {"type": "long"}' > /tmp/idx
for f in {1..9999}; do
@nik9000
nik9000 / no data.sh
Created January 2, 2024 20:05
no data
echo '{
"settings": {
"mapping.total_fields.limit": 10000,
"number_of_shards": 10,
"number_of_replicas": 0
},
"mappings": {
"properties": {
"f00000": {"type": "long"}' > /tmp/idx
for f in {1..9999}; do printf ',