Slackbot
10/11/2023, 8:33 PMJason Bosco
10/11/2023, 8:34 PMJason Bosco
10/11/2023, 8:34 PMDavid Engel
10/11/2023, 8:36 PMcurl 'https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=API-KEY-HERE' \
-H 'authority: mjxs6lrkh90e37y1p-1.a1.typesense.net' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: text/plain' \
-H 'origin: http://localhost:3000' \
-H 'referer: http://localhost:3000/' \
-H 'sec-ch-ua: "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' \
--data-raw '{"searches":[{"query_by":"name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema","infix":"always,off,off,off,off,off,off,off","highlight_full_fields":"name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema","collection":"nodes","q":"ORDERS","facet_by":"sqlType,materializationType,database_schema,locationName","filter_by":"workspaceID:26","max_facet_values":10,"page":1,"per_page":100}]}' \
--compressedDavid Engel
10/11/2023, 8:37 PMORDERS, and it should match an item with the name ORDERS, as well as other items with prefixes or suffixes, such as STG_ORDERS or PSTG_ORDERS_214. But I'm only getting the exact match returned in my results.Jason Bosco
10/11/2023, 8:40 PMOO_ORDERS returned starting from the 4th result for that query:
"highlight": {
"name": {
"matched_tokens": [
"OO_ORDERS"
],
"snippet": "markOO_ORDERS/mark",
"value": "markOO_ORDERS/mark"
}
},Jason Bosco
10/11/2023, 8:41 PMDELTA_OO_ORDERS, STG_ORDERS_COMPS, etcDavid Engel
10/11/2023, 8:45 PMworkspaceID to refine results to a single customer account. There should be two results that are returned based off of the query of `ORDERS`: ORDERS, and STG_ORDERSDavid Engel
10/11/2023, 8:51 PMDavid Engel
10/11/2023, 8:55 PMcurl 'https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=SCOPED_API_KEY_HERE' \
-H 'authority: mjxs6lrkh90e37y1p-1.a1.typesense.net' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: text/plain' \
-H 'origin: http://localhost:3000' \
-H 'referer: http://localhost:3000/' \
-H 'sec-ch-ua: "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' \
--data-raw '{"searches":[{"query_by":"name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema","infix":"always,off,off,off,off,off,off,off","highlight_full_fields":"name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema","collection":"nodes","q":"region","facet_by":"sqlType,materializationType,database_schema,locationName","filter_by":"workspaceID:26","max_facet_values":10,"page":1,"per_page":100}]}' \
--compressed
with the scoped API key, I get
{"results":[{"facet_counts":[{"counts":[{"count":1,"highlighted":"Source","value":"Source"}],"field_name":"sqlType","sampled":false,"stats":{"total_values":1}},{"counts":[{"count":1,"highlighted":"","value":""}],"field_name":"materializationType","sampled":false,"stats":{"total_values":1}},{"counts":[{"count":1,"highlighted":"COALESCE_SAMPLE_DATABASE.TPCH_SF001","value":"COALESCE_SAMPLE_DATABASE.TPCH_SF001"}],"field_name":"database_schema","sampled":false,"stats":{"total_values":1}},{"counts":[{"count":1,"highlighted":"SRC","value":"SRC"}],"field_name":"locationName","sampled":false,"stats":{"total_values":1}}],"found":1,"hits":[{"document":{"database":"COALESCE_SAMPLE_DATABASE","database_schema":"COALESCE_SAMPLE_DATABASE.TPCH_SF001","firestoreID":"ccdeba98-accc-4cc5-8fae-9b49ea70a816","id":"orgs/2G09yal084Jq7AYKaoxz/workspaces/26/steps/ccdeba98-accc-4cc5-8fae-9b49ea70a816","locationName":"SRC","materializationType":"","metadata":[[[[],["fcb4a9df-f070-4e7d-bf68-0dcfaedffcc1","ccdeba98-accc-4cc5-8fae-9b49ea70a816"],false,"","NUMBER(38,0)",false,"R_REGIONKEY","",[],[true,[]],false],[[],["fd58bbb5-9682-4061-aad6-4782cd86c4d2","ccdeba98-accc-4cc5-8fae-9b49ea70a816"],false,"",false,"VARCHAR(25)","R_NAME","",[],false,[true,[]]],[[],["c3a0b955-2db9-4758-9eb3-3136f412be71","ccdeba98-accc-4cc5-8fae-9b49ea70a816"],true,"","VARCHAR(152)",false,"R_COMMENT","",[],false,[true,[]]]],["FROM {{ ref('SRC', 'REGION') }}"]],"name":"REGION","orgID":"2G09yal084Jq7AYKaoxz","schema":"TPCH_SF001","sqlType":"Source","workspaceID":"26"},"highlight":{"name":{"matched_tokens":["REGION"],"snippet":"<mark>REGION</mark>","value":"<mark>REGION</mark>"}},"highlights":[{"field":"name","matched_tokens":["REGION"],"snippet":"<mark>REGION</mark>","value":"<mark>REGION</mark>"}],"text_match":578730123365711993,"text_match_info":{"best_field_score":"1108091339008","best_field_weight":15,"fields_matched":1,"score":"578730123365711993","tokens_matched":1}}],"out_of":438164,"page":1,"request_params":{"collection_name":"nodes-2023-08-11","per_page":100,"q":"region"},"search_cutoff":false,"search_time_ms":17}]}%
returnedJason Bosco
10/11/2023, 9:00 PMDavid Engel
10/11/2023, 9:03 PMconst typesenseKey = client.keys().generateScopedSearchKey(typesenseSearchKey, {
filter_by: `orgID:${request.params.orgID}`,
expires_at: expirationDateSeconds,
});
And in my case, orgID is 9oFpuSA9ozt55hxy6ByF and my workspaceID is in the cURL, but it's 26Jason Bosco
10/11/2023, 9:05 PM"filter_by": "workspaceID:26 && orgID:9oFpuSA9ozt55hxy6ByF",
"q": "*"
even with q=*Jason Bosco
10/11/2023, 9:06 PMDavid Engel
10/11/2023, 9:06 PM2G09yal084Jq7AYKaoxzJason Bosco
10/11/2023, 9:09 PM$ curl -s "https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=${TYPESENSE_API_KEY}" \
--data-raw '
{
"searches": [
{
"query_by": "name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema",
"infix": "always,off,off,off,off,off,off,off",
"highlight_full_fields": "name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema",
"collection": "nodes",
"q": "ORDERS",
"facet_by": "sqlType,materializationType,database_schema,locationName",
"filter_by": "workspaceID:26 && orgID:2G09yal084Jq7AYKaoxz",
"max_facet_values": 10,
"page": 1,
"per_page": 100
}
]
}
' | jq '.results[0].hits[].document.name'
"ORDERS"
"STG_ORDERS"Jason Bosco
10/11/2023, 9:09 PMq=* I get the following:
"STG_ORDERS"
"STG_REGION"
"SUPPLIER"
"REGION"
"PARTSUPP"
"NATION"
"ORDERS"
"PART"
"CUSTOMER"
"DAILY_14_TOTAL_SHORT"
"LINEITEM"
"STG_CUSTOMER"David Engel
10/11/2023, 9:10 PMORDERS.
Now on my end, it's working for ORDERS and CUSTOMERS, but not for REGION.David Engel
10/11/2023, 9:11 PMJason Bosco
10/11/2023, 9:13 PMREGION nowDavid Engel
10/11/2023, 9:14 PMREGION is working if the query is upper case, and not working if it's lower caseJason Bosco
10/11/2023, 9:15 PMJason Bosco
10/11/2023, 9:17 PMJason Bosco
10/11/2023, 9:18 PMJason Bosco
10/11/2023, 9:18 PMDavid Engel
10/11/2023, 9:20 PMJason Bosco
10/11/2023, 9:24 PMDavid Engel
10/11/2023, 9:25 PMJason Bosco
10/11/2023, 9:25 PMJason Bosco
10/11/2023, 9:26 PM_ character?David Engel
10/11/2023, 9:27 PMJason Bosco
10/11/2023, 9:28 PM_ as a token_separator when creating the collection schema in that case. Then you won't need to use infix searchJason Bosco
10/11/2023, 9:28 PMDavid Engel
10/11/2023, 9:29 PM"symbols_to_index": [
"_",
"-",
"."
],
"token_separators": [
"_",
"-",
"."
]Jason Bosco
10/11/2023, 9:29 PMSTG_ORDER as STG and ORDER (as two separate words) and regular prefix search will then workJason Bosco
10/11/2023, 9:29 PMDavid Engel
10/11/2023, 9:31 PMadditionalSearchParameters for infixJason Bosco
10/11/2023, 9:31 PMsymbols_to_index from the collection thoughJason Bosco
10/11/2023, 9:31 PMsymbols_to_index takes precedence over token_separatorsDavid Engel
10/11/2023, 9:32 PMDavid Engel
10/11/2023, 9:33 PMJason Bosco
10/11/2023, 10:36 PMJason Bosco
10/11/2023, 10:36 PMJason Bosco
10/13/2023, 3:29 AMJason Bosco
10/13/2023, 3:29 AMJason Bosco
10/13/2023, 3:30 AMDavid Engel
10/13/2023, 3:59 PMJason Bosco
10/13/2023, 4:18 PMDavid Engel
10/13/2023, 4:19 PMDavid Engel
10/20/2023, 2:35 PMJason Bosco
10/20/2023, 2:38 PMDavid Engel
10/20/2023, 4:03 PMJason Bosco
10/20/2023, 4:47 PMDavid Engel
10/20/2023, 4:51 PMJason Bosco
10/20/2023, 4:53 PMDavid Engel
10/20/2023, 5:59 PMDavid Engel
10/20/2023, 6:02 PMJason Bosco
10/20/2023, 7:13 PMDavid Engel
10/20/2023, 7:15 PMDavid Engel
10/23/2023, 7:24 PMtoken_separators and that appears to be successful so farJason Bosco
10/23/2023, 7:25 PMDavid Engel
10/23/2023, 7:28 PMl2cioyjbxrn89hqkp-1.a1.typesense.net and probably won't be updated for 1-3 days. You're free to restart as neededJason Bosco
10/23/2023, 8:35 PMJason Bosco
10/26/2023, 12:03 AMDavid Engel
10/26/2023, 3:26 PMDavid Engel
10/26/2023, 4:49 PMnodes-typesense-test on cluster mjxs6lrkh90e37y1p-1.a1.typesense.net. I didn't deploy a firestore cloud function for this collection, because I don't think that's related to the bug, but the schema and data is identical to the original collection we were troubleshooting.David Engel
11/07/2023, 6:27 PMinfix search after the schema updates were made to our clusters.
• symbols_to_index: [] is empty so it doesn't overwrite token_separators: ["_", "-", "."]
• We have infix: true on the field we want to enable infix search on, and that same field has infix: always in our additionalSearchParameters
But we're still getting inconsistent results.
For example:
• searching for item should return lineitem and stg_lineitem, but it returns no results.
• searching for otal should return daily_14_total_short and stg_daily_total_short, but it returns no results. These results are returned if I search for ort instead.
• searching for ppli returns supplier, & stg_supplier when I would expect it to return nothing after running the previous two queries
We do want the infix search results returned, like in the third example, or the ort query in the second bullet note.
Not too sure what else I can do to make the results more consistentJason Bosco
11/07/2023, 8:38 PMsearching for item should return lineitem and stg_lineitem, but it returns no results.Could you give me a full curl request that replicates this issue? I just tried it with this and it seems to work:
curl -sk "https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=${TYPESENSE_API_KEY}" \
--data-raw '
{
"searches": [
{
"query_by": "name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema",
"infix": "always,off,off,off,off,off,off,off",
"highlight_full_fields": "name,metadata.columns.name,sqlType,materializationType,locationName,database,schema,database_schema",
"collection": "nodes-typesense-test",
"q": "item",
"facet_by": "sqlType,materializationType,database_schema,locationName",
"filter_by": "workspaceID:26",
"max_facet_values": 10,
"page": 1,
"per_page": 100
}
]
}
' | jq '.results[0].hits[].document.name'David Engel
11/08/2023, 12:46 AMcurl 'https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=TYPESENSE_API_KEY' \
-H 'authority: mjxs6lrkh90e37y1p-1.a1.typesense.net' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: text/plain' \
-H 'origin: https://dev.app.coalescestage.io' \
-H 'referer: https://dev.app.coalescestage.io/' \
-H 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--data-raw '{"searches":[{"query_by":"name,sqlType,materializationType,locationName,database,schema,database_schema","infix":"always,off,off,off,off,off,off","highlight_full_fields":"name,sqlType,materializationType,locationName,database,schema,database_schema","collection":"nodes","q":"item","facet_by":"sqlType,materializationType,database_schema,locationName","filter_by":"workspaceID:25","max_facet_values":10,"page":1,"per_page":100}]}' \
this is also using the scoped access key
client.keys().generateScopedSearchKey(typesenseSearchKey, {
filter_by: `orgID:2G09yal084Jq7AYKaoxz`,
expires_at: <expiration-date>,
});
And then filtering on workspaceID: 25 like previously.Jason Bosco
11/08/2023, 12:49 AM$ curl -s "https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=${TYPESENSE_API_KEY}" \
--data-raw '
{
"searches": [
{
"query_by": "name,sqlType,materializationType,locationName,database,schema,database_schema",
"infix": "always,off,off,off,off,off,off",
"highlight_full_fields": "name,sqlType,materializationType,locationName,database,schema,database_schema",
"collection": "nodes",
"q": "item",
"facet_by": "sqlType,materializationType,database_schema,locationName",
"filter_by": "workspaceID:25",
"max_facet_values": 10,
"page": 1,
"per_page": 20
}
]
}' | jq '.results[0].hits[].document.name'
"ITEM"
"ITEM"
"PSTG_CW_IV_ITEM"
"STG_CW_IV_ITEM"
"LINE_ITEM"
"PSTG_QBO_ITEM"
"STG_QBO_ITEM"
"IV_ITEM"
"PROCESSING_SITE_SHIFT_ITEM"
"IV_ITEM"
"STAGE_VISIT_CLINICITEM"
"STAGE_CLINICITEM"
"S_CLINICITEM_LROC_INFO_CURRENT"
"S_INVOICE_CLINICITEM_LROC_INFO"
"S_VISIT_CLINICITEM_LROC_INFO"
"L_MANUFACTURER_CLINICITEM"
"L_VISIT_CLINICITEM"
"S_VISIT_CLINICITEM_LROC_INFO_CURRENT"
"S_CLINICITEM_LROC_INFO_PIT"
"S_VISIT_CLINICITEM_LROC_INFO_PIT"David Engel
11/08/2023, 1:03 AMsearching foris also working. Butshould returnotalanddaily_14_total_shortstg_daily_total_short
searching fordid work previously, and now it's not.returnsppli, &supplierstg_supplier
curl 'https://mjxs6lrkh90e37y1p-1.a1.typesense.net/multi_search?x-typesense-api-key=TYPESENSE_API_KEY' \
-H 'authority: mjxs6lrkh90e37y1p-1.a1.typesense.net' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: text/plain' \
-H 'origin: https://dev.app.coalescestage.io' \
-H 'referer: https://dev.app.coalescestage.io/' \
-H 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: cross-site' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--data-raw '{"searches":[{"query_by":"name,sqlType,materializationType,locationName,database,schema,database_schema","infix":"always,off,off,off,off,off,off","highlight_full_fields":"name,sqlType,materializationType,locationName,database,schema,database_schema","collection":"nodes","q":"ppli","facet_by":"sqlType,materializationType,database_schema,locationName","filter_by":"workspaceID:25","max_facet_values":10,"page":1,"per_page":100}]}' \
--compressed
returns
{
"results": [
{
"facet_counts": [
{
"counts": [],
"field_name": "sqlType",
"sampled": false,
"stats": {
"total_values": 0
}
},
{
"counts": [],
"field_name": "materializationType",
"sampled": false,
"stats": {
"total_values": 0
}
},
{
"counts": [],
"field_name": "database_schema",
"sampled": false,
"stats": {
"total_values": 0
}
},
{
"counts": [],
"field_name": "locationName",
"sampled": false,
"stats": {
"total_values": 0
}
}
],
"found": 0,
"hits": [],
"out_of": 479577,
"page": 1,
"request_params": {
"collection_name": "nodes-2023-10-23",
"per_page": 100,
"q": "ppli"
},
"search_cutoff": false,
"search_time_ms": 7
}
]
}
Sorry, this is a tricky oneDavid Engel
11/08/2023, 1:05 AMitem query isn't returning anything againJason Bosco
11/08/2023, 1:08 AMJason Bosco
11/08/2023, 1:08 AMJason Bosco
11/08/2023, 1:14 AMDavid Engel
11/08/2023, 1:17 AMDavid Engel
11/08/2023, 1:25 AMDavid Engel
11/08/2023, 1:25 AMDavid Engel
11/08/2023, 1:27 AMJason Bosco
11/08/2023, 1:35 AMexperiencing some other strange behaviorMight because of us restarting the process while we were debugging.
Jason Bosco
11/08/2023, 1:36 AMJason Bosco
11/08/2023, 3:14 PMDavid Engel
11/08/2023, 3:42 PMJason Bosco
11/08/2023, 4:26 PM0.26.0.rc29 and try to replicate the issue? Some refactoring we did to fix other bugs seems to have also addressed this issue as a side effect in that build, at least in our testsDavid Engel
11/08/2023, 4:27 PMDavid Engel
11/08/2023, 5:04 PM0.26.0.rc29 does appear a bit better, but still not getting some expected results.
> searching for otal should return daily_14_total_short and stg_daily_total_short
is currently working
> searching for ppli returns supplier, & stg_supplier
worked the first time I tried, but now it's not returning any results
> searching for item should return lineitem and stg_lineitem, and stg_lineitem1
is returning STG_LINEITEM1, but not LINEITEM or STG_LINEITEMJason Bosco
11/08/2023, 5:07 PMJason Bosco
11/13/2023, 5:27 PM0.26.0.rc32. Could you confirm if everything looks good now?David Engel
11/13/2023, 6:00 PMJason Bosco
11/13/2023, 6:04 PMJason Bosco
11/13/2023, 6:05 PMDavid Engel
11/13/2023, 6:09 PMinfix hits don't seem to highlight the relevant part of the title, but rather the full word. It was like this previously, and isn't a big deal to us at the moment!Jason Bosco
11/13/2023, 6:35 PMDavid Engel
11/14/2023, 12:06 AMv0.26.0.rc32 will be officially released? My team is hesitant to take this to prod until it's publicly available.Jason Bosco
11/14/2023, 12:19 AM0.26.0...
But usually most RC builds are safe to run on production and many of our users do this. We also tend to patch known issues quickly on these RC builds as they are reported. The last GA build is essentially just the promotion of the last RC build after we've fixed all known issues and nothing has been reported for a few weeks.David Engel
11/14/2023, 12:20 AM