Summary
Thank you for the detailed help! I finally am able to import my slack data into a local deployed mattermost service. But I can’t seem to search any post.
Steps to reproduce
I can’t send you the data. But I can give what I did exactly.
I first verified that there are posts in the system:
# Get list of channels
curl -H 'Authorization: Bearer 123' \
http://localhost:8065/api/v4/channels
# Get 3 messages from the channel
curl -H 'Authorization: Bearer 123' \
http://localhost:8065/api/v4/channels/{channel_id}/posts?per_page=3
# Search the same post with post search
curl --request POST \
--url http://localhost:8065/api/v4/teams/{team_id}/posts/search \
--header 'Accept: application/json' \
--header 'Authorization: Bearer 123' \
--header 'Content-Type: application/json' \
--data '{
"terms": "computer",
"per_page": 3
}'
Expected behavior
I should be able to find the post I just listed from the channel.
Observed behavior
Instead I observe:
{"order":[],"posts":{},"next_post_id":"","prev_post_id":"","first_inaccessible_post_time":0,"matches":null}
I don’t get any error message from mattermost in log or response. Also the empty results come back really fast.