How to use my own search engine?

Last modified by Vincent Massol on 2015/10/20

Imagine you wish to replace XWiki's Solr engine by your own search engine. How would you do that?

First, XWiki doesn't provide a common Search API that would work across all Search engines because that's terribly complex to do (AFAIK there's no existing Java framework claiming to be the "Hibernate of Search"!).

Thus, you should consider the Solr Search API to be XWiki's search API and you should create a bridge between the Solr Search Syntax and your engine's syntax.

Namely you'll need to:

  • Overwrite SolrQueryExecutor: this is the component that executes the search request; it can take the Solr query syntax and parameters and execute them on a different engine.
  • Overwrite SolrIndexScriptService in order to interact with the new index.

Get Connected