@@ -2293,7 +2293,7 @@ public DetailedResponse<DeleteDocumentResponse> DeleteDocument(string environmen
22932293 /// <param name="xWatsonLoggingOptOut">If `true`, queries are not stored in the Discovery **Logs** endpoint.
22942294 /// (optional, default to false)</param>
22952295 /// <returns><see cref="QueryResponse" />QueryResponse</returns>
2296- public DetailedResponse < QueryResponse > Query ( string environmentId , string collectionId , string collectionIds , string filter = null , string query = null , string naturalLanguageQuery = null , bool ? passages = null , string aggregation = null , long ? count = null , string _return = null , long ? offset = null , string sort = null , bool ? highlight = null , string passagesFields = null , long ? passagesCount = null , long ? passagesCharacters = null , bool ? deduplicate = null , string deduplicateField = null , bool ? similar = null , string similarDocumentIds = null , string similarFields = null , string bias = null , bool ? xWatsonLoggingOptOut = null )
2296+ public DetailedResponse < QueryResponse > Query ( string environmentId , string collectionId , string filter = null , string query = null , string naturalLanguageQuery = null , bool ? passages = null , string aggregation = null , long ? count = null , string _return = null , long ? offset = null , string sort = null , bool ? highlight = null , string passagesFields = null , long ? passagesCount = null , long ? passagesCharacters = null , bool ? deduplicate = null , string deduplicateField = null , string collectionIds = null , bool ? similar = null , string similarDocumentIds = null , string similarFields = null , string bias = null , bool ? xWatsonLoggingOptOut = null )
22972297 {
22982298 if ( string . IsNullOrEmpty ( environmentId ) )
22992299 {
@@ -2336,10 +2336,6 @@ public DetailedResponse<QueryResponse> Query(string environmentId, string collec
23362336 restRequest . WithHeader ( "Content-Type" , "application/json" ) ;
23372337
23382338 JObject bodyObject = new JObject ( ) ;
2339- if ( ! string . IsNullOrEmpty ( collectionIds ) )
2340- {
2341- bodyObject [ "collection_ids" ] = collectionIds ;
2342- }
23432339 if ( ! string . IsNullOrEmpty ( filter ) )
23442340 {
23452341 bodyObject [ "filter" ] = filter ;
@@ -2400,6 +2396,10 @@ public DetailedResponse<QueryResponse> Query(string environmentId, string collec
24002396 {
24012397 bodyObject [ "deduplicate.field" ] = deduplicateField ;
24022398 }
2399+ if ( ! string . IsNullOrEmpty ( collectionIds ) )
2400+ {
2401+ bodyObject [ "collection_ids" ] = collectionIds ;
2402+ }
24032403 if ( similar != null )
24042404 {
24052405 bodyObject [ "similar" ] = JToken . FromObject ( similar ) ;
@@ -2625,7 +2625,7 @@ public DetailedResponse<QueryNoticesResponse> QueryNotices(string environmentId,
26252625 /// <param name="xWatsonLoggingOptOut">If `true`, queries are not stored in the Discovery **Logs** endpoint.
26262626 /// (optional, default to false)</param>
26272627 /// <returns><see cref="QueryResponse" />QueryResponse</returns>
2628- public DetailedResponse < QueryResponse > FederatedQuery ( string environmentId , string collectionIds , string filter = null , string query = null , string naturalLanguageQuery = null , bool ? passages = null , string aggregation = null , long ? count = null , string _return = null , long ? offset = null , string sort = null , bool ? highlight = null , string passagesFields = null , long ? passagesCount = null , long ? passagesCharacters = null , bool ? deduplicate = null , string deduplicateField = null , bool ? similar = null , string similarDocumentIds = null , string similarFields = null , string bias = null , bool ? xWatsonLoggingOptOut = null )
2628+ public DetailedResponse < QueryResponse > FederatedQuery ( string environmentId , string filter = null , string query = null , string naturalLanguageQuery = null , bool ? passages = null , string aggregation = null , long ? count = null , string _return = null , long ? offset = null , string sort = null , bool ? highlight = null , string passagesFields = null , long ? passagesCount = null , long ? passagesCharacters = null , bool ? deduplicate = null , string deduplicateField = null , string collectionIds = null , bool ? similar = null , string similarDocumentIds = null , string similarFields = null , string bias = null , bool ? xWatsonLoggingOptOut = null )
26292629 {
26302630 if ( string . IsNullOrEmpty ( environmentId ) )
26312631 {
@@ -2660,10 +2660,6 @@ public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, stri
26602660 restRequest . WithHeader ( "Content-Type" , "application/json" ) ;
26612661
26622662 JObject bodyObject = new JObject ( ) ;
2663- if ( ! string . IsNullOrEmpty ( collectionIds ) )
2664- {
2665- bodyObject [ "collection_ids" ] = collectionIds ;
2666- }
26672663 if ( ! string . IsNullOrEmpty ( filter ) )
26682664 {
26692665 bodyObject [ "filter" ] = filter ;
@@ -2724,6 +2720,10 @@ public DetailedResponse<QueryResponse> FederatedQuery(string environmentId, stri
27242720 {
27252721 bodyObject [ "deduplicate.field" ] = deduplicateField ;
27262722 }
2723+ if ( ! string . IsNullOrEmpty ( collectionIds ) )
2724+ {
2725+ bodyObject [ "collection_ids" ] = collectionIds ;
2726+ }
27272727 if ( similar != null )
27282728 {
27292729 bodyObject [ "similar" ] = JToken . FromObject ( similar ) ;
0 commit comments