1 Reply Latest reply on Aug 21, 2016 10:46 PM by matt.hill

    OSAPI Search query issue

    Raj Vachhani Beginner

      Hi Folks,

          Can anyone help me to identify why my #1 javascript search works and #2 does not render any data? Only the type and subtypes are changed.

       

      1) This works fine for me.

       

      var searchQ = { "search": query, "subjectonly": false, "count": count, "type": "message", "place": "/places/" + placeID, "depth": searchDepth };

      osapi.jive.corev3.contents.search(searchQ).execute(function (data) {......

       

       

       

      2)However, below search pattern returns no records when I change my type parameter to discussion. Any idea on what else I am missing?

       

      var searchQ = {"search":query,"subjectonly":false,"count":count,"type":"discussion","subtype":"question", "place":"/places/" + placeID,"depth":searchDepth};

      osapi.jive.corev3.contents.search(searchQ).execute(function (data) {......

       

      Thanks,

      Raj

        • Re: OSAPI Search query issue
          Intermediate

          Hi Raj,

           

          If you can post the actual requests and responses instead of the code, that might allow for additional insight. Without that, my best guess would be that there aren't any question discussions in whatever place is identified by placeID.

           

          Also, which version of Jive is this in reference to? I tried this against a cloud version with this link:

          <my_cloud_instance>/api/core/v3/search/contents?depth=none&fields=id,question,resources.self&filter=search(test)&filter=type(discussion)&filter=subtype(question)

          and I received back a number of discussions, all of which had the "question" json property set to true.