strange, it looks to be done, but `facet` value is...
# community-help
r
strange, it looks to be done, but
facet
value is still
false
for my field (i modified it to be
true
)
j
It could have failed due to a validation error... Are you on Typesense Cloud? If so could you email your cluster ID to support at typesense dot org and we can take a closer look
r
I just tried it again, but after 30 seconds the request timed out and then it displayed the "Another collection update operation is in progress." error
i'll email my cluster id
j
Got it. Here's the error I see in your cluster's logs when altering the orders collection:
Copy code
Alter failed validation: Referenced document having `id: xxxxxx` not found in the collection `customer`
So it sounds like there's an order without an associated customer record? CC: @Harpreet Sangar
r
oh, that's odd. maybe a customer account was removed or merged but the associated order was not updated properly.
do you have the actual ID for me?
or can i query the collection using a left join-ish approach to find it myself?
i have no clue how to find the broken record, it looks like a left join to find the missing value is not possible
@Harpreet Sangar any chance you could get me the ID of the record that was not found in the linked collection?
currently migration cluster to 28.0.rc31, so maybe not right now 😅
h
I don't have access to the cloud clusters. Only Kishore or Jason can help you with it.
r
okay, thanks for letting me know
h
Found the bugged document using the following approach: Collect all the customer ids using the export endpoint like,
Copy code
curl -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -X GET \
    "<http://localhost:8108/collections/customer/documents/export?include_fields=id>"
Then send this query to the
order
collection:
Copy code
curl "<http://localhost:8108/multi_search?query_by=name>" \
        -X POST \
        -H "Content-Type: application/json" \
        -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" \
        -d '{
          "searches": [
            {
              "collection": "order",
              "filter_by": "customer.id: !=[<all of the ids from previous step>]"
            }
          ]
        }'
Using
multi_search
endpoint will not limit the size of your request.
r
yes, @Harpreet Sangar was a life-saver, thanks 😁
😄 1