Search personalization aims to tailor search results to each specific userbased on the user's personal interests and preferences (i.e., the userprofile). Recent research approaches to search personalization by modelling thepotential 3-way relationship between the submitted query, the user and thesearch results (i.e., documents). That relationship is then used to personalizethe search results to that user. In this paper, we introduce a novel embeddingmodel based on capsule network, which recently is a breakthrough in deeplearning, to model the 3-way relationships for search personalization. In themodel, each user (submitted query or returned document) is embedded by a vectorin the same vector space. The 3-way relationship is described as a triple of(query, user, document) which is then modeled as a 3-column matrix containingthe three embedding vectors. After that, the 3-column matrix is fed into a deeplearning architecture to re-rank the search results returned by a basis ranker.Experimental results on query logs from a commercial web search engine showthat our model achieves better performances than the basis ranker as well asstrong search personalization baselines.