I need to extend REST API in java with Spring reaching to Marklogic database. I already have functionality using StructuredQueryBuilder and the search method from DocumentManagerImpl (package com.marklogic.client.impl), but the client expects highlighting fragments of answers matching the searched phrases in Polish language, including derivatives from the stems (there may be several keywords by which we search, but with the condition of joint occurrence in the result).
- How to extend the search query to Marklogic in the simplest way and using the Java API from Marklogic to obtain additional information about the location of the searched phrases in the returned objects in one query to the database?
- Should I put a custom dictionary for stemming in Marklogic? Are there any sources recommended by Marklogic where I can get dictionaries?