-
Notifications
You must be signed in to change notification settings - Fork 6
Fix/multi query show meta #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ee1ecd5
to
fe0d5ab
Compare
fe0d5ab
to
c22141b
Compare
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/plugins/test-enable-disable-buddy-plugin.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES\G"|grep "1. row"
––– output –––
- *************************** 1. row ***************************
––– input –––
mysql -h0 -P9306 -e "DISABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ENABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-show"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW QUERIES\G"|grep "1. row"
––– output –––
- *************************** 1. row ***************************
––– input –––
mysql -h0 -P9306 -e "create table t (id bigint, vector float_vector knn_type='hnsw' knn_dims='4' hnsw_similarity='l2')"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DISABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-knn"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ENABLE BUDDY PLUGIN manticoresoftware/buddy-plugin-knn"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select id, knn_dist() from t where knn ( image_vector, 5, 1 );"
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/kibana/test-kibana-log-to-test-script.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X HEAD -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.apm-agent-configuration'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_xpack'
––– output –––
OK
––– input –––
curl -s -X PUT -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 602' -H 'Connection: keep-alive' -d '{"settings":{"index.auto_expand_replicas":"0-1"},"mappings":{"properties":{"@timestamp":{"type":"date"},"service":{"properties":{"name":{"type":"keyword","ignore_above":1024},"environment":{"type":"keyword","ignore_above":1024}}},"settings":{"properties":{"transaction_sample_rate":{"type":"scaled_float","scaling_factor":1000,"ignore_malformed":true,"coerce":false},"capture_body":{"type":"keyword","ignore_above":1024},"transaction_max_spans":{"type":"short"}}},"applied_by_agent":{"type":"boolean"},"agent_name":{"type":"keyword","ignore_above":1024},"etag":{"type":"keyword","ignore_above":1024}}}}' 'localhost:9308/.apm-agent-configuration'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana_task_manager'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana_task_manager'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_cat/templates/kibana_index_template*?format=json'
––– output –––
OK
––– input –––
curl -s -X PUT -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 1225' -H 'Connection: keep-alive' -d '{"mappings":{"dynamic":"strict","properties":{"config":{"dynamic":"true","properties":{"buildNum":{"type":"keyword"}}},"migrationVersion":{"dynamic":"true","type":"object"},"type":{"type":"keyword"},"namespace":{"type":"keyword"},"updated_at":{"type":"date"},"references":{"type":"nested","properties":{"name":{"type":"keyword"},"type":{"type":"keyword"},"id":{"type":"keyword"}}},"task":{"properties":{"taskType":{"type":"keyword"},"scheduledAt":{"type":"date"},"runAt":{"type":"date"},"startedAt":{"type":"date"},"retryAt":{"type":"date"},"schedule":{"properties":{"interval":{"type":"keyword"}}},"attempts":{"type":"integer"},"status":{"type":"keyword"},"params":{"type":"text"},"state":{"type":"text"},"user":{"type":"keyword"},"scope":{"type":"keyword"},"ownerId":{"type":"keyword"}}}},"_meta":{"migrationMappingPropertyHashes":{"config":"87aca8fdb053154f11383fce3dbf3edf","migrationVersion":"4a1746014a75ade3a714e1db5763276f","type":"2f4316de49999235636386fe51dc06c1","namespace":"2f4316de49999235636386fe51dc06c1","updated_at":"00da57df13e94e9d98437d13ace4bfe0","references":"7997cf5a56cc02bdc9c93361bde732b0","task":"235412e52d09e7165fac8a67a43ad6b4"}}},"settings":{"number_of_shards":1,"auto_expand_replicas":"0-1"}}' 'localhost:9308/.kibana_task_manager_1'
––– output –––
OK
––– input –––
curl -s -X PUT -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 15115' -H 'Connection: keep-alive' -d '{"mappings":{"dynamic":"strict","properties":{"config":{"dynamic":"true","properties":{"buildNum":{"type":"keyword"}}},"migrationVersion":{"dynamic":"true","type":"object"},"type":{"type":"keyword"},"namespace":{"type":"keyword"},"updated_at":{"type":"date"},"references":{"type":"nested","properties":{"name":{"type":"keyword"},"type":{"type":"keyword"},"id":{"type":"keyword"}}},"graph-workspace":{"properties":{"description":{"type":"text"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"numLinks":{"type":"integer"},"numVertices":{"type":"integer"},"title":{"type":"text"},"version":{"type":"integer"},"wsState":{"type":"text"}}},"space":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":2048}}},"description":{"type":"text"},"initials":{"type":"keyword"},"color":{"type":"keyword"},"disabledFeatures":{"type":"keyword"},"imageUrl":{"type":"text","index":false},"_reserved":{"type":"boolean"}}},"ml-telemetry":{"properties":{"file_data_visualizer":{"properties":{"index_creation_count":{"type":"long"}}}}},"apm-services-telemetry":{"properties":{"has_any_services":{"type":"boolean"},"services_per_agent":{"properties":{"python":{"type":"long","null_value":0},"java":{"type":"long","null_value":0},"nodejs":{"type":"long","null_value":0},"js-base":{"type":"long","null_value":0},"rum-js":{"type":"long","null_value":0},"dotnet":{"type":"long","null_value":0},"ruby":{"type":"long","null_value":0},"go":{"type":"long","null_value":0}}}}},"apm-indices":{"properties":{"apm_oss.sourcemapIndices":{"type":"keyword"},"apm_oss.errorIndices":{"type":"keyword"},"apm_oss.onboardingIndices":{"type":"keyword"},"apm_oss.spanIndices":{"type":"keyword"},"apm_oss.transactionIndices":{"type":"keyword"},"apm_oss.metricsIndices":{"type":"keyword"}}},"map":{"properties":{"description":{"type":"text"},"title":{"type":"text"},"version":{"type":"integer"},"bounds":{"type":"geo_shape"},"mapStateJSON":{"type":"text"},"layerListJSON":{"type":"text"},"uiStateJSON":{"type":"text"}}},"maps-telemetry":{"properties":{"settings":{"properties":{"showMapVisualizationTypes":{"type":"boolean"}}},"indexPatternsWithGeoFieldCount":{"type":"long"},"mapsTotalCount":{"type":"long"},"timeCaptured":{"type":"date"},"attributesPerMap":{"properties":{"dataSourcesCount":{"properties":{"min":{"type":"long"},"max":{"type":"long"},"avg":{"type":"long"}}},"layersCount":{"properties":{"min":{"type":"long"},"max":{"type":"long"},"avg":{"type":"long"}}},"layerTypesCount":{"dynamic":"true","properties":{}},"emsVectorLayersCount":{"dynamic":"true","properties":{}}}}}},"canvas-workpad":{"dynamic":false,"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword"}}},"@timestamp":{"type":"date"},"@created":{"type":"date"}}},"canvas-element":{"dynamic":false,"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword"}}},"help":{"type":"text"},"content":{"type":"text"},"image":{"type":"text"},"@timestamp":{"type":"date"},"@created":{"type":"date"}}},"infrastructure-ui-source":{"properties":{"name":{"type":"text"},"description":{"type":"text"},"metricAlias":{"type":"keyword"},"logAlias":{"type":"keyword"},"fields":{"properties":{"container":{"type":"keyword"},"host":{"type":"keyword"},"pod":{"type":"keyword"},"tiebreaker":{"type":"keyword"},"timestamp":{"type":"keyword"}}},"logColumns":{"type":"nested","properties":{"timestampColumn":{"properties":{"id":{"type":"keyword"}}},"messageColumn":{"properties":{"id":{"type":"keyword"}}},"fieldColumn":{"properties":{"id":{"type":"keyword"},"field":{"type":"keyword"}}}}}}},"metrics-explorer-view":{"properties":{"name":{"type":"keyword"},"options":{"properties":{"metrics":{"type":"nested","properties":{"aggregation":{"type":"keyword"},"field":{"type":"keyword"},"color":{"type":"keyword"},"label":{"type":"keyword"}}},"limit":{"type":"integer"},"groupBy":{"type":"keyword"},"filterQuery":{"type":"keyword"},"aggregation":{"type":"keyword"}}},"chartOptions":{"properties":{"type":{"type":"keyword"},"yAxisMode":{"type":"keyword"},"stack":{"type":"boolean"}}},"currentTimerange":{"properties":{"from":{"type":"keyword"},"to":{"type":"keyword"},"interval":{"type":"keyword"}}}}},"inventory-view":{"properties":{"name":{"type":"keyword"},"metric":{"properties":{"type":{"type":"keyword"}}},"groupBy":{"type":"nested","properties":{"label":{"type":"keyword"},"field":{"type":"keyword"}}},"nodeType":{"type":"keyword"},"view":{"type":"keyword"},"customOptions":{"type":"nested","properties":{"text":{"type":"keyword"},"field":{"type":"keyword"}}},"boundsOverride":{"properties":{"max":{"type":"integer"},"min":{"type":"integer"}}},"autoBounds":{"type":"boolean"},"time":{"type":"integer"},"autoReload":{"type":"boolean"},"filterQuery":{"properties":{"kind":{"type":"keyword"},"expression":{"type":"keyword"}}}}},"siem-ui-timeline":{"properties":{"columns":{"properties":{"aggregatable":{"type":"boolean"},"category":{"type":"keyword"},"columnHeaderType":{"type":"keyword"},"description":{"type":"text"},"example":{"type":"text"},"indexes":{"type":"keyword"},"id":{"type":"keyword"},"name":{"type":"text"},"placeholder":{"type":"text"},"searchable":{"type":"boolean"},"type":{"type":"keyword"}}},"dataProviders":{"properties":{"id":{"type":"keyword"},"name":{"type":"text"},"enabled":{"type":"boolean"},"excluded":{"type":"boolean"},"kqlQuery":{"type":"text"},"queryMatch":{"properties":{"field":{"type":"text"},"displayField":{"type":"text"},"value":{"type":"text"},"displayValue":{"type":"text"},"operator":{"type":"text"}}},"and":{"properties":{"id":{"type":"keyword"},"name":{"type":"text"},"enabled":{"type":"boolean"},"excluded":{"type":"boolean"},"kqlQuery":{"type":"text"},"queryMatch":{"properties":{"field":{"type":"text"},"displayField":{"type":"text"},"value":{"type":"text"},"displayValue":{"type":"text"},"operator":{"type":"text"}}}}}}},"description":{"type":"text"},"eventType":{"type":"keyword"},"favorite":{"properties":{"keySearch":{"type":"text"},"fullName":{"type":"text"},"userName":{"type":"text"},"favoriteDate":{"type":"date"}}},"filters":{"properties":{"meta":{"properties":{"alias":{"type":"text"},"controlledBy":{"type":"text"},"disabled":{"type":"boolean"},"field":{"type":"text"},"formattedValue":{"type":"text"},"index":{"type":"keyword"},"key":{"type":"keyword"},"negate":{"type":"boolean"},"params":{"type":"text"},"type":{"type":"keyword"},"value":{"type":"text"}}},"exists":{"type":"text"},"match_all":{"type":"text"},"missing":{"type":"text"},"query":{"type":"text"},"range":{"type":"text"},"script":{"type":"text"}}},"kqlMode":{"type":"keyword"},"kqlQuery":{"properties":{"filterQuery":{"properties":{"kuery":{"properties":{"kind":{"type":"keyword"},"expression":{"type":"text"}}},"serializedQuery":{"type":"text"}}}}},"title":{"type":"text"},"dateRange":{"properties":{"start":{"type":"date"},"end":{"type":"date"}}},"savedQueryId":{"type":"keyword"},"sort":{"properties":{"columnId":{"type":"keyword"},"sortDirection":{"type":"keyword"}}},"created":{"type":"date"},"createdBy":{"type":"text"},"updated":{"type":"date"},"updatedBy":{"type":"text"}}},"siem-ui-timeline-note":{"properties":{"timelineId":{"type":"keyword"},"eventId":{"type":"keyword"},"note":{"type":"text"},"created":{"type":"date"},"createdBy":{"type":"text"},"updated":{"type":"date"},"updatedBy":{"type":"text"}}},"siem-ui-timeline-pinned-event":{"properties":{"timelineId":{"type":"keyword"},"eventId":{"type":"keyword"},"created":{"type":"date"},"createdBy":{"type":"text"},"updated":{"type":"date"},"updatedBy":{"type":"text"}}},"siem-detection-engine-rule-status":{"properties":{"alertId":{"type":"keyword"},"status":{"type":"keyword"},"statusDate":{"type":"date"},"lastFailureAt":{"type":"date"},"lastSuccessAt":{"type":"date"},"lastFailureMessage":{"type":"text"},"lastSuccessMessage":{"type":"text"}}},"upgrade-assistant-reindex-operation":{"dynamic":true,"properties":{"indexName":{"type":"keyword"},"status":{"type":"integer"}}},"upgrade-assistant-telemetry":{"properties":{"ui_open":{"properties":{"overview":{"type":"long","null_value":0},"cluster":{"type":"long","null_value":0},"indices":{"type":"long","null_value":0}}},"ui_reindex":{"properties":{"close":{"type":"long","null_value":0},"open":{"type":"long","null_value":0},"start":{"type":"long","null_value":0},"stop":{"type":"long","null_value":0}}},"features":{"properties":{"deprecation_logging":{"properties":{"enabled":{"type":"boolean","null_value":true}}}}}}},"file-upload-telemetry":{"properties":{"filesUploadedTotalCount":{"type":"long"}}},"lens":{"properties":{"title":{"type":"text"},"visualizationType":{"type":"keyword"},"state":{"type":"flattened"},"expression":{"index":false,"type":"keyword"}}},"lens-ui-telemetry":{"properties":{"name":{"type":"keyword"},"type":{"type":"keyword"},"date":{"type":"date"},"count":{"type":"integer"}}},"action":{"properties":{"name":{"type":"text"},"actionTypeId":{"type":"keyword"},"config":{"enabled":false,"type":"object"},"secrets":{"type":"binary"}}},"action_task_params":{"properties":{"actionId":{"type":"keyword"},"params":{"enabled":false,"type":"object"},"apiKey":{"type":"binary"}}},"alert":{"properties":{"enabled":{"type":"boolean"},"name":{"type":"text"},"tags":{"type":"keyword"},"alertTypeId":{"type":"keyword"},"schedule":{"properties":{"interval":{"type":"keyword"}}},"consumer":{"type":"keyword"},"actions":{"type":"nested","properties":{"group":{"type":"keyword"},"actionRef":{"type":"keyword"},"actionTypeId":{"type":"keyword"},"params":{"enabled":false,"type":"object"}}},"params":{"enabled":false,"type":"object"},"scheduledTaskId":{"type":"keyword"},"createdBy":{"type":"keyword"},"updatedBy":{"type":"keyword"},"createdAt":{"type":"date"},"apiKey":{"type":"binary"},"apiKeyOwner":{"type":"keyword"},"throttle":{"type":"keyword"},"muteAll":{"type":"boolean"},"mutedInstanceIds":{"type":"keyword"}}},"query":{"properties":{"title":{"type":"text"},"description":{"type":"text"},"query":{"properties":{"language":{"type":"keyword"},"query":{"type":"keyword","index":false}}},"filters":{"type":"object","enabled":false},"timefilter":{"type":"object","enabled":false}}},"index-pattern":{"properties":{"fieldFormatMap":{"type":"text"},"fields":{"type":"text"},"intervalName":{"type":"keyword"},"notExpandable":{"type":"boolean"},"sourceFilters":{"type":"text"},"timeFieldName":{"type":"keyword"},"title":{"type":"text"},"type":{"type":"keyword"},"typeMeta":{"type":"keyword"}}},"visualization":{"properties":{"description":{"type":"text"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"savedSearchRefName":{"type":"keyword"},"title":{"type":"text"},"uiStateJSON":{"type":"text"},"version":{"type":"integer"},"visState":{"type":"text"}}},"search":{"properties":{"columns":{"type":"keyword"},"description":{"type":"text"},"hits":{"type":"integer"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"sort":{"type":"keyword"},"title":{"type":"text"},"version":{"type":"integer"}}},"dashboard":{"properties":{"description":{"type":"text"},"hits":{"type":"integer"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"optionsJSON":{"type":"text"},"panelsJSON":{"type":"text"},"refreshInterval":{"properties":{"display":{"type":"keyword"},"pause":{"type":"boolean"},"section":{"type":"integer"},"value":{"type":"integer"}}},"timeFrom":{"type":"keyword"},"timeRestore":{"type":"boolean"},"timeTo":{"type":"keyword"},"title":{"type":"text"},"version":{"type":"integer"}}},"url":{"properties":{"accessCount":{"type":"long"},"accessDate":{"type":"date"},"createDate":{"type":"date"},"url":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":2048}}}}},"server":{"properties":{"uuid":{"type":"keyword"}}},"kql-telemetry":{"properties":{"optInCount":{"type":"long"},"optOutCount":{"type":"long"}}},"sample-data-telemetry":{"properties":{"installCount":{"type":"long"},"unInstallCount":{"type":"long"}}},"telemetry":{"properties":{"enabled":{"type":"boolean"},"sendUsageFrom":{"ignore_above":256,"type":"keyword"},"lastReported":{"type":"date"},"lastVersionChecked":{"ignore_above":256,"type":"keyword"},"userHasSeenNotice":{"type":"boolean"}}},"timelion-sheet":{"properties":{"description":{"type":"text"},"hits":{"type":"integer"},"kibanaSavedObjectMeta":{"properties":{"searchSourceJSON":{"type":"text"}}},"timelion_chart_height":{"type":"integer"},"timelion_columns":{"type":"integer"},"timelion_interval":{"type":"keyword"},"timelion_other_interval":{"type":"keyword"},"timelion_rows":{"type":"integer"},"timelion_sheet":{"type":"text"},"title":{"type":"text"},"version":{"type":"integer"}}},"ui-metric":{"properties":{"count":{"type":"integer"}}},"tsvb-validation-telemetry":{"properties":{"failedRequests":{"type":"long"}}}},"_meta":{"migrationMappingPropertyHashes":{"config":"87aca8fdb053154f11383fce3dbf3edf","migrationVersion":"4a1746014a75ade3a714e1db5763276f","type":"2f4316de49999235636386fe51dc06c1","namespace":"2f4316de49999235636386fe51dc06c1","updated_at":"00da57df13e94e9d98437d13ace4bfe0","references":"7997cf5a56cc02bdc9c93361bde732b0","graph-workspace":"cd7ba1330e6682e9cc00b78850874be1","space":"c5ca8acafa0beaa4d08d014a97b6bc6b","ml-telemetry":"257fd1d4b4fdbb9cb4b8a3b27da201e9","apm-services-telemetry":"07ee1939fa4302c62ddc052ec03fed90","apm-indices":"9bb9b2bf1fa636ed8619cbab5ce6a1dd","map":"23d7aa4a720d4938ccde3983f87bd58d","maps-telemetry":"268da3a48066123fc5baf35abaa55014","canvas-workpad":"b0a1706d356228dbdcb4a17e6b9eb231","canvas-element":"7390014e1091044523666d97247392fc","infrastructure-ui-source":"ddc0ecb18383f6b26101a2fadb2dab0c","metrics-explorer-view":"53c5365793677328df0ccb6138bf3cdd","inventory-view":"84b320fd67209906333ffce261128462","siem-ui-timeline":"ac8020190f5950dd3250b6499144e7fb","siem-ui-timeline-note":"8874706eedc49059d4cf0f5094559084","siem-ui-timeline-pinned-event":"20638091112f0e14f0e443d512301c29","siem-detection-engine-rule-status":"0367e4d775814b56a4bee29384f9aafe","upgrade-assistant-reindex-operation":"a53a20fe086b72c9a86da3cc12dad8a6","upgrade-assistant-telemetry":"56702cec857e0a9dacfb696655b4ff7b","file-upload-telemetry":"0ed4d3e1983d1217a30982630897092e","lens":"21c3ea0763beb1ecb0162529706b88c5","lens-ui-telemetry":"509bfa5978586998e05f9e303c07a327","action":"c0c235fba02ebd2a2412bcda79009b58","action_task_params":"a9d49f184ee89641044be0ca2950fa3a","alert":"e588043a01d3d43477e7cad7efa0f5d8","query":"11aaeb7f5f7fa5bb43f25e18ce26e7d9","index-pattern":"66eccb05066c5a89924f48a9e9736499","visualization":"52d7a13ad68a150c4525b292d23e12cc","search":"181661168bbadd1eff5902361e2a0d5c","dashboard":"d00f614b29a80360e1190193fd333bab","url":"c7f66a0df8b1b52f17c28c4adb111105","server":"ec97f1c5da1a19609a60874e5af1100c","kql-telemetry":"d12a98a6f19a2d273696597547e064ee","sample-data-telemetry":"7d3cfeb915303c9641c59681967ffeb4","telemetry":"358ffaa88ba34a97d55af0933a117de4","timelion-sheet":"9a2a2748877c7a7b582fef201ab1d4cf","ui-metric":"0d409297dc5ebe1e3a1da691c6ee32e3","tsvb-validation-telemetry":"3a37ef6c8700ae6fc97d5c7da00e9215"}}},"settings":{"number_of_shards":1,"auto_expand_replicas":"0-1"}}' 'localhost:9308/.kibana_1'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_alias/.kibana_task_manager'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_alias/.kibana'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 87' -H 'Connection: keep-alive' -d '{"actions":[{"add":{"index":".kibana_task_manager_1","alias":".kibana_task_manager"}}]}' 'localhost:9308/_aliases'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 61' -H 'Connection: keep-alive' -d '{"actions":[{"add":{"index":".kibana_1","alias":".kibana"}}]}' 'localhost:9308/_aliases'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana_task_manager_1/_refresh'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana_1/_refresh'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_xpack'
––– output –––
OK
––– input –––
curl -s -X PUT -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 1307' -H 'Connection: keep-alive' -d '{"index_patterns":[".management-beats"],"version":70000,"settings":{"index":{"number_of_shards":1,"auto_expand_replicas":"0-1","codec":"best_compression"}},"mappings":{"dynamic":"strict","properties":{"type":{"type":"keyword"},"configuration_block":{"properties":{"id":{"type":"keyword"},"type":{"type":"keyword"},"tag":{"type":"keyword"},"description":{"type":"text"},"config":{"type":"keyword"},"last_updated":{"type":"date"}}},"enrollment_token":{"properties":{"token":{"type":"keyword"},"expires_on":{"type":"date"}}},"tag":{"properties":{"id":{"type":"keyword"},"name":{"type":"keyword"},"color":{"type":"keyword"},"hasConfigurationBlocksTypes":{"type":"keyword"}}},"beat":{"properties":{"id":{"type":"keyword"},"status":{"properties":{"type":{"type":"keyword"},"timestamp":{"type":"date"},"event":{"properties":{"type":{"type":"keyword"},"message":{"type":"text"},"uuid":{"type":"keyword"}}}}},"active":{"type":"boolean"},"last_checkin":{"type":"date"},"enrollment_token":{"type":"keyword"},"access_token":{"type":"keyword"},"verified_on":{"type":"date"},"type":{"type":"keyword"},"version":{"type":"keyword"},"host_ip":{"type":"ip"},"host_name":{"type":"keyword"},"ephemeral_id":{"type":"keyword"},"tags":{"type":"keyword"},"metadata":{"dynamic":"true","type":"object"},"name":{"type":"keyword"}}}}}}' 'localhost:9308/_template/.management-beats'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_xpack'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 354' -H 'Connection: keep-alive' -d '{"seq_no_primary_term":true,"query":{"bool":{"filter":[{"bool":{"should":[{"bool":{"must":[{"term":{"type":"upgrade-assistant-reindex-operation"}}],"must_not":[{"exists":{"field":"namespace"}}]}}],"minimum_should_match":1}}],"must":[{"simple_query_string":{"query":"0","fields":["upgrade-assistant-reindex-operation.status"],"default_operator":"OR"}}]}}}' 'localhost:9308/.kibana/_search?size=20&from=0&rest_total_hits_as_int=true'
––– output –––
- {"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"hits":{"hits":[],"max_score":0,"total":0,"total_relation":"eq"},"status":200,"timed_out":false,"took":0}
+ {"error":"Trying to access array offset on null"}
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/.kibana/_doc/space%3Adefault'
––– output –––
- {"_id":"space:default","_index":".kibana_1","_type":"_doc","found":false}
+ {"error":"Undefined array key \"index\""}
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 237' -H 'Connection: keep-alive' -d '{"space":{"name":"Default","description":"This is your default space!","color":"#00bfb3","disabledFeatures":[],"_reserved":true},"type":"space","references":[],"migrationVersion":{"space":"6.6.0"},"updated_at":"2025-04-16T12:06:54.147Z"}' 'localhost:9308/.kibana/_create/space%3Adefault?refresh=wait_for'
––– output –––
- {"_id":"space:default","_index":".kibana_1","_primary_term":1,"_seq_no":0,"_shards":{"failed":0,"successful":1,"total":1},"_type":"_doc","_version":1,"result":"created"}
+ {"error":"Undefined array key \"index\""}
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X HEAD --max-time 5 -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_cluster/settings?include_defaults=true'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 171' -H 'Connection: keep-alive' -d '{"sort":[{"task.runAt":"asc"},{"_id":"desc"}],"query":{"bool":{"must":[{"term":{"type":"task"}},{"bool":{"filter":{"term":{"_id":"task:oss_telemetry-vis_telemetry"}}}}]}}}' 'localhost:9308/.kibana_task_manager/_search?ignore_unavailable=true'
––– output –––
- {"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"hits":{"hits":[],"max_score":0,"total":0,"total_relation":"eq"},"status":200,"timed_out":false,"took":0}
+ {"error":"Trying to access array offset on null"}
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 330' -H 'Connection: keep-alive' -d '{"task":{"taskType":"vis_telemetry","state":"{\"stats\":{},\"runs\":0}","params":"{}","attempts":0,"scheduledAt":"2025-04-16T12:07:00.161Z","startedAt":null,"retryAt":null,"runAt":"2025-04-16T12:07:00.161Z","status":"idle"},"type":"task","references":[],"migrationVersion":{"task":"7.6.0"},"updated_at":"2025-04-16T12:07:00.161Z"}' 'localhost:9308/.kibana_task_manager/_create/task%3Aoss_telemetry-vis_telemetry?refresh=false'
––– output –––
- {"_id":"task:oss_telemetry-vis_telemetry","_index":".kibana_task_manager_1","_primary_term":1,"_seq_no":0,"_shards":{"failed":0,"successful":1,"total":1},"_type":"_doc","_version":1,"result":"created"}
+ {"error":"Undefined array key \"index\""}
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 370' -H 'Connection: keep-alive' -d '{"task":{"taskType":"lens_telemetry","state":"{\"byDate\":{},\"suggestionsByDate\":{},\"saved\":{},\"runs\":0}","params":"{}","attempts":0,"scheduledAt":"2025-04-16T12:07:00.161Z","startedAt":null,"retryAt":null,"runAt":"2025-04-16T12:07:00.161Z","status":"idle"},"type":"task","references":[],"migrationVersion":{"task":"7.6.0"},"updated_at":"2025-04-16T12:07:00.161Z"}' 'localhost:9308/.kibana_task_manager/_create/task%3ALens-lens_telemetry?refresh=false'
––– output –––
- {"_id":"task:Lens-lens_telemetry","_index":".kibana_task_manager_1","_primary_term":1,"_seq_no":0,"_shards":{"failed":0,"successful":1,"total":1},"_type":"_doc","_version":1,"result":"created"}
+ {"error":"Undefined array key \"index\""}
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 1942' -H 'Connection: keep-alive' -d '{"query":{"bool":{"must":[{"term":{"type":"task"}},{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"task.status":"idle"}},{"range":{"task.runAt":{"lte":"now"}}}]}},{"bool":{"must":[{"bool":{"should":[{"term":{"task.status":"running"}},{"term":{"task.status":"claiming"}}]}},{"range":{"task.retryAt":{"lte":"now"}}}]}}]}},{"bool":{"should":[{"exists":{"field":"task.schedule"}},{"bool":{"must":[{"term":{"task.taskType":"actions:.server-log"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.slack"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.email"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.index"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.pagerduty"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.webhook"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"alerting:siem.signals"}},{"range":{"task.attempts":{"lt":3}}}]}},{"bool":{"must":[{"term":{"task.taskType":"vis_telemetry"}},{"range":{"task.attempts":{"lt":3}}}]}},{"bool":{"must":[{"term":{"task.taskType":"lens_telemetry"}},{"range":{"task.attempts":{"lt":3}}}]}}]}}]}}]}},"sort":{"_script":{"type":"number","order":"asc","script":{"lang":"painless","source":"\nif (doc['\''task.retryAt'\''].size()!=0) {\n return doc['\''task.retryAt'\''].value.toInstant().toEpochMilli();\n}\nif (doc['\''task.runAt'\''].size()!=0) {\n return doc['\''task.runAt'\''].value.toInstant().toEpochMilli();\n}\n "}}},"seq_no_primary_term":true,"script":{"source":"ctx._source.task.ownerId=params.ownerId; ctx._source.task.status=params.status; ctx._source.task.retryAt=params.retryAt;","lang":"painless","params":{"ownerId":"kibana:ce42b997-a913-4d58-be46-bb1937feedd6","status":"claiming","retryAt":"2025-04-16T12:07:30.419Z"}}}' 'localhost:9308/.kibana_task_manager/_update_by_query?ignore_unavailable=true&refresh=true&max_docs=10&conflicts=proceed'
––– output –––
OK
––– input –––
curl -s -X GET -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'Content-Length: 0' -H 'Connection: keep-alive' 'localhost:9308/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 1942' -H 'Connection: keep-alive' -d '{"query":{"bool":{"must":[{"term":{"type":"task"}},{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"term":{"task.status":"idle"}},{"range":{"task.runAt":{"lte":"now"}}}]}},{"bool":{"must":[{"bool":{"should":[{"term":{"task.status":"running"}},{"term":{"task.status":"claiming"}}]}},{"range":{"task.retryAt":{"lte":"now"}}}]}}]}},{"bool":{"should":[{"exists":{"field":"task.schedule"}},{"bool":{"must":[{"term":{"task.taskType":"actions:.server-log"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.slack"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.email"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.index"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.pagerduty"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"actions:.webhook"}},{"range":{"task.attempts":{"lt":1}}}]}},{"bool":{"must":[{"term":{"task.taskType":"alerting:siem.signals"}},{"range":{"task.attempts":{"lt":3}}}]}},{"bool":{"must":[{"term":{"task.taskType":"vis_telemetry"}},{"range":{"task.attempts":{"lt":3}}}]}},{"bool":{"must":[{"term":{"task.taskType":"lens_telemetry"}},{"range":{"task.attempts":{"lt":3}}}]}}]}}]}}]}},"sort":{"_script":{"type":"number","order":"asc","script":{"lang":"painless","source":"\nif (doc['\''task.retryAt'\''].size()!=0) {\n return doc['\''task.retryAt'\''].value.toInstant().toEpochMilli();\n}\nif (doc['\''task.runAt'\''].size()!=0) {\n return doc['\''task.runAt'\''].value.toInstant().toEpochMilli();\n}\n "}}},"seq_no_primary_term":true,"script":{"source":"ctx._source.task.ownerId=params.ownerId; ctx._source.task.status=params.status; ctx._source.task.retryAt=params.retryAt;","lang":"painless","params":{"ownerId":"kibana:ce42b997-a913-4d58-be46-bb1937feedd6","status":"claiming","retryAt":"2025-04-16T12:07:30.509Z"}}}' 'localhost:9308/.kibana_task_manager/_update_by_query?ignore_unavailable=true&refresh=true&max_docs=10&conflicts=proceed'
––– output –––
OK
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 64' -H 'Connection: keep-alive' -d '{"query":{"bool":{"filter":{"term":{"type":"canvas-workpad"}}}}}' 'localhost:9308/.kibana/_search?size=10000&ignore_unavailable=true&filter_path=hits.hits._source.canvas-workpad%2C-hits.hits._source.canvas-workpad.assets'
––– output –––
- {"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"hits":{"hits":[],"max_score":0,"total":0,"total_relation":"eq"},"status":200,"timed_out":false,"took":0}
+ {"error":"Trying to access array offset on null"}
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 64' -H 'Connection: keep-alive' -d '{"query":{"bool":{"filter":{"term":{"type":"canvas-element"}}}}}' 'localhost:9308/.kibana/_search?size=10000&ignore_unavailable=true&filter_path=hits.hits._source.canvas-element.content'
––– output –––
- {"_shards":{"failed":0,"skipped":0,"successful":1,"total":1},"hits":{"hits":[],"max_score":0,"total":0,"total_relation":"eq"},"status":200,"timed_out":false,"took":0}
+ {"error":"Trying to access array offset on null"}
––– input –––
curl -s -X POST -H 'Authorization: Basic ZWxhc3RpYzpwYXNz' -H 'content-type: application/json' -H 'Content-Length: 374' -H 'Connection: keep-alive' -d '{"seq_no_primary_term":true,"_source":{"excludes":["output.content"]},"query":{"bool":{"filter":{"bool":{"minimum_should_match":1,"should":[{"term":{"status":"pending"}},{"bool":{"must":[{"term":{"status":"processing"}},{"range":{"process_expiration":{"lte":"2025-04-16T12:07:03.101Z"}}}]}}]}}}},"sort":[{"priority":{"order":"asc"}},{"created_at":{"order":"asc"}}],"size":1}' 'localhost:9308/.reporting-*/_search'
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/buddy/test-knn-search-by-doc-id.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d "create table test ( test_vector float_vector knn_type='hnsw' knn_dims='2' hnsw_similarity='l2' )" > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'insert into test values ( 2, (0.2,0.3) ), ( 3, (0.2,0.7) ), ( 4, (0.3,0.5) ), ( 5, (0.5,0.5) ), ( 6, (0.7,0.2) ), ( 10, (0.9,0.9) )' > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
curl -s localhost:9308/search -d '{"index":"test","knn":{"field":"test_vector","doc_id":3,"k":5}}'; echo $?
––– output –––
- {"took":%{NUMBER},"timed_out":false,"hits":{"total":%{NUMBER},"total_relation":"eq","hits":[{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]+/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{1}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}},{"_id":%{NUMBER},"_score":%{NUMBER},"_knn_dist":#!/[0-9]{1}.[0-9]{2}/!#,"_source":{"test_vector":[#!/[0-9]{1}.[0-9],[0-9]{1}.[0-9]/!#]}}]}}0
+ [{"total":0,"error":"","warning":""}]0
test/clt-tests/buddy/test-fuzzy-trailing-semicolon.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t(id, f) VALUES (1, 'ящик'), (2, 'коробка');"; echo $?
––– output –––
OK
––– input –––
curl -s "0:9308/sql?mode=raw" -d "select * from t where match('ящик') option fuzzy=1;"; echo $?
––– output –––
- {"error":"Fuzzy search requires min_infix_len to be set"}0
+ {"error":"Undefined array key \"Variable_name\""}0
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t(id, f) VALUES (1, 'ящик'), (2, 'коробка');"; echo $?
––– output –––
OK
––– input –––
curl -s "0:9308/sql?mode=raw" -d "select * from t where match('ящик') option fuzzy=1;"; echo $?
––– output –––
- [{"total":1,"error":"","warning":"","columns":[{"id":{"type":"long long"}},{"f":{"type":"string"}}],"data":[{"id":1,"f":"ящик"}]}]0
+ {"error":"Undefined array key \"Variable_name\""}0
test/clt-tests/buddy/test-fuzzy-search-negative.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=1000 --concurrency=4 --docs=5000000 --start-id=1 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') OPTION fuzzy=-1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') OPTION fuzzy='0';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') OPTION fuzzy='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') OPTION fuzzy=a;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') OPTION fuzzy=@;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('j', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE(123, 'name', 'us' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('@#$', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('thisisaverylonginputstring', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'non_existing_table', 'us' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 123 AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('hello') OPTION fuzzy=1 layouts='';"
––– output –––
OK test/clt-tests/buddy/test-fuzzy-search-non-min-infix-len.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "create table test (id bigint, value text);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'test', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('RICH') OPTION fuzzy=1;"
––– output –––
- ERROR 1064 (42000) at line 1: Fuzzy search requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE test min_infix_len='2';"
––– output –––
OK
––– input –––
sleep 30; mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'test', 'us' AS layouts);"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('RICH') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
test/clt-tests/buddy/test-show-version.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
- *************************** 1. row ***************************
- Component: Daemon
- Version: %{VERSION}
- *************************** 2. row ***************************
- Component: Columnar
- Version: columnar %{VERSION}
- *************************** 3. row ***************************
- Component: Secondary
- Version: secondary %{VERSION}
- *************************** 4. row ***************************
- Component: Knn
- Version: knn %{VERSION}
- *************************** 5. row ***************************
- Component: Embeddings
- Version: embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#
- *************************** 6. row ***************************
- Component: Buddy
- Version: buddy %{VERSION}
test/clt-tests/buddy/test-inconsistent-comunication-with-buddy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW TABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20TABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VARIABLES"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW META"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20META"; echo
––– output –––
OK
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot index array with string "id"
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "id": {
- "type": "long long"
- }
- },
- {
- "query": {
- "type": "string"
- }
- },
- {
- "time": {
- "type": "string"
- }
- },
- {
- "protocol": {
- "type": "string"
- }
- },
- {
- "host": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!#",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot index array with string "id"
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "id": {
- "type": "long long"
- }
- },
- {
- "query": {
- "type": "string"
- }
- },
- {
- "time": {
- "type": "string"
- }
- },
- {
- "protocol": {
- "type": "string"
- }
- },
- {
- "host": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!#",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- }
- ]
- }
- ]
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot index array with string "id"
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "id": {
- "type": "long long"
- }
- },
- {
- "query": {
- "type": "string"
- }
- },
- {
- "time": {
- "type": "string"
- }
- },
- {
- "protocol": {
- "type": "string"
- }
- },
- {
- "host": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!#",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20QUERIES" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot index array with string "id"
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "id": {
- "type": "long long"
- }
- },
- {
- "query": {
- "type": "string"
- }
- },
- {
- "time": {
- "type": "string"
- }
- },
- {
- "protocol": {
- "type": "string"
- }
- },
- {
- "host": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!#",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- },
- {
- "id": %{NUMBER},
- "query": "#!/[a-zA-Z\s\_]+/!#",
- "time": "%{NUMBER}#!/(s|ms|us)/!# ago",
- "protocol": "http",
- "host": "127.0.0.1:%{NUMBER}"
- }
- ]
- }
- ]
––– input –––
curl -s -X POST "http://localhost:9308/sql?mode=raw" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot iterate over null (null)
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "Component": {
- "type": "string"
- }
- },
- {
- "Version": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "Component": "Daemon",
- "Version": "%{VERSION}"
- },
- {
- "Component": "Columnar",
- "Version": "columnar %{VERSION}"
- },
- {
- "Component": "Secondary",
- "Version": "secondary %{VERSION}"
- },
- {
- "Component": "Knn",
- "Version": "knn %{VERSION}"
- },
- {
- "Component": "Embeddings",
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?mode=raw&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot iterate over null (null)
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "Component": {
- "type": "string"
- }
- },
- {
- "Version": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "Component": "Daemon",
- "Version": "%{VERSION}"
- },
- {
- "Component": "Columnar",
- "Version": "columnar %{VERSION}"
- },
- {
- "Component": "Secondary",
- "Version": "secondary %{VERSION}"
- },
- {
- "Component": "Knn",
- "Version": "knn %{VERSION}"
- },
- {
- "Component": "Embeddings",
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s -X POST "http://localhost:9308/sql?raw_response=true" -d "query=SHOW VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot iterate over null (null)
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "Component": {
- "type": "string"
- }
- },
- {
- "Version": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "Component": "Daemon",
- "Version": "%{VERSION}"
- },
- {
- "Component": "Columnar",
- "Version": "columnar %{VERSION}"
- },
- {
- "Component": "Secondary",
- "Version": "secondary %{VERSION}"
- },
- {
- "Component": "Knn",
- "Version": "knn %{VERSION}"
- },
- {
- "Component": "Embeddings",
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
––– input –––
curl -s "http://localhost:9308/sql?raw_response=true&query=SHOW%20VERSION" | jq '.[0].data |= sort_by(.id)'; echo
––– output –––
- [
+ jq: error (at <stdin>:0): Cannot iterate over null (null)
- {
- "total": %{NUMBER},
- "error": "",
- "warning": "",
- "columns": [
- {
- "Component": {
- "type": "string"
- }
- },
- {
- "Version": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "Component": "Daemon",
- "Version": "%{VERSION}"
- },
- {
- "Component": "Columnar",
- "Version": "columnar %{VERSION}"
- },
- {
- "Component": "Secondary",
- "Version": "secondary %{VERSION}"
- },
- {
- "Component": "Knn",
- "Version": "knn %{VERSION}"
- },
- {
- "Component": "Embeddings",
- "Version": "embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)/!#"
- },
- {
- "Component": "Buddy",
- "Version": "buddy %{VERSION}"
- }
- ]
- }
- ]
test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
- +---------+---------+-----------+
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
- | column1 | column2 | column3 |
- +---------+---------+-----------+
- | 123 | 3333 | text here |
- | 456 | 22222 | text here |
- +---------+---------+-----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
- ERROR 1064 (42000) at line 2: unknown option 'fix_overlap'
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
- ERROR 1064 (42000) at line 2: table test: unable to group by stored field 'column3'
+ ERROR 1064 (42000) at line 2: Undefined array key "Variable_name"
test/clt-tests/buddy/test-fuzzy-search.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- +------+---------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +------+---------------------+------+
- | 43 | KOURTNEY RICHARDSON | a |
- | 125 | ELAINA RICHARDSON | a |
- | 226 | RICHARD ZAMARRIPA | a |
- | 363 | MAYRA RICO | a |
- | 840 | RICO MCFADDEN | a |
- | 855 | RICHARD ALDRIDGE | a |
- | 934 | VALERY RICH | a |
- | 948 | REGINE ALDRICH | a |
- | 1017 | HEE TRICE | a |
- | 1624 | OLEVIA RICHARDS | a |
- | 1816 | MAURICE BARCLAY | a |
- | 2228 | THERESIA RICHARDS | a |
- | 2670 | JULIANA GRICE | a |
- | 2918 | GRICELDA WHELAN | a |
- | 3012 | RICHARD MCCURDY | a |
- | 3147 | MERRILEE ALDRICH | a |
- | 3262 | FONDA RICHEY | a |
- | 3431 | MELANY RICHARD | a |
- | 3438 | JOVAN ALDRICH | a |
- | 3517 | BRICE LONGORIA | a |
- +------+---------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- +------+----------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +------+----------------------+------+
- | 20 | BERNARDO DUGGAN | a |
- | 27 | BERNARDINE BREWER | a |
- | 209 | KATLYN SERNA | a |
- | 1292 | LAVERNA CLARK | a |
- | 1414 | BENNY FERNANDEZ | a |
- | 1638 | JULENE BERNAL | a |
- | 2021 | LAVERNA JEFFERSON | a |
- | 2169 | MERNA ORNELAS | a |
- | 2471 | BERNADINE SCANLON | a |
- | 2843 | BERNADINE NAPOLITANO | a |
- | 3177 | FERNANDA FRYER | a |
- | 3199 | FERNANDO FRANCISCO | a |
- | 3455 | FERNANDE MERRITT | a |
- | 3539 | BERNADINE HILLER | a |
- | 3862 | FERNANDO MACDONALD | a |
- | 4022 | JOHNSON HERNANDES | a |
- | 4484 | SYBIL HERNANDES | a |
- | 5159 | MARTINA BERNARD | a |
- | 5793 | BERNA TALBOTT | a |
- | 6506 | FERNANDO FREELAND | a |
- +------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- +------+--------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +------+--------------------+------+
- | 6 | KESHIA RANDAZZO | a |
- | 12 | TRESA ESCALANTE | a |
- | 20 | BERNARDO DUGGAN | a |
- | 31 | DEMETRIA IBANEZ | a |
- | 32 | PAMELIA SANDLIN | a |
- | 34 | ANJANETTE MINTON | a |
- | 40 | ANTONIO RIOS | a |
- | 62 | ANDRES NATION | a |
- | 64 | MERI MEDRANO | a |
- | 65 | JANINA FLANIGAN | a |
- | 72 | TALISHA SWAN | a |
- | 75 | JANAY BONNER | a |
- | 80 | DEMETRIA STANFIELD | a |
- | 81 | RALEIGH SANDBERG | a |
- | 82 | KRISTIAN MEYER | a |
- | 83 | JANN HEATH | a |
- | 87 | RANDEE QUINTERO | a |
- | 99 | DEAN GUO | a |
- | 103 | DEAN DEAL | a |
- | 110 | CONSTANCE REES | a |
- +------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- +-------+------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +-------+------------------+------+
- | 688 | SHERIE STORY | a |
- | 1422 | TOBY CARO | a |
- | 1627 | RUPERT STORY | a |
- | 2154 | TONY GREY | a |
- | 3759 | TOBY GILCHRIST | a |
- | 5687 | TONY EASTERLING | a |
- | 5835 | TOBY ROBERSON | a |
- | 6281 | TOBY ARAIZA | a |
- | 7311 | ANTONY STOVALL | a |
- | 7475 | TOBY REINHART | a |
- | 8828 | TONYA CALLAHAN | a |
- | 9251 | TOBY LANGFORD | a |
- | 9293 | ZENA STORY | a |
- | 9619 | TONY WHITTINGTON | a |
- | 10167 | LANA STORY | a |
- | 10341 | ANTONY KAYE | a |
- | 12573 | LATONYA CRABTREE | a |
- | 12876 | TOBY MONTENEGRO | a |
- | 13391 | ANTONY CARRILLO | a |
- | 13672 | LEZLIE STORY | a |
- +-------+------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
- +--------+-----------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +--------+-----------------+------+
- | 999737 | KEITH STUMP | a |
- | 999039 | KEITH JAMIESON | a |
- | 996439 | KEITHA CARBAJAL | a |
- | 995770 | KEITH GONZALES | a |
- | 990882 | MINH SANTANA | a |
- | 990643 | KEITH MENDES | a |
- | 989972 | KEITHA WALTERS | a |
- | 989954 | GWENN SMYTH | a |
- | 989444 | KEITH KEATON | a |
- | 988755 | SHERRON SMYTH | a |
- | 988366 | LAVONIA SMYTH | a |
- | 988254 | MAYOLA KEITH | a |
- | 987106 | KEITH FAULK | a |
- | 986580 | DARNELL SMYTH | a |
- | 984012 | KEITH CORONEL | a |
- | 982759 | MORGAN KEITH | a |
- | 982421 | KEITH SHIFFLETT | a |
- | 982223 | TELMA KEITH | a |
- | 982056 | RENITA KEITH | a |
- | 981115 | KATIE SMYTH | a |
- +--------+-----------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
- +--------+----------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +--------+----------------+------+
- | 998829 | EDYTHE VACA | a |
- | 998500 | SETH PHUNG | a |
- | 996507 | SETH LYMAN | a |
- | 995119 | EDYTHE JOHN | a |
- | 993455 | EDYTH ROSADO | a |
- | 992097 | EDYTH RAGAN | a |
- | 989954 | GWENN SMYTH | a |
- | 988823 | SETH WHITTAKER | a |
- | 988755 | SHERRON SMYTH | a |
- | 988366 | LAVONIA SMYTH | a |
- | 986580 | DARNELL SMYTH | a |
- | 986231 | EDYTH BLODGETT | a |
- | 985595 | SETH BACON | a |
- | 982423 | SETH CHATMAN | a |
- | 981115 | KATIE SMYTH | a |
- | 979541 | EDYTHE CLAYTON | a |
- | 979093 | SETH BURROUGHS | a |
- | 978812 | EDYTH GULLEY | a |
- | 975994 | SETH PARHAM | a |
- | 975841 | ALEIDA SMYTH | a |
- +--------+----------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=\"1\";"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
- +--------+--------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +--------+--------------------+------+
- | 999971 | RONNA JOHNSON | a |
- | 999879 | CHARLEY STJOHN | a |
- | 999685 | JOAN KOESTER | a |
- | 999655 | JOHN WAINWRIGHT | a |
- | 999555 | JON MOSIER | a |
- | 999440 | JOHN LEONG | a |
- | 999170 | JONELLE HARDING | a |
- | 999075 | JOHNIE DURAN | a |
- | 999020 | JONAS HASAN | a |
- | 998802 | RENETTA LITTLEJOHN | a |
- | 998721 | REY JOHNSTON | a |
- | 998368 | JONIE MILTON | a |
- | 998367 | LEENA JOHNSTON | a |
- | 998128 | SHARILYN JOHNSTON | a |
- | 997788 | JOANNIE HENSON | a |
- | 997670 | DENNY JONES | a |
- | 997623 | JOHNETTA DELATORRE | a |
- | 997577 | JONA CORRAL | a |
- | 997563 | JONE FOLSOM | a |
- | 997512 | JOAN CALKINS | a |
- +--------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
- +-------+----------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +-------+----------------------+------+
- | 10119 | JANIECE GIBSON | a |
- | 10159 | JANNA MIXON | a |
- | 10200 | ELANE LOPES | a |
- | 10205 | JANETTA ZHOU | a |
- | 10381 | EULALIA LANE | a |
- | 10465 | JANIE PAXTON | a |
- | 10492 | JANINA JOE | a |
- | 10507 | JANNA EDDY | a |
- | 10635 | JANESSA GOODIN | a |
- | 10637 | JACQUELYNN JANKOWSKI | a |
- | 10824 | ALEJANDRINA LAUGHLIN | a |
- | 10831 | CLYDE JANES | a |
- | 10926 | JANNET GOODEN | a |
- | 10978 | JANAE KELSO | a |
- | 11064 | JANETH BOWIE | a |
- | 11266 | MARIELLE ALEJANDRO | a |
- | 11342 | JANAE DELAGARZA | a |
- | 11875 | TYLER LUJAN | a |
- | 11925 | DINAH JANES | a |
- | 11997 | JANETH BROWNING | a |
- +-------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
- +------+-----------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +------+-----------------+------+
- | 1292 | LAVERNA CLARK | a |
- | 1414 | BENNY FERNANDEZ | a |
- | 1638 | JULENE BERNAL | a |
- +------+-----------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
- +------+----------------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | username | s |
- +------+----------------------+------+
- | 73 | CLARA NGUYEN | a |
- | 1285 | CLARA CARTAGENA | a |
- | 1515 | KLARA ALARCON | a |
- | 1709 | FREDDA LARA | a |
- | 2217 | LORIANN DELROSARIO | a |
- | 2305 | SARA AVILA | a |
- | 2631 | ROSARIA DELONG | a |
- | 3245 | LARA MASTERSON | a |
- | 3267 | LARA MOREAU | a |
- | 3553 | SARAN CHANG | a |
- | 3880 | SARAN HOOK | a |
- | 3980 | GEORGETTA DELROSARIO | a |
- | 4517 | SARAI EASLEY | a |
- | 5708 | ASA ROSARIO | a |
- | 5731 | SARITA ANDERS | a |
- | 6100 | CHANTELL SARABIA | a |
- | 6165 | SARA HALLMAN | a |
- | 6480 | SARAH NEILL | a |
- | 6488 | SARAN PARTIN | a |
- | 6802 | KLARA ROLLER | a |
- +------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), field_weights=(username=1), fuzzy=1;"
––– output –––
- +----------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | username |
- +----------------+
- | MINH FENNELL |
- | MINH MAZUR |
- | MINH VILLEGAS |
- | MINH TILLER |
- | MINH VOGT |
- | MINH SHAW |
- | MINH STEADMAN |
- | MINH PEAK |
- | MINH ROOT |
- | MINH PATTERSON |
- | MINH BURDETTE |
- | MINH ABNEY |
- | MINH DOLAN |
- | MINH RUDD |
- | MINH TOLBERT |
- | MINH CRANDALL |
- | MINH JAIME |
- | MINH ISAACSON |
- | MINH BONILLA |
- | MINH WAHL |
- +----------------+
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, field_weights=(username=1), fuzzy=1;"
––– output –––
- +-----------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | username |
- +-----------------+
- | SYDNEY SMYTH |
- | CHERILYN SMYTH |
- | SATURNINA SMYTH |
- | LYNN SMYTH |
- | STEVEN SMYTH |
- | JASMIN SMYTH |
- | BERYL SMYTH |
- | JACK SMYTH |
- | CAROLEE SMYTH |
- | CARON SMYTH |
- | ALFREDO SMYTH |
- | ALTA SMYTH |
- | VIKI SMYTH |
- | CHANA SMYTH |
- | HYUN SMYTH |
- | ROGER SMYTH |
- | LINDSEY SMYTH |
- | WILFORD SMYTH |
- | ARLINE SMYTH |
- | APRYL SMYTH |
- +-----------------+
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), fuzzy=1;"
––– output –––
- +----------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | username |
- +----------------+
- | MINH FENNELL |
- | MINH MAZUR |
- | MINH VILLEGAS |
- | MINH TILLER |
- | MINH VOGT |
- | MINH SHAW |
- | MINH STEADMAN |
- | MINH PEAK |
- | MINH ROOT |
- | MINH PATTERSON |
- | MINH BURDETTE |
- | MINH ABNEY |
- | MINH DOLAN |
- | MINH RUDD |
- | MINH TOLBERT |
- | MINH CRANDALL |
- | MINH JAIME |
- | MINH ISAACSON |
- | MINH BONILLA |
- | MINH WAHL |
- +----------------+
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, fuzzy=1;"
––– output –––
- +-----------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | username |
- +-----------------+
- | SYDNEY SMYTH |
- | CHERILYN SMYTH |
- | SATURNINA SMYTH |
- | LYNN SMYTH |
- | STEVEN SMYTH |
- | JASMIN SMYTH |
- | BERYL SMYTH |
- | JACK SMYTH |
- | CAROLEE SMYTH |
- | CARON SMYTH |
- | ALFREDO SMYTH |
- | ALTA SMYTH |
- | VIKI SMYTH |
- | CHANA SMYTH |
- | HYUN SMYTH |
- | ROGER SMYTH |
- | LINDSEY SMYTH |
- | WILFORD SMYTH |
- | ARLINE SMYTH |
- | APRYL SMYTH |
- +-----------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC OPTION fuzzy=0;" > /tmp/result_fuzzy0.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC;" > /tmp/result_no_fuzzy.txt
––– output –––
OK
––– input –––
diff /tmp/result_fuzzy0.txt /tmp/result_no_fuzzy.txt; echo $?
––– output –––
- 0
+ 1,5c1,24
+ < +------+----------+------+
+ < | id | username | s |
+ < +------+----------+------+
+ < | | | |
+ < +------+----------+------+
+ ---
+ > +-------+----------------------+------+
+ > | id | username | s |
+ > +-------+----------------------+------+
+ > | 2137 | CHASE NESMITH | a |
+ > | 2546 | MELODEE NESMITH | a |
+ > | 4602 | LING GOLDSMITH | a |
+ > | 4777 | RICKIE NESMITH | a |
+ > | 9834 | MARYANNA GOLDSMITH | a |
+ > | 12019 | MYRTLE GOLDSMITH | a |
+ > | 15228 | SHAWANA GOLDSMITH | a |
+ > | 18731 | ANASTASIA NESMITH | a |
+ > | 19935 | KRYSTIN GOLDSMITH | a |
+ > | 25397 | JERRY GOLDSMITH | a |
+ > | 26017 | MARIANNE NESMITH | a |
+ > | 29373 | JANI NESMITH | a |
+ > | 32632 | ANTOINETTE GOLDSMITH | a |
+ > | 34443 | JOANNA GOLDSMITH | a |
+ > | 45553 | TUYET GOLDSMITH | a |
+ > | 49633 | KENDALL GOLDSMITH | a |
+ > | 50419 | TAYLOR GOLDSMITH | a |
+ > | 52461 | AYAKO NESMITH | a |
+ > | 52775 | JUDY GOLDSMITH | a |
+ > | 53271 | CHELSEA NESMITH | a |
+ > +-------+----------------------+------+
+ 1
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | johnny |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jose |
- | joy |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | albert |
- | alexander |
- | ali |
- | dale |
- | gale |
- | kendall |
- | marshall |
- | palma |
- | valentine |
- | walter |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | cami |
- | darci |
- | joan |
- | jody |
- | joe |
- | joel |
- | joey |
- | john |
- | johnie |
- | johnny |
- | joi |
- | jon |
- | jonas |
- | jordan |
- | jorge |
- | jose |
- | joseph |
- | joshi |
- | joshua |
- | joy |
- | joyce |
- | kaci |
- | kami |
- | kimi |
- | laci |
- | luci |
- | marci |
- | mi |
- | nanci |
- | naomi |
- | neomi |
- | nohemi |
- | ricci |
- | staci |
- | tami |
- | tammi |
- | tobias |
- | todd |
- | toi |
- | tom |
- | tomas |
- | tomi |
- | toney |
- | traci |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | chang |
- | chong |
- | chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | page |
- | paige |
- | palma |
- | paris |
- | parker |
- | pat |
- | patricia |
- | patrick |
- | paul |
- | paz |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +---------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | grace |
- | gracia |
- | grady |
- | graham |
- | grant |
- | gregg |
- | gregory |
- | grey |
- | grogan |
- | grover |
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS tbl1; CREATE TABLE tbl1 (title TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM \`tbl1\` WHERE MATCH('abc') OPTION fuzzy = 1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +----------+
- | business |
- +----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +----------+
- | business |
- +----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
- +------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id |
- +------+
- | 1 |
- | 2 |
- +------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +----------+
- | business |
- +----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
- +----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +----------+
- | business |
- +----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; DEBUG SLEEP 2; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into t values(3, 'aa defghi xxx');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('aa def ghi xxx') option fuzzy=1, layouts='';"
––– output –––
- +------+---------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | f |
- +------+---------------+
- | 3 | aa defghi xxx |
- +------+---------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
- +----------------+-------+
- | Variable_name | Value |
- +----------------+-------+
- | total | 2 |
- | total_found | 2 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- +----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ select * from t where match('aa def ghi xxx') option fuzzy=1, layouts='';
+ /* Mon Jun 09 06:31:30.539 2025 conn 2303 (127.0.0.1:55710) */ select * from t where match('aa def ghi xxx') option fuzzy=1, layouts='' # error=Undefined array key "Variable_name"
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
+ /* Mon Jun 09 06:31:30.552 2025 conn 2305 (127.0.0.1:55712) */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1 # error=Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-------+
- | 340 |
- +-------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
+ 1
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +-------+
- | 340 |
- +-------+
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf; echo $?
––– output –––
OK
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv; echo $?
––– output –––
OK
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain; echo $?
––– output –––
OK
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
rm -f /tmp/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; (stdbuf -oL searchd -c /tmp/manticore_idx.conf 2>&1 | tee /tmp/searchd.log | grep -i precach & disown); sleep 0.5; if timeout 10 grep -qm1 '\[BUDDY\] started' /tmp/searchd.log; then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /tmp/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +--------+
- | abcd |
- | abcdef |
- +--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
- | query |
- +--------+
- | random |
- +--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Undefined array key "Variable_name"
+ 1
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
- +------+--------+
+ ERROR 2027 (HY000) at line 1: Malformed packet
- | id | f |
- +------+--------+
- | 1 | abcdef |
- +------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
- +------+-----------+
+ ERROR 2027 (HY000) at line 1: Malformed packet
- | id | f |
- +------+-----------+
- | 2 | abcd efgh |
- +------+-----------+
test/clt-tests/buddy/test-fuzzy-autocomplete-http.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"EBGRNA"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
- "took": %{NUMBER},
+ "error": "Undefined array key \"Variable_name\""
- "timed_out": false,
+ }
- "hits": {
- "total": 4300,
- "total_relation": "eq",
- "hits": [
- {
- "_id": 100610,
- "_score": 2555,
- "_source": {
- "username": "BERNARDINE BERNAL",
- "s": "a"
- }
- },
- {
- "_id": 82019,
- "_score": 2547,
- "_source": {
- "username": "BERNARDA HERNANDES",
- "s": "a"
- }
- },
- {
- "_id": 283145,
- "_score": 2547,
- "_source": {
- "username": "BERNARDINE HERNANDES",
- "s": "a"
- }
- },
- {
- "_id": 803455,
- "_score": 1596,
- "_source": {
- "username": "BERNA PFEIFFER",
- "s": "a"
- }
- },
- {
- "_id": 806796,
- "_score": 1596,
- "_source": {
- "username": "BERNA SAGE",
- "s": "a"
- }
- },
- {
- "_id": 806801,
- "_score": 1596,
- "_source": {
- "username": "BERNA PANG",
- "s": "a"
- }
- },
- {
- "_id": 808007,
- "_score": 1596,
- "_source": {
- "username": "BERNA STOLTZFUS",
- "s": "a"
- }
- },
- {
- "_id": 823479,
- "_score": 1596,
- "_source": {
- "username": "BERNA HALVERSON",
- "s": "a"
- }
- },
- {
- "_id": 835281,
- "_score": 1596,
- "_source": {
- "username": "BERNA PLASCENCIA",
- "s": "a"
- }
- },
- {
- "_id": 839460,
- "_score": 1596,
- "_source": {
- "username": "BERNA CALLAWAY",
- "s": "a"
- }
- },
- {
- "_id": 841134,
- "_score": 1596,
- "_source": {
- "username": "BERNA STONER",
- "s": "a"
- }
- },
- {
- "_id": 845181,
- "_score": 1596,
- "_source": {
- "username": "BERNA MARSH",
- "s": "a"
- }
- },
- {
- "_id": 852425,
- "_score": 1596,
- "_source": {
- "username": "BERNA LEI",
- "s": "a"
- }
- },
- {
- "_id": 863448,
- "_score": 1596,
- "_source": {
- "username": "BERNA SOUSA",
- "s": "a"
- }
- },
- {
- "_id": 868495,
- "_score": 1596,
- "_source": {
- "username": "BERNA LIAO",
- "s": "a"
- }
- },
- {
- "_id": 875373,
- "_score": 1596,
- "_source": {
- "username": "BERNA TROTTER",
- "s": "a"
- }
- },
- {
- "_id": 880282,
- "_score": 1596,
- "_source": {
- "username": "BERNA VALDOVINOS",
- "s": "a"
- }
- },
- {
- "_id": 884675,
- "_score": 1596,
- "_source": {
- "username": "BERNA VALLE",
- "s": "a"
- }
- },
- {
- "_id": 887986,
- "_score": 1596,
- "_source": {
- "username": "BERNA ELKINS",
- "s": "a"
- }
- },
- {
- "_id": 891400,
- "_score": 1596,
- "_source": {
- "username": "BERNA HURD",
- "s": "a"
- }
- }
- ]
- }
- }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"ANT"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
- "took": %{NUMBER},
+ "error": "Undefined array key \"Variable_name\""
- "timed_out": false,
+ }
- "hits": {
- "total": 248249,
- "total_relation": "eq",
- "hits": [
- {
- "_id": 91532,
- "_score": 2503,
- "_source": {
- "username": "AN GANT",
- "s": "a"
- }
- },
- {
- "_id": 108119,
- "_score": 2503,
- "_source": {
- "username": "KEENAN GANT",
- "s": "a"
- }
- },
- {
- "_id": 213976,
- "_score": 2503,
- "_source": {
- "username": "FRANK GANT",
- "s": "a"
- }
- },
- {
- "_id": 241083,
- "_score": 2503,
- "_source": {
- "username": "MARYANNA GANT",
- "s": "a"
- }
- },
- {
- "_id": 275719,
- "_score": 2503,
- "_source": {
- "username": "RYANN GANT",
- "s": "a"
- }
- },
- {
- "_id": 359068,
- "_score": 2503,
- "_source": {
- "username": "ANNALEE GANT",
- "s": "a"
- }
- },
- {
- "_id": 456416,
- "_score": 2503,
- "_source": {
- "username": "SANTOS GANT",
- "s": "a"
- }
- },
- {
- "_id": 477232,
- "_score": 2503,
- "_source": {
- "username": "SUSANNA GANT",
- "s": "a"
- }
- },
- {
- "_id": 523489,
- "_score": 2503,
- "_source": {
- "username": "ANNEMARIE GANT",
- "s": "a"
- }
- },
- {
- "_id": 527307,
- "_score": 2503,
- "_source": {
- "username": "SANTOS GANT",
- "s": "a"
- }
- },
- {
- "_id": 667223,
- "_score": 2503,
- "_source": {
- "username": "MARIANNA GANT",
- "s": "a"
- }
- },
- {
- "_id": 750725,
- "_score": 2503,
- "_source": {
- "username": "SUZANN GANT",
- "s": "a"
- }
- },
- {
- "_id": 70778,
- "_score": 2502,
- "_source": {
- "username": "JEANICE GANT",
- "s": "a"
- }
- },
- {
- "_id": 123892,
- "_score": 2502,
- "_source": {
- "username": "JOLANDA GANT",
- "s": "a"
- }
- },
- {
- "_id": 178241,
- "_score": 2502,
- "_source": {
- "username": "FRANCES GANTT",
- "s": "a"
- }
- },
- {
- "_id": 179715,
- "_score": 2502,
- "_source": {
- "username": "CHANG GANTT",
- "s": "a"
- }
- },
- {
- "_id": 306143,
- "_score": 2502,
- "_source": {
- "username": "MANDI GANT",
- "s": "a"
- }
- },
- {
- "_id": 311941,
- "_score": 2502,
- "_source": {
- "username": "RANA GANTT",
- "s": "a"
- }
- },
- {
- "_id": 346214,
- "_score": 2502,
- "_source": {
- "username": "JANELLE GANT",
- "s": "a"
- }
- },
- {
- "_id": 358849,
- "_score": 2502,
- "_source": {
- "username": "STEPHANI GANT",
- "s": "a"
- }
- }
- ]
- }
- }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"tony"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
- "took": %{NUMBER},
+ "error": "Undefined array key \"Variable_name\""
- "timed_out": false,
+ }
- "hits": {
- "total": 1813,
- "total_relation": "eq",
- "hits": [
- {
- "_id": 800363,
- "_score": 1547,
- "_source": {
- "username": "TOBY BEAULIEU",
- "s": "a"
- }
- },
- {
- "_id": 807095,
- "_score": 1547,
- "_source": {
- "username": "TOBY HOFER",
- "s": "a"
- }
- },
- {
- "_id": 807096,
- "_score": 1547,
- "_source": {
- "username": "TOBY DEMPSEY",
- "s": "a"
- }
- },
- {
- "_id": 808820,
- "_score": 1547,
- "_source": {
- "username": "TOBY RAYMOND",
- "s": "a"
- }
- },
- {
- "_id": 808863,
- "_score": 1547,
- "_source": {
- "username": "TOBY BATEMAN",
- "s": "a"
- }
- },
- {
- "_id": 813761,
- "_score": 1547,
- "_source": {
- "username": "TOBY VANWINKLE",
- "s": "a"
- }
- },
- {
- "_id": 818229,
- "_score": 1547,
- "_source": {
- "username": "TOBY BROCK",
- "s": "a"
- }
- },
- {
- "_id": 825472,
- "_score": 1547,
- "_source": {
- "username": "TOBY LINDQUIST",
- "s": "a"
- }
- },
- {
- "_id": 826251,
- "_score": 1547,
- "_source": {
- "username": "TOBY KAUFFMAN",
- "s": "a"
- }
- },
- {
- "_id": 827886,
- "_score": 1547,
- "_source": {
- "username": "TOBY PITMAN",
- "s": "a"
- }
- },
- {
- "_id": 832558,
- "_score": 1547,
- "_source": {
- "username": "TOBY KELLEY",
- "s": "a"
- }
- },
- {
- "_id": 833689,
- "_score": 1547,
- "_source": {
- "username": "TOBY HANDY",
- "s": "a"
- }
- },
- {
- "_id": 834136,
- "_score": 1547,
- "_source": {
- "username": "TOBY HOPPE",
- "s": "a"
- }
- },
- {
- "_id": 836413,
- "_score": 1547,
- "_source": {
- "username": "TOBY STOVALL",
- "s": "a"
- }
- },
- {
- "_id": 839075,
- "_score": 1547,
- "_source": {
- "username": "TOBY JEROME",
- "s": "a"
- }
- },
- {
- "_id": 839512,
- "_score": 1547,
- "_source": {
- "username": "TOBY LEONARD",
- "s": "a"
- }
- },
- {
- "_id": 841923,
- "_score": 1547,
- "_source": {
- "username": "TOBY PARNELL",
- "s": "a"
- }
- },
- {
- "_id": 842450,
- "_score": 1547,
- "_source": {
- "username": "TOBY LOWE",
- "s": "a"
- }
- },
- {
- "_id": 843217,
- "_score": 1547,
- "_source": {
- "username": "TOBY ROBISON",
- "s": "a"
- }
- },
- {
- "_id": 846291,
- "_score": 1547,
- "_source": {
- "username": "TOBY BITTNER",
- "s": "a"
- }
- }
- ]
- }
- }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMITH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
- "took": %{NUMBER},
+ "error": "Undefined array key \"Variable_name\""
- "timed_out": false,
+ }
- "hits": {
- "total": 1304,
- "total_relation": "eq",
- "hits": [
- {
- "_id": 999737,
- "_score": 1,
- "_source": {
- "username": "KEITH STUMP",
- "s": "a"
- }
- },
- {
- "_id": 999039,
- "_score": 1,
- "_source": {
- "username": "KEITH JAMIESON",
- "s": "a"
- }
- },
- {
- "_id": 996439,
- "_score": 1,
- "_source": {
- "username": "KEITHA CARBAJAL",
- "s": "a"
- }
- },
- {
- "_id": 995770,
- "_score": 1,
- "_source": {
- "username": "KEITH GONZALES",
- "s": "a"
- }
- },
- {
- "_id": 990882,
- "_score": 1,
- "_source": {
- "username": "MINH SANTANA",
- "s": "a"
- }
- },
- {
- "_id": 990643,
- "_score": 1,
- "_source": {
- "username": "KEITH MENDES",
- "s": "a"
- }
- },
- {
- "_id": 989972,
- "_score": 1,
- "_source": {
- "username": "KEITHA WALTERS",
- "s": "a"
- }
- },
- {
- "_id": 989954,
- "_score": 1,
- "_source": {
- "username": "GWENN SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 989444,
- "_score": 1,
- "_source": {
- "username": "KEITH KEATON",
- "s": "a"
- }
- },
- {
- "_id": 988755,
- "_score": 1,
- "_source": {
- "username": "SHERRON SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 988366,
- "_score": 1,
- "_source": {
- "username": "LAVONIA SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 988254,
- "_score": 1,
- "_source": {
- "username": "MAYOLA KEITH",
- "s": "a"
- }
- },
- {
- "_id": 987106,
- "_score": 1,
- "_source": {
- "username": "KEITH FAULK",
- "s": "a"
- }
- },
- {
- "_id": 986580,
- "_score": 1,
- "_source": {
- "username": "DARNELL SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 984012,
- "_score": 1,
- "_source": {
- "username": "KEITH CORONEL",
- "s": "a"
- }
- },
- {
- "_id": 982759,
- "_score": 1,
- "_source": {
- "username": "MORGAN KEITH",
- "s": "a"
- }
- },
- {
- "_id": 982421,
- "_score": 1,
- "_source": {
- "username": "KEITH SHIFFLETT",
- "s": "a"
- }
- },
- {
- "_id": 982223,
- "_score": 1,
- "_source": {
- "username": "TELMA KEITH",
- "s": "a"
- }
- },
- {
- "_id": 982056,
- "_score": 1,
- "_source": {
- "username": "RENITA KEITH",
- "s": "a"
- }
- },
- {
- "_id": 981115,
- "_score": 1,
- "_source": {
- "username": "KATIE SMYTH",
- "s": "a"
- }
- }
- ]
- }
- }
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMYTH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
- "took": %{NUMBER},
+ "error": "Undefined array key \"Variable_name\""
- "timed_out": false,
+ }
- "hits": {
- "total": 773,
- "total_relation": "eq",
- "hits": [
- {
- "_id": 998829,
- "_score": 1,
- "_source": {
- "username": "EDYTHE VACA",
- "s": "a"
- }
- },
- {
- "_id": 998500,
- "_score": 1,
- "_source": {
- "username": "SETH PHUNG",
- "s": "a"
- }
- },
- {
- "_id": 996507,
- "_score": 1,
- "_source": {
- "username": "SETH LYMAN",
- "s": "a"
- }
- },
- {
- "_id": 995119,
- "_score": 1,
- "_source": {
- "username": "EDYTHE JOHN",
- "s": "a"
- }
- },
- {
- "_id": 993455,
- "_score": 1,
- "_source": {
- "username": "EDYTH ROSADO",
- "s": "a"
- }
- },
- {
- "_id": 992097,
- "_score": 1,
- "_source": {
- "username": "EDYTH RAGAN",
- "s": "a"
- }
- },
- {
- "_id": 989954,
- "_score": 1,
- "_source": {
- "username": "GWENN SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 988823,
- "_score": 1,
- "_source": {
- "username": "SETH WHITTAKER",
- "s": "a"
- }
- },
- {
- "_id": 988755,
- "_score": 1,
- "_source": {
- "username": "SHERRON SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 988366,
- "_score": 1,
- "_source": {
- "username": "LAVONIA SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 986580,
- "_score": 1,
- "_source": {
- "username": "DARNELL SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 986231,
- "_score": 1,
- "_source": {
- "username": "EDYTH BLODGETT",
- "s": "a"
- }
- },
- {
- "_id": 985595,
- "_score": 1,
- "_source": {
- "username": "SETH BACON",
- "s": "a"
- }
- },
- {
- "_id": 982423,
- "_score": 1,
- "_source": {
- "username": "SETH CHATMAN",
- "s": "a"
- }
- },
- {
- "_id": 981115,
- "_score": 1,
- "_source": {
- "username": "KATIE SMYTH",
- "s": "a"
- }
- },
- {
- "_id": 979541,
- "_score": 1,
- "_source": {
- "username": "EDYTHE CLAYTON",
- "s": "a"
- }
- },
- {
- "_id": 979093,
- "_score": 1,
- "_source": {
- "username": "SETH BURROUGHS",
- "s": "a"
- }
- },
- {
- "_id": 978812,
- "_score": 1,
- "_source": {
- "username": "EDYTH GULLEY",
- "s": "a"
- }
- },
- {
- "_id": 975994,
- "_score": 1,
- "_source": {
- "username": "SETH PARHAM",
- "s": "a"
- }
- },
- {
- "_id": 975841,
- "_score": 1,
- "_source": {
- "username": "ALEIDA SMYTH",
- "s": "a"
- }
- }
- ]
- }
- }
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"layouts":"us,ru"}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- },
- {
- "query": "major"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"append":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- },
- {
- "query": "major"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":0}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "johnny"
- },
- {
- "query": "jon"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":1,"append":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- },
- {
- "query": "major"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1,"layouts":"","append":1,"prepend":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- },
- {
- "query": "major"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":2,"layouts":"us,ru","append":1,"prepend":1,"expansion_len":2}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 6,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"gr","options":{"fuzziness":1,"layouts":"ru","append":1,"prepend":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "gregory"
- },
- {
- "query": "grover"
- },
- {
- "query": "grady"
- },
- {
- "query": "grant"
- },
- {
- "query": "gregg"
- },
- {
- "query": "grace"
- },
- {
- "query": "gracia"
- },
- {
- "query": "graham"
- },
- {
- "query": "grey"
- },
- {
- "query": "grogan"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "Undefined array key \"Variable_name\""
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "jordan"
- },
- {
- "query": "joseph"
- },
- {
- "query": "jose"
- },
- {
- "query": "joe"
- },
- {
- "query": "john"
- },
- {
- "query": "joy"
- },
- {
- "query": "joyce"
- },
- {
- "query": "joey"
- },
- {
- "query": "jon"
- },
- {
- "query": "major"
- }
- ]
- }
- ]
test/clt-tests/buddy/test-unserialize-error-absence-kafka-operations.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
seq 1 5 | xargs -I{} bash -c "mysql -h0 -P9306 -e 'DROP MATERIALIZED VIEW view_table;' || true; mysql -h0 -P9306 -e 'DROP SOURCE kafka;' || true; mysql -h0 -P9306 -e 'DROP TABLE kafka_test;' || true; mysql -h0 -P9306 -e \"CREATE SOURCE kafka (id bigint, term text, abbrev text, GlossDef json) type=\\\"kafka\\\" broker_list=\\\"kafka:9092\\\" topic_list=\\\"my-data\\\" consumer_group=\\\"manticore\\\" num_consumers=\\\"2\\\" batch=50; CREATE TABLE kafka_test (id bigint, name text, short_name text, received_at text, size multi); CREATE MATERIALIZED VIEW view_table TO kafka_test AS SELECT id, term as name, abbrev as short_name, UTC_TIMESTAMP() as received_at, GlossDef.size as size FROM kafka; SHOW SOURCES; SHOW TABLES; SHOW MVS;\""
––– output –––
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "full_name"
- | name |
+ ERROR 1064 (42000) at line 1: Undefined array key "source_name"
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "full_name"
- | kafka |
+ ERROR 1064 (42000) at line 1: Source kafka already exist
- +-------+
+ ERROR 1064 (42000) at line 1: Undefined array key "source_name"
- +------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "full_name"
- | Table | Type |
+ ERROR 1064 (42000) at line 1: DROP TABLE failed: unknown table 'kafka_test'
- +------------+------+
+ ERROR 1064 (42000) at line 1: Source kafka already exist
- | kafka_test | rt |
+ ERROR 1064 (42000) at line 1: Undefined array key "source_name"
- +------------+------+
+ ERROR 1064 (42000) at line 1: Undefined array key "full_name"
- +------------+
+ ERROR 1064 (42000) at line 1: DROP TABLE failed: unknown table 'kafka_test'
- | name |
+ ERROR 1064 (42000) at line 1: Source kafka already exist
- +------------+
+ ERROR 1064 (42000) at line 1: Undefined array key "source_name"
- | view_table |
+ ERROR 1064 (42000) at line 1: Undefined array key "full_name"
- +------------+
+ ERROR 1064 (42000) at line 1: DROP TABLE failed: unknown table 'kafka_test'
- +-------+
+ ERROR 1064 (42000) at line 1: Source kafka already exist
- | name |
- +-------+
- | kafka |
- +-------+
- +------------+------+
- | Table | Type |
- +------------+------+
- | kafka_test | rt |
- +------------+------+
- +------------+
- | name |
- +------------+
- | view_table |
- +------------+
- +-------+
- | name |
- +-------+
- | kafka |
- +-------+
- +------------+------+
- | Table | Type |
- +------------+------+
- | kafka_test | rt |
- +------------+------+
- +------------+
- | name |
- +------------+
- | view_table |
- +------------+
- +-------+
- | name |
- +-------+
- | kafka |
- +-------+
- +------------+------+
- | Table | Type |
- +------------+------+
- | kafka_test | rt |
- +------------+------+
- +------------+
- | name |
- +------------+
- | view_table |
- +------------+
- +-------+
- | name |
- +-------+
- | kafka |
- +-------+
- +------------+------+
- | Table | Type |
- +------------+------+
- | kafka_test | rt |
- +------------+------+
- +------------+
- | name |
- +------------+
- | view_table |
- +------------+
––– input –––
tail -n 1000 /var/log/manticore/searchd.log | grep -i "unserialize"
––– output –––
OK test/clt-tests/buddy/test-prometheus-exporter.rec––– input –––
export SEARCHD_FLAGS="--iostats --cpustats"
––– output –––
OK
––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
curl -s 0:9308/metrics > /tmp/exporter_unfiltered_output.txt
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep -e "^manticore" | cut -d" " -f1 | sed 's/^manticore_//' | sed 's/qcache_thresh_microseconds/qcache_thresh_msec/' | sort > /tmp/exporter_output.txt
––– output –––
OK
––– input –––
searchd --iostats --cpustats --status | cut -d":" -f1 | tail -n +10 | sort > /tmp/searchd_output.txt
––– output –––
OK
––– input –––
ls -1 /tmp
––– output –––
OK
––– input –––
cat /tmp/exporter_unfiltered_output.txt | grep "Warning"
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
+ agent_connect
+ agent_retry
+ agent_tfo
+ avg_dist_local
+ avg_dist_wait
+ avg_dist_wall
+ avg_query_cpu
+ avg_query_readkb
+ avg_query_reads
+ avg_query_readtime
+ avg_query_wall
+ command_callpq
+ command_cluster
+ command_commit
+ command_delete
+ command_excerpt
+ command_flushattrs
+ command_getfield
+ command_insert
+ command_json
+ command_keywords
+ command_persist
+ command_ping
+ command_replace
+ command_search
+ command_set
+ command_sphinxql
+ command_status
+ command_suggest
+ command_update
+ connections
+ dist_local
+ dist_queries
+ dist_wait
+ dist_wall
+ insert_replace_stats_ms_avg
+ insert_replace_stats_ms_max
+ insert_replace_stats_ms_min
+ insert_replace_stats_ms_pct95
+ insert_replace_stats_ms_pct99
+ load
+ load_primary
+ load_secondary
+ maxed_out
+ mysql_version
+ qcache_cached_queries
+ qcache_hits
+ qcache_max_bytes
+ qcache_thresh_msec
+ qcache_ttl_sec
+ qcache_used_bytes
+ queries
+ query_cpu
+ query_readkb
+ query_reads
+ query_readtime
+ query_wall
+ search_stats_ms_avg
+ search_stats_ms_max
+ search_stats_ms_min
+ search_stats_ms_pct95
+ search_stats_ms_pct99
+ update_stats_ms_avg
+ update_stats_ms_max
+ update_stats_ms_min
+ update_stats_ms_pct95
+ update_stats_ms_pct99
+ uptime
+ version
+ workers_active
+ workers_clients
+ workers_clients_buddy
+ workers_clients_vip
+ workers_total
+ work_queue_length
––– input –––
echo "new-option" >> /tmp/searchd_output.txt
––– output –––
OK
––– input –––
while read -r line; do grep -q "^$line" /tmp/exporter_output.txt || echo "$line"; done < /tmp/searchd_output.txt
––– output –––
- new-option
+ agent_connect
+ agent_retry
+ agent_tfo
+ avg_dist_local
+ avg_dist_wait
+ avg_dist_wall
+ avg_query_cpu
+ avg_query_readkb
+ avg_query_reads
+ avg_query_readtime
+ avg_query_wall
+ command_callpq
+ command_cluster
+ command_commit
+ command_delete
+ command_excerpt
+ command_flushattrs
+ command_getfield
+ command_insert
+ command_json
+ command_keywords
+ command_persist
+ command_ping
+ command_replace
+ command_search
+ command_set
+ command_sphinxql
+ command_status
+ command_suggest
+ command_update
+ connections
+ dist_local
+ dist_queries
+ dist_wait
+ dist_wall
+ insert_replace_stats_ms_avg
+ insert_replace_stats_ms_max
+ insert_replace_stats_ms_min
+ insert_replace_stats_ms_pct95
+ insert_replace_stats_ms_pct99
+ load
+ load_primary
+ load_secondary
+ maxed_out
+ mysql_version
+ qcache_cached_queries
+ qcache_hits
+ qcache_max_bytes
+ qcache_thresh_msec
+ qcache_ttl_sec
+ qcache_used_bytes
+ queries
+ query_cpu
+ query_readkb
+ query_reads
+ query_readtime
+ query_wall
+ search_stats_ms_avg
+ search_stats_ms_max
+ search_stats_ms_min
+ search_stats_ms_pct95
+ search_stats_ms_pct99
+ update_stats_ms_avg
+ update_stats_ms_max
+ update_stats_ms_min
+ update_stats_ms_pct95
+ update_stats_ms_pct99
+ uptime
+ version
+ workers_active
+ workers_clients
+ workers_clients_buddy
+ workers_clients_vip
+ workers_total
+ work_queue_length
+ new-option
test/clt-tests/buddy/test-fuzzy-search-dist-table.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
manticore-load --quiet --json --port=1306 --init="CREATE TABLE local_table1 (id BIGINT, username TEXT) min_infix_len='2' expand_keywords='1'" --load="INSERT INTO local_table1 (id, username) VALUES (<increment>, '<text/{./test/clt-tests/scripts/names.txt}/1/1>')" --batch-size=1000 --threads=4 --total=1000 > /dev/null; echo $?
––– output –––
OK
––– input –––
manticore-load --quiet --json --port=2306 --init="CREATE TABLE local_table2 (id BIGINT, username TEXT) min_infix_len='2' expand_keywords='1'" --load="INSERT INTO local_table2 (id, username) VALUES (<increment>, '<text/{./test/clt-tests/scripts/surnames.txt}/1/1>')" --batch-size=1000 --threads=4 --total=1000 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DROP TABLE IF EXISTS dist_table; CREATE TABLE dist_table type='distributed' local='local_table1' agent='127.0.0.1:2312:local_table2';"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW CREATE TABLE dist_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT COUNT(*) FROM dist_table;"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT id, username FROM dist_table WHERE MATCH('RICH') OPTION fuzzy=1;" | tail -n +2 | sort -k1,1n | head -n 10
––– output –––
- +------+-------------+
+ ERROR 1064 (42000) at line 1: no such table 'dist_table'
- +------+-------------+
- | 125 | RICHARDSON. |
- | 363 | RICO. |
- | 417 | BACHMAN. |
- | 43 | RICHARDSON. |
- | 934 | RICH. |
- | 948 | ALDRICH. |
- | 996 | BACH. |
- | id | username |
––– input –––
mysql -h0 -P1306 -e "CALL AUTOCOMPLETE('draw', 'dist_table', 1 AS fuzziness);" | tail -n +4
––– output –––
- | drew |
+ ERROR 1064 (42000) at line 1: no such table 'dist_table'
- | drema |
- | audrea |
- | brewer |
- | dreama |
- | mcgrew |
- | deandrea |
- +----------+
|
clt❌ CLT tests in test/clt-tests/replication/test-replication.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860993,'List of HP business laptops','Elitebook Probook',1);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860994,'List of Dell business laptops','Latitude Precision Vostro',2);" && mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;" && mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_indexes';"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860995,'List of HP business laptops','Macbook',3);"; echo $?
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
sleep 5; mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "INSERT INTO replication:testrt VALUES(6775836565403860996,'NEW','TABLE',4);"; echo $?
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
sleep 5;mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
stdbuf -oL searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
sleep 5;mysql -h0 -P2306 -e "DELETE FROM replication:testrt WHERE id = 6775836565403860994"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_2306.txt;
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
sleep 5;mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_1306.txt;
––– output –––
OK
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_3306.txt;
––– output –––
OK
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_4306.txt;
––– output –––
OK
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_5306.txt;
––– output –––
OK
––– input –––
diff /tmp/output_1306.txt /tmp/output_2306.txt; echo $?
––– output –––
OK
––– input –––
diff /tmp/output_1306.txt /tmp/output_3306.txt; echo $?
––– output –––
OK
––– input –––
diff /tmp/output_1306.txt /tmp/output_4306.txt; echo $?
––– output –––
OK
––– input –––
diff /tmp/output_1306.txt /tmp/output_5306.txt; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "REPLACE INTO replication:testrt SET content='Updated Content', title='List of Dell business laptops', gid=2 WHERE id=6775836565403860994;"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Undefined array key "Field"
+ 1
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
- *************************** 1. row ***************************
- id: 6775836565403860994
- title: List of Dell business laptops
- content: Updated Content
- gid: 2
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
- *************************** 1. row ***************************
- id: 6775836565403860994
- title: List of Dell business laptops
- content: Updated Content
- gid: 2
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
- *************************** 1. row ***************************
- id: 6775836565403860994
- title: List of Dell business laptops
- content: Updated Content
- gid: 2
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
- *************************** 1. row ***************************
- id: 6775836565403860994
- title: List of Dell business laptops
- content: Updated Content
- gid: 2
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
- *************************** 1. row ***************************
- id: 6775836565403860994
- title: List of Dell business laptops
- content: Updated Content
- gid: 2
|
clt❌ CLT tests in test/clt-tests/sharding/replication/create-table-3-nodes-6-shards.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='6' rf='2'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='6' rf='2''
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s5
- Table: system.t_s5
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "desc t\G"; done
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
- Field: id
+ ERROR 1064 (42000) at line 1: no such table 't'
- Type: bigint
+ ERROR 1064 (42000) at line 1: no such table 't'
- Properties:
- *************************** 1. row ***************************
- Field: id
- Type: bigint
- Properties:
- *************************** 1. row ***************************
- Field: id
- Type: bigint
- Properties:
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 4
+ 0
- 4
+ 0
- 4
+ 0
test/clt-tests/sharding/replication/create-table-2-nodes-4-shards.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='4' rf='2'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='4' rf='2''
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "desc t\G"; done
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
- Field: id
+ ERROR 1064 (42000) at line 1: no such table 't'
- Type: bigint
- Properties:
- *************************** 1. row ***************************
- Field: id
- Type: bigint
- Properties:
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 4
+ 0
- 4
+ 0
test/clt-tests/sharding/replication/test-data-manipulation.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
sleep 5; mysql -h0 -P1306 -e "create table c:testrt(id bigint, title text, content text, gid uint) shards='2' rf='1';"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':testrt(id bigint, title text, content text, gid uint) shards='2' rf='1''
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+-------+
- | Counter | Value |
+ | Counter | Value |
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+-------+
- | cluster_c_indexes | system.sharding_state,system.sharding_table,system.sharding_queue |
+ | cluster_c_indexes | |
- +-------------------+-------------------------------------------------------------------+
+ +-------------------+-------+
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.testrt_s0
- Table: system.testrt_s1
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (1, 'Title 1', 'Content 1', 1), (2, 'Title 2', 'Content 2', 2);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (3, 'Title 3', 'Content 3', 3);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (4, 'Title 4', 'Content 4', 4);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt WHERE id IN (1, 2, 3, 4) ORDER BY id ASC;"
––– output –––
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | id | title | content | gid |
+ | id | title | content | gid |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | 1 | 1 | Title 1 | 0 |
+ | 1 | Title 1 | Content 1 | 1 |
- | 2 | 2 | Title 2 | 0 |
+ | 2 | Title 2 | Content 2 | 2 |
- | 3 | 3 | Title 3 | 0 |
+ | 3 | Title 3 | Content 3 | 3 |
- | 4 | 4 | Title 4 | 0 |
+ | 4 | Title 4 | Content 4 | 4 |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
test/clt-tests/sharding/syntax/sharding-syntax-positive.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl1"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table tbl2 shards='5' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl3(id bigint) shards='3' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl4(id bigint) SHARDS='4' RF='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl5(id bigint) shards = '2' rf = '1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "create table tbl6(id bigint) shards='1' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TaBle tbl8(id bigint) ShaRDS='4' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl9 shards='1000' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl10 SHARDS='3' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
test/clt-tests/sharding/functional/functional-sharding-and-cluster-negative.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table tbl1(id bigint) shards='5' rf='2'"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE tbl2 shards='1000' rf='1000';"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table tbl3(id bigint) shards='0' rf='1'"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table tbl4(id bigint) shards='9999999999' rf='1'"
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:tbl5 shards='10' rf='2'"
––– output –––
- ERROR 1064 (42000) at line 1: Cluster 'c' does not exist
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl5 shards='10' rf='2''
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl6(id bigint) shards='3' rf='4'"
––– output –––
- ERROR 1064 (42000) at line 1: The node count (3) is lower than replication factor (4)
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl6(id bigint) shards='3' rf='4''
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl7(id bigint) shards='10' rf='10'"
––– output –––
- ERROR 1064 (42000) at line 1: The node count (3) is lower than replication factor (10)
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl7(id bigint) shards='10' rf='10''
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=single_node
––– output –––
OK
––– input –––
mysql -h0 -P4306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
timeout 30 mysql -h0 -P4306 -e "SHOW STATUS LIKE 'cluster_single_node_status'\G" > /tmp/status_4306.log && grep -q "Value: primary" /tmp/status_4306.log && echo "Port 4306: Node synced" && cat /tmp/status_4306.log
––– output –––
OK
––– input –––
mysql -h0 -P4306 -e "create table ${CLUSTER_NAME}:tbl8(id bigint) shards='3' rf='2'"
––– output –––
- ERROR 1064 (42000) at line 1: The node count for cluster single_node is too low: 1. You can create local sharded table.
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl8(id bigint) shards='3' rf='2''
test/clt-tests/sharding/replication/create-table-1-node-10-shards.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table t(id bigint) shards='10' rf='1'"
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
––– input –––
mysql -h0 -P1306 -e "show tables from system" | grep 'Table: system.a' | sort
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "DESC t\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 't'
- Field: id
- Type: bigint
- Properties:
––– input –––
mysql -h0 -P1306 -e "create table a(id bigint) shards='4' rf='1'"
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
––– input –––
mysql -h0 -P1306 -e "show tables from system\G" | grep 'Table: system.a' | sort
––– output –––
- Table: system.a_s0
- Table: system.a_s1
- Table: system.a_s2
- Table: system.a_s3
––– input –––
mysql -h0 -P1306 -e "DESCRIBE a\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 'a'
- Field: id
- Type: bigint
- Properties:
––– input –––
mysql -h0 -P1306 -e "DESC a\G"
––– output –––
- *************************** 1. row ***************************
+ ERROR 1064 (42000) at line 1: no such table 'a'
- Field: id
- Type: bigint
- Properties:
test/clt-tests/sharding/replication/create-table-5-nodes-60-shards.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306 4306 5306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='60' rf='3' timeout='60'"
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='60' rf='3' timeout='60''
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s0
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s1
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s2
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s3
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s4
- Table: system.t_s5
- Table: system.t_s5
- Table: system.t_s5
- Table: system.t_s6
- Table: system.t_s6
- Table: system.t_s6
- Table: system.t_s7
- Table: system.t_s7
- Table: system.t_s7
- Table: system.t_s8
- Table: system.t_s8
- Table: system.t_s8
- Table: system.t_s9
- Table: system.t_s9
- Table: system.t_s9
- Table: system.t_s10
- Table: system.t_s10
- Table: system.t_s10
- Table: system.t_s11
- Table: system.t_s11
- Table: system.t_s11
- Table: system.t_s12
- Table: system.t_s12
- Table: system.t_s12
- Table: system.t_s13
- Table: system.t_s13
- Table: system.t_s13
- Table: system.t_s14
- Table: system.t_s14
- Table: system.t_s14
- Table: system.t_s15
- Table: system.t_s15
- Table: system.t_s15
- Table: system.t_s16
- Table: system.t_s16
- Table: system.t_s16
- Table: system.t_s17
- Table: system.t_s17
- Table: system.t_s17
- Table: system.t_s18
- Table: system.t_s18
- Table: system.t_s18
- Table: system.t_s19
- Table: system.t_s19
- Table: system.t_s19
- Table: system.t_s20
- Table: system.t_s20
- Table: system.t_s20
- Table: system.t_s21
- Table: system.t_s21
- Table: system.t_s21
- Table: system.t_s22
- Table: system.t_s22
- Table: system.t_s22
- Table: system.t_s23
- Table: system.t_s23
- Table: system.t_s23
- Table: system.t_s24
- Table: system.t_s24
- Table: system.t_s24
- Table: system.t_s25
- Table: system.t_s25
- Table: system.t_s25
- Table: system.t_s26
- Table: system.t_s26
- Table: system.t_s26
- Table: system.t_s27
- Table: system.t_s27
- Table: system.t_s27
- Table: system.t_s28
- Table: system.t_s28
- Table: system.t_s28
- Table: system.t_s29
- Table: system.t_s29
- Table: system.t_s29
- Table: system.t_s30
- Table: system.t_s30
- Table: system.t_s30
- Table: system.t_s31
- Table: system.t_s31
- Table: system.t_s31
- Table: system.t_s32
- Table: system.t_s32
- Table: system.t_s32
- Table: system.t_s33
- Table: system.t_s33
- Table: system.t_s33
- Table: system.t_s34
- Table: system.t_s34
- Table: system.t_s34
- Table: system.t_s35
- Table: system.t_s35
- Table: system.t_s35
- Table: system.t_s36
- Table: system.t_s36
- Table: system.t_s36
- Table: system.t_s37
- Table: system.t_s37
- Table: system.t_s37
- Table: system.t_s38
- Table: system.t_s38
- Table: system.t_s38
- Table: system.t_s39
- Table: system.t_s39
- Table: system.t_s39
- Table: system.t_s40
- Table: system.t_s40
- Table: system.t_s40
- Table: system.t_s41
- Table: system.t_s41
- Table: system.t_s41
- Table: system.t_s42
- Table: system.t_s42
- Table: system.t_s42
- Table: system.t_s43
- Table: system.t_s43
- Table: system.t_s43
- Table: system.t_s44
- Table: system.t_s44
- Table: system.t_s44
- Table: system.t_s45
- Table: system.t_s45
- Table: system.t_s45
- Table: system.t_s46
- Table: system.t_s46
- Table: system.t_s46
- Table: system.t_s47
- Table: system.t_s47
- Table: system.t_s47
- Table: system.t_s48
- Table: system.t_s48
- Table: system.t_s48
- Table: system.t_s49
- Table: system.t_s49
- Table: system.t_s49
- Table: system.t_s50
- Table: system.t_s50
- Table: system.t_s50
- Table: system.t_s51
- Table: system.t_s51
- Table: system.t_s51
- Table: system.t_s52
- Table: system.t_s52
- Table: system.t_s52
- Table: system.t_s53
- Table: system.t_s53
- Table: system.t_s53
- Table: system.t_s54
- Table: system.t_s54
- Table: system.t_s54
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s55
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s56
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s57
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s58
- Table: system.t_s59
- Table: system.t_s59
- Table: system.t_s59
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "desc t\G" | grep 'Create Table'; done
––– output –––
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
+ ERROR 1064 (42000) at line 1: no such table 't'
––– input –––
for i in 1 2 3 4 5; do mysql -h0 -P${i}306 -e "show tables from system\G" | grep 'Table: system.t' | wc -l; done
––– output –––
- 36
+ 0
- 36
+ 0
- 36
+ 0
- 36
+ 0
- 36
+ 0
test/clt-tests/sharding/replication/test-multi-node-sharding-and-replication.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=4
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=5
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
apt-get install -y jq 1> /dev/null 2>&1 ; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table c:t(id bigint) shards='5' rf='3' timeout='300'" >/dev/null
––– output –––
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':t(id bigint) shards='5' rf='3' timeout='300''
––– input –––
grep 'started v' /var/log/manticore-{1,2,3,4,5}/searchd.log | cut -d\' -f3 | cut -d: -f3 | wc -l
––– output –––
OK
––– input –––
for i in 1 2 3 4 5; do echo "#{$i}"; mysql -h0 -P${i}306 -e "show create table t option force=1\G" | grep 'Create Table'; done
––– output –––
- Create Table: CREATE TABLE t type='distributed' local='system.t_s0' local='system.t_s1' local='system.t_s3' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' local='system.t_s1' local='system.t_s2' local='system.t_s4' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' local='system.t_s0' local='system.t_s2' local='system.t_s4' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:1312:system.t_s3|127.0.0.1:4312:system.t_s3|127.0.0.1:5312:system.t_s3'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' local='system.t_s1' local='system.t_s2' local='system.t_s3' agent='127.0.0.1:1312:system.t_s0|127.0.0.1:3312:system.t_s0|127.0.0.1:5312:system.t_s0' agent='127.0.0.1:2312:system.t_s4|127.0.0.1:3312:system.t_s4|127.0.0.1:5312:system.t_s4'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
- Create Table: CREATE TABLE t type='distributed' local='system.t_s0' local='system.t_s3' local='system.t_s4' agent='127.0.0.1:1312:system.t_s1|127.0.0.1:2312:system.t_s1|127.0.0.1:4312:system.t_s1' agent='127.0.0.1:2312:system.t_s2|127.0.0.1:3312:system.t_s2|127.0.0.1:4312:system.t_s2'
+ ERROR 1064 (42000) at line 1: You have an error in your query. Please, double-check it.
test/clt-tests/sharding/functional/functional-sharding-positive.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=3
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=replication
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306 3306; do timeout 60 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_replication_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards='5' rf='2'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl1(id bigint) shards='5' rf='2''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl1_s' | sort -V
––– output –––
- Table: system.tbl1_s0
- Table: system.tbl1_s0
- Table: system.tbl1_s1
- Table: system.tbl1_s1
- Table: system.tbl1_s2
- Table: system.tbl1_s2
- Table: system.tbl1_s3
- Table: system.tbl1_s3
- Table: system.tbl1_s4
- Table: system.tbl1_s4
––– input –––
mysql -h0 -P2306 -e "create table ${CLUSTER_NAME}:tbl2(id bigint) shards='4' rf='1'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl2(id bigint) shards='4' rf='1''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl2_s' | sort -V
––– output –––
- Table: system.tbl2_s0
- Table: system.tbl2_s1
- Table: system.tbl2_s2
- Table: system.tbl2_s3
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='5' rf='2'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl3(id bigint) shards='5' rf='2''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
––– input –––
mysql -h0 -P3306 -e "DROP TABLE ${CLUSTER_NAME}:tbl3"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: table 'tbl3' is missing: DROP TABLE failed: table 'tbl3' must exist
+ 1
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl3(id bigint) shards='10' rf='3'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl3(id bigint) shards='10' rf='3''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'system.tbl3_s' | sort -V
––– output –––
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s0
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s1
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s2
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s3
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s4
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s5
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s6
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s7
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s8
- Table: system.tbl3_s9
- Table: system.tbl3_s9
- Table: system.tbl3_s9
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl4(id bigint) shards='3000' rf='3' timeout='60'"; echo $?
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: P03: syntax error, unexpected $undefined, expecting $end near ':tbl4(id bigint) shards='3000' rf='3' timeout='60''
+ 1
––– input –––
for i in 1 2 3; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep -c 'system.tbl4_s'
––– output –––
- 9000
+ 0
––– input –––
mysql -h0 -P3306 -e "create table ${CLUSTER_NAME}:tbl5(id bigint) shards='3001' rf='3'"?
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/core/test-concurrent-requests-to-buddy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'debug sleep 30' &
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'show queries' | grep -q debug && echo "Success" || echo "Failure"
––– output –––
- Success
+ Failure
test/clt-tests/core/show-version-trailing-semicolon.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- +------------+----------------------------------+
+ Empty set (0.003 sec)
- | Component | Version |
- +------------+----------------------------------+
- | Daemon | %{VERSION} #!/\s*/!#|
- | Columnar | columnar %{VERSION} #!/\s*/!#|
- | Secondary | secondary %{VERSION} #!/\s*/!#|
- | Knn | knn %{VERSION} #!/\s*/!#|
- | Embeddings | embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)\s*/!#|
- | Buddy | buddy %{VERSION} #!/\s*/!#|
- +------------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw" -d "show version"; echo
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/core/test-concurrent-requests-to-buddy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'debug sleep 30' &
––– output –––
OK
––– input –––
curl -s localhost:9308/cli -d 'show queries' | grep -q debug && echo "Success" || echo "Failure"
––– output –––
- Success
+ Failure
test/clt-tests/core/show-version-trailing-semicolon.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CREATE TABLE t (id INT, value TEXT); INSERT INTO t VALUES (1, 'example'), (2, 'test');"
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/cli?show%20version" | awk '!/row.*in set/'; echo
––– output –––
- +------------+----------------------------------+
+ Empty set (0.002 sec)
- | Component | Version |
- +------------+----------------------------------+
- | Daemon | %{VERSION} #!/\s*/!#|
- | Columnar | columnar %{VERSION} #!/\s*/!#|
- | Secondary | secondary %{VERSION} #!/\s*/!#|
- | Knn | knn %{VERSION} #!/\s*/!#|
- | Embeddings | embeddings #!/([0-9]+\.[0-9]+\.[0-9]+)\s*/!#|
- | Buddy | buddy %{VERSION} #!/\s*/!#|
- +------------+----------------------------------+
––– input –––
curl -s "http://localhost:9308/cli_json" -d "show version"; echo
––– output –––
OK
––– input –––
curl -s "http://localhost:9308/sql?mode=raw" -d "show version"; echo
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
2d04f09
to
0cf980a
Compare
clt❌ CLT tests in test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK |
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/sharding/replication/test-data-manipulation.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
sleep 5; mysql -h0 -P1306 -e "create table c:testrt(id bigint, title text, content text, gid uint) shards='2' rf='1';"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
OK
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (1, 'Title 1', 'Content 1', 1), (2, 'Title 2', 'Content 2', 2);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (3, 'Title 3', 'Content 3', 3);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (4, 'Title 4', 'Content 4', 4);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt WHERE id IN (1, 2, 3, 4) ORDER BY id ASC;"
––– output –––
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | id | title | content | gid |
+ | id | title | content | gid |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | 1 | 1 | Title 1 | 0 |
+ | 1 | Title 1 | Content 1 | 1 |
- | 2 | 2 | Title 2 | 0 |
+ | 2 | Title 2 | Content 2 | 2 |
- | 3 | 3 | Title 3 | 0 |
+ | 3 | Title 3 | Content 3 | 3 |
- | 4 | 4 | Title 4 | 0 |
+ | 4 | Title 4 | Content 4 | 4 |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
|
- Move parsing of additional queries from fromSqlRequest() to extractAdditionalQueries() - Improve query splitting logic for better clarity and reuse
0cf980a
to
730ed59
Compare
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
clt❌ CLT tests in test/clt-tests/buddy/test-fuzzy-search-negative.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=1000 --concurrency=4 --docs=5000000 --start-id=1 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') OPTION fuzzy=-1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') OPTION fuzzy='0';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') OPTION fuzzy='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') OPTION fuzzy=a;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') OPTION fuzzy=@;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('j', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE(123, 'name', 'us' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('@#$', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('thisisaverylonginputstring', 'name', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'non_existing_table', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: no such table 'non_existing_table'
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 123 AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('hello') OPTION fuzzy=1 layouts='';"
––– output –––
OK test/clt-tests/buddy/test-fuzzy-search-non-min-infix-len.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; stdbuf -oL searchd > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "create table test (id bigint, value text);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'test', 'us' AS layouts);"
––– output –––
- ERROR 1064 (42000) at line 1: Autocomplete requires min_infix_len to be set
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('RICH') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "ALTER TABLE test min_infix_len='2';"
––– output –––
OK
––– input –––
sleep 30; mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'test', 'us' AS layouts);"
––– output –––
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM test WHERE MATCH('RICH') OPTION fuzzy=1;"
––– output –––
OK test/clt-tests/buddy/test-facet-with-option-fuzzy.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS test; CREATE TABLE test(column1 int, column2 int, column3 text) min_infix_len = '2'; INSERT INTO test(column1, column2, column3) VALUES (123, 3333, 'text here'), (456, 22222, 'text here');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1
FACET column2;"
––– output –––
+ +---------+----------+
+ | column2 | count(*) |
+ +---------+----------+
+ | 3333 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET (IF(NOT INTEGER(column1), column1 > column2, column2 > 4) AND column2 <= 2 AND column2 >= 1) AS crazy_field;"
––– output –––
+ +-------------+----------+
+ | crazy_field | count(*) |
+ +-------------+----------+
+ | 0 | 2 |
+ +-------------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, cutoff=1, layouts=''
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION layouts='', fuzzy=1
FACET column1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 ORDER BY COUNT(*) DESC;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ | 456 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1
FACET column1 LIMIT 1;"
––– output –––
+ +---------+----------+
+ | column1 | count(*) |
+ +---------+----------+
+ | 123 | 1 |
+ +---------+----------+
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION fuzzy=1, fix_overlap=1
FACET column1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "
SELECT column1, column2, column3
FROM test
WHERE MATCH('text')
OPTION cutoff=1, fuzzy=1
FACET column3;"
––– output –––
OK test/clt-tests/buddy/test-fuzzy-search.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=\"1\";"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), field_weights=(username=1), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, field_weights=(username=1), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, ranker=expr('sum((4*lcs+2*(min_hit_pos=1)+exact_hit)*user_weight)*1000+bm25'), fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT username FROM name WHERE MATCH('SMITH') OPTION cutoff=0, fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC OPTION fuzzy=0;" > /tmp/result_fuzzy0.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id ASC;" > /tmp/result_no_fuzzy.txt
––– output –––
OK
––– input –––
diff /tmp/result_fuzzy0.txt /tmp/result_no_fuzzy.txt; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
- +--------+
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
- | joe |
- | joey |
- | john |
- | jon |
- | jordan |
- | jose |
- | joseph |
- | joy |
- | joyce |
- | major |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
- +---------+
+ ERROR 1064 (42000) at line 1: At least two languages are required in layouts
- | grace |
- | gracia |
- | grady |
- | graham |
- | grant |
- | gregg |
- | gregory |
- | grey |
- | grogan |
- | grover |
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS tbl1; CREATE TABLE tbl1 (title TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM \`tbl1\` WHERE MATCH('abc') OPTION fuzzy = 1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; DEBUG SLEEP 2; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "insert into t values(3, 'aa defghi xxx');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "select * from t where match('aa def ghi xxx') option fuzzy=1, layouts='';"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
OK
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
OK
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf; echo $?
––– output –––
OK
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv; echo $?
––– output –––
OK
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain; echo $?
––– output –––
OK
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1; echo $?
––– output –––
OK
––– input –––
rm -f /tmp/searchd.log; stdbuf -oL searchd --stopwait > /dev/null; (stdbuf -oL searchd -c /tmp/manticore_idx.conf 2>&1 | tee /tmp/searchd.log | grep -i precach & disown); sleep 0.5; if timeout 10 grep -qm1 '\[BUDDY\] started' /tmp/searchd.log; then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /tmp/searchd.log; fi
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
OK test/clt-tests/buddy/test-fuzzy-autocomplete-http.rec––– input –––
rm -f /var/log/manticore/searchd.log; stdbuf -oL searchd $SEARCHD_FLAGS > /dev/null; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
OK
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
OK
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
OK
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=1 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name ORDER BY id ASC LIMIT 1000000 OPTION max_matches=1000000;" > /tmp/name_data.txt
––– output –––
OK
––– input –––
md5sum /tmp/name_data.txt
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.\(min_infix_len='2'\)./\1/"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
OK
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"EBGRNA"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"ANT"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"tony"}}]}},"options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMITH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/search -d '{"index":"name","query":{"bool":{"must":[{"match":{"*":"SMYTH"}}]}}, "sort":[{"id":"desc"},{"username":"asc"}], "options":{"fuzzy":true}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"layouts":"us,ru"}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"append":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":0}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"prepend":1,"append":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1,"layouts":"","append":1,"prepend":1}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":2,"layouts":"us,ru","append":1,"prepend":1,"expansion_len":2}}' | jq -M
––– output –––
OK
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"gr","options":{"fuzziness":1,"layouts":"ru","append":1,"prepend":1}}' | jq -M
––– output –––
- [
+ {
- {
+ "error": "At least two languages are required in layouts"
- "total": 10,
+ }
- "error": "",
- "warning": "",
- "columns": [
- {
- "query": {
- "type": "string"
- }
- }
- ],
- "data": [
- {
- "query": "gregory"
- },
- {
- "query": "grover"
- },
- {
- "query": "grady"
- },
- {
- "query": "grant"
- },
- {
- "query": "gregg"
- },
- {
- "query": "grace"
- },
- {
- "query": "gracia"
- },
- {
- "query": "graham"
- },
- {
- "query": "grey"
- },
- {
- "query": "grogan"
- }
- ]
- }
- ]
––– input –––
curl -sX POST http://localhost:9308/autocomplete -d '{"table":"name","query":"jo","options":{"fuzziness":1}}' | jq -M
––– output –––
OK |
clt❌ CLT tests in test/clt-tests/sharding/replication/test-data-manipulation.rec––– input –––
export INSTANCE=1
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export INSTANCE=2
––– output –––
OK
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
OK
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf > /dev/null
––– output –––
OK
––– input –––
if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore-${INSTANCE}/searchd.log; fi
––– output –––
OK
––– input –––
export CLUSTER_NAME=c
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
OK
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
OK
––– input –––
for port in 1306 2306; do timeout 30 mysql -h0 -P$port -e "SHOW STATUS LIKE 'cluster_c_status'\G" > /tmp/status_$port.log && grep -q "Value: primary" /tmp/status_$port.log && echo "Port $port: Node synced"; done && cat /tmp/status_1306.log
––– output –––
OK
––– input –––
sleep 5; mysql -h0 -P1306 -e "create table c:testrt(id bigint, title text, content text, gid uint) shards='2' rf='1';"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_c_indexes';"
––– output –––
OK
––– input –––
for i in 1 2; do mysql -h0 -P${i}306 -e "show tables from system\G"; done | grep 'Table: system.t' | sort -V
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (1, 'Title 1', 'Content 1', 1), (2, 'Title 2', 'Content 2', 2);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (3, 'Title 3', 'Content 3', 3);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "INSERT INTO testrt (id, title, content, gid) values (4, 'Title 4', 'Content 4', 4);"; echo $?
––– output –––
OK
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt WHERE id IN (1, 2, 3, 4) ORDER BY id ASC;"
––– output –––
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | id | title | content | gid |
+ | id | title | content | gid |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
- | 1 | 1 | Title 1 | 0 |
+ | 1 | Title 1 | Content 1 | 1 |
- | 2 | 2 | Title 2 | 0 |
+ | 2 | Title 2 | Content 2 | 2 |
- | 3 | 3 | Title 3 | 0 |
+ | 3 | Title 3 | Content 3 | 3 |
- | 4 | 4 | Title 4 | 0 |
+ | 4 | Title 4 | Content 4 | 4 |
- +------+-------+---------+------+
+ +------+---------+-----------+------+
|
🐳 Docker Images PushedBuddy Test-Kit Images:
Base image used: These images contain the buddy code from this PR and can be used for testing. |
No description provided.