PurposeThis paper aims to propose an incremental graph indexing method based on probabilistic inferences in Bayesian network (BN) for approximate nearest neighbor search (ANNS) that adds unindexed queries into the graph index incrementally.Design/methodology/approachThis paper first uses the attention mechanism based graph convolutional network to embed a social network into the low-dimensional vector space, which could improve the efficiency of graph index construction. To add the unindexed queries into the graph index incrementally, this study proposes to learn the rule-based BN from social interactions. Thus, the dependency relations of unindexed queries and their neighbors are represented, and the probabilistic inferences in BN are then performed.FindingsExperimental results demonstrate that the proposed method improves the search precision by at least 5% and search efficiency by 10% compared to the state-of-the-art methods.Originality/valueThis paper proposes a novel method to construct the incremental graph index based on probabilistic inferences in BN, such that both indexed and unindexed queries in ANNS could be addressed efficiently.