Override Confluence/Jira quick search?

I would like to override Confluence/Jira search using my own logic, sorting and type of results returned... Any ideas how this could be designed?

I could probably leverage SearchPerformedEvent to listen for search events and then get the input from the "Quick Search" box and run my plugin code and redirect the user to another page where I am displaying the results. My only concern here is if Confluence is still going to search the index for the originated user search query and thus two searches to be performed... overwhelming the system?

What do you think?

EDIT:

...or looking at the class API there is a method getNumberOfResults which means this event is triggered after the the actual index search has been performed.

So do you guys know of a way to intercept the search before the index is searched?

1 answer

This widget could not be displayed.

Sorting the results can be done with a Lucene Booster, https://developer.atlassian.com/display/CONFDEV/Lucene+Boosting+Strategy+Module

You can also use the Extractor module to enhance page's searchable indexes. https://developer.atlassian.com/display/CONFDEV/Extractor+Modulewhich will let you update/insert the indexes based on content creation and updates.

Based on your comment I will assume you know about the Search API, https://developer.atlassian.com/display/CONFDEV/Searching+Using+the+V2+Search+API

If you truly want to implement your own search, and own it all, you need to tear out the built in search. Which means modifying the templates to remove the internal search fields, and supply your own.

https://confluence.atlassian.com/display/DOC/Setting+Up+Confluence+to+Index+External+Sites#SettingUpConfluencetoIndexExternalSites-ReplacingtheConfluencesearch

Hey @todor I'm not sure if you were able to make progress, but I see you upvoted my answer ( a good sign ?) If you're satisified be sure to mark the answer "correct" so other users looking for unanswered questions can help other users.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

547 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you