We would like to able to search for exact text, and not have Lucene tokenise, remove stop words, or do any stemming.
We partly use Confluence as a knowledge base for our own software product, which includes lots of system codes, acrnoyms etc. The specific use case that prompted this was a user wanting to search for the text "S/D". Lucene strips off the 'S', and the '/', leaving the search to just look for 'd'. Not particularly useful.
It would be brilliant if we could enter a query somehow that overrode this.
Raised following support issue CSP-29584
We've implemented the functionality requested, but are awaiting a point where we can have a reindex performed as part of upgrading Confluence in the future. Until that point, we cannot turn the feature on by default. In the interim you can follow the below steps to enable the functionality in your instance.
You will need the following versions of Confluence
- Confluence 8.0.0+ to do exact searching on the titles of pages and blogs
- Confluence 8.6.0+ (not yet released at time of writing) to do exact searching on the content of pages and blogs
To enable the functionality, you will need to
- Be running the above listed versions of Confluence
- Enable the following dark feature in Confluence confluence.search.improvements.exact
- Rebuild the Search Index Note: This will need to be done again when crossing either the Confluence 8.0.0 or 8.6.0 line
- Run a search using "quotation marks" to indicate an exact search is desired
Be aware that this change will have an impact on the size of the index in your instance, and the time taken to index. From our testing, we saw a 10%-15% increase in both index size and time to index. This time will depend heavily on the shape of the data in your instance.