I've posted across in the Developer community forum. You can see the question here: https://community.developer.atlassian.com/t/incorrect-usage-of-jira-lucene-search-api-for-searchservice-search-in-jira-server-8-0-0-m0021-eap07/25266
And looks fix based on the next comment
Since my app is executing in a parallel thread, I could not use JiraThreadLocalUtil since that was cleaning all threads that are executing - provoking errors in other Jira modules, like attachment, activity log,…
JiraThreadLocalUtil
My solution was to start searcher context manually for my thread before calling searchProvider (or searchService)
<span>try</span> { ThreadLocalSearcherCache.startSearcherContext(); <span>return</span> searchProvider.getHitCount(searchQuery); } <span>finally</span> { ThreadLocalSearcherCache.stopAndCloseSearcherContext(); }
Regards,Dusan
It looks like you're new here. Sign in or register to get started.