We are searching for spaces based on user inputs using /rest/spacedirectory/1/search rest endpoint. But it seems it is having trouble with searching when there is space in the user inputs.
I have created 3 spaces with the title as ntr - advise, ntr - w and ntr - win. When I am trying to search using ntr, I am getting all the three spaces. But when I am trying to search ntr - w, I am only getting spaces ntr - advise and ntr - win. I have also used the encodeUriComponent method to encode the search term. But this does not help. Also used /rest/api/search with cql, getting the same results.
Please help me with how to get the proper spaces from the user inputs.
Hello @Santwana Sarangi {Appfire} !
As I understand, Confluence Space Search is not behaving as expected when used via REST API.
I would like to understand if Wildcards are involved in the search string itself. Is there any kind of wildcard combination being used?
One more thing that springs into my mind is when you said “proper spaces from the user inputs.”. What was meant by user inputs:
- Is it based on what the user does within Confluence?
- Is it based on what the user does within a specific macro?
- Is it based on what the user does within a specific page?
You can also take a look into our Developer documentation for REST and Search:
If you are aiming at Plugin development, our Developer Community is better suited to this kind of interaction:
Let us hear from you!
Who doesn’t love a good template? We sure do! Check out our top template picks for Marketing teams who want to streamline their processes, enhance collaboration, and take their marketing to new heights.
Read more 📚Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.