2 Replies Latest reply on Oct 11, 2016 1:46 PM by gopi.gorantala

    Rest API Search HELP!!!

    wyatts1 Novice

      Hello Jive,


      I need some serious help in understanding how to properly supply a parameter to the filter=search() call for searching contents. My mission is: Find all URL links to a specific place in Jive that are NOT in the @mention format but rather typed in by a user, and are now broken because the place has been moved, given a new name, or been deleted as a whole and a broken link exists out there somewhere.


      When I execute a theoretical search of "https://abc.edf.com/api/core/v3/search/contents?filter=search(https://abc.edf.com/technology/its)" it will return so much data, that it is completely irrelevant to what I need. It will retrieve thousands upon thousands of documents that contain any word that is supplied in the search parameter. For example, if there are 600 documents that contain the word technology, my results will include all 600 of those documents making it extremely difficult to locate documents containing an exact match to parameter that I have provided.


      How can I make my results more accurate? Also it states in your help site "One or more search terms, separated by commas. You must escape any of the following special characters embedded in the search terms: comma (","), backslash ("\"), left parenthesis ("("), and right parenthesis (")"), by preceding them with a backslash. Remember to URL encode any special character." What does this even mean..? Do I URL encode the preceding backslash too, do I URL encode every special character including the spaces, are those the only 3 special characters that need backslashes? I do this, and everything that is not a alphabetic character is treated as a search parameter delimiter. I thought the comma was the parameter delimiter, but everything else alphabetical, regardless of URL encoding, or providing preceding backslashes, everything is treated as a delimiter. I need to only find results of documents/contents that contain a string that EXACTLY matches what I provided. I've heard advice to surround my search in double quotes, and that brings in a whole other pile of irrelevant data. I've tried the Wild Card character and again returns a different set of irrelevant data. What do I need to do to only retrieve data that matches my parameter exactly? I've tried every combination/method of using double quotes, URL econding, supplying only parts of the string I need, and quite possibly any other magic tricks I could think of. Where can I find more help on this because the https://developers.jivesoftware.com/api/v3/8.0/rest/SearchService.html#searchContents(List<String>, List<String>, boolean, boolean, boolean, boolean, String, int, int, String, String) is of no assistance in this matter.