Search code examples
marklogic

Synonym search in MarkLogic


I am newbie to MarkLogic, I would like to achieve synonym search in app.

According to my understandings, MarkLogic has thesaurus feature to achieve this. On the other hand, there is semantic search that can also could be used in similar purpose based on triples. (i understands that an optional feature)

Could anyone advise me which to go?


Solution

  • In either case you will need to provide your own thesaurus data. The advantage of using MarkLogic's built-in thesaurus library is that the functions for query expansion into synonym queries is built-in.

    Using triples, you would need to write your own query expansion functions. Personally, I would only use triples if I already intended to have those triples in my database for other purposes, or if thesaurus entries will be frequently ingested in a triple format.

    You could also start with a triple-based thesaurus and transform the documents into MarkLogic's thesaurus schema to leverage an already-curated thesaurus and avoid writing your own expansion functions.