diff --git a/frontends/api/src/generated/v1/api.ts b/frontends/api/src/generated/v1/api.ts index 6c13703ea6..baae59bae7 100644 --- a/frontends/api/src/generated/v1/api.ts +++ b/frontends/api/src/generated/v1/api.ts @@ -3622,12 +3622,6 @@ export interface PercolateQuerySubscriptionRequestRequest { * @memberof PercolateQuerySubscriptionRequestRequest */ dev_mode?: boolean | null - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof PercolateQuerySubscriptionRequestRequest - */ - use_dfs_query_then_fetch?: boolean | null /** * The id value for the learning resource * @type {Array} @@ -7144,7 +7138,6 @@ export const ContentFileSearchApiAxiosParamCreator = function ( * @param {Array} [run_id] The id value of the run that the content file belongs to * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -7162,7 +7155,6 @@ export const ContentFileSearchApiAxiosParamCreator = function ( run_id?: Array, sortby?: ContentFileSearchRetrieveSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, options: RawAxiosRequestConfig = {}, ): Promise => { const localVarPath = `/api/v1/content_file_search/` @@ -7233,11 +7225,6 @@ export const ContentFileSearchApiAxiosParamCreator = function ( localVarQueryParameter["topic"] = topic } - if (use_dfs_query_then_fetch !== undefined) { - localVarQueryParameter["use_dfs_query_then_fetch"] = - use_dfs_query_then_fetch - } - setSearchParams(localVarUrlObj, localVarQueryParameter) let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {} @@ -7279,7 +7266,6 @@ export const ContentFileSearchApiFp = function (configuration?: Configuration) { * @param {Array} [run_id] The id value of the run that the content file belongs to * @param {ContentFileSearchRetrieveSortbyEnum} [sortby] if the parameter starts with \'-\' the sort is in descending order * `id` - id * `-id` - -id * `resource_readable_id` - resource_readable_id * `-resource_readable_id` - -resource_readable_id * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -7297,7 +7283,6 @@ export const ContentFileSearchApiFp = function (configuration?: Configuration) { run_id?: Array, sortby?: ContentFileSearchRetrieveSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, options?: RawAxiosRequestConfig, ): Promise< ( @@ -7320,7 +7305,6 @@ export const ContentFileSearchApiFp = function (configuration?: Configuration) { run_id, sortby, topic, - use_dfs_query_then_fetch, options, ) const index = configuration?.serverIndex ?? 0 @@ -7376,7 +7360,6 @@ export const ContentFileSearchApiFactory = function ( requestParameters.run_id, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, options, ) .then((request) => request(axios, basePath)) @@ -7480,13 +7463,6 @@ export interface ContentFileSearchApiContentFileSearchRetrieveRequest { * @memberof ContentFileSearchApiContentFileSearchRetrieve */ readonly topic?: Array - - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof ContentFileSearchApiContentFileSearchRetrieve - */ - readonly use_dfs_query_then_fetch?: boolean | null } /** @@ -7523,7 +7499,6 @@ export class ContentFileSearchApi extends BaseAPI { requestParameters.run_id, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, options, ) .then((request) => request(this.axios, this.basePath)) @@ -12650,7 +12625,6 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12681,7 +12655,6 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}, ): Promise => { @@ -12802,11 +12775,6 @@ export const LearningResourcesSearchApiAxiosParamCreator = function ( localVarQueryParameter["topic"] = topic } - if (use_dfs_query_then_fetch !== undefined) { - localVarQueryParameter["use_dfs_query_then_fetch"] = - use_dfs_query_then_fetch - } - if (yearly_decay_percent !== undefined) { localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent } @@ -12866,7 +12834,6 @@ export const LearningResourcesSearchApiFp = function ( * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesSearchRetrieveSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -12897,7 +12864,6 @@ export const LearningResourcesSearchApiFp = function ( slop?: number | null, sortby?: LearningResourcesSearchRetrieveSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig, ): Promise< @@ -12933,7 +12899,6 @@ export const LearningResourcesSearchApiFp = function ( slop, sortby, topic, - use_dfs_query_then_fetch, yearly_decay_percent, options, ) @@ -13002,7 +12967,6 @@ export const LearningResourcesSearchApiFactory = function ( requestParameters.slop, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -13192,13 +13156,6 @@ export interface LearningResourcesSearchApiLearningResourcesSearchRetrieveReques */ readonly topic?: Array - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof LearningResourcesSearchApiLearningResourcesSearchRetrieve - */ - readonly use_dfs_query_then_fetch?: boolean | null - /** * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @type {number} @@ -13253,7 +13210,6 @@ export class LearningResourcesSearchApi extends BaseAPI { requestParameters.slop, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -13504,7 +13460,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13536,7 +13491,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}, ): Promise => { @@ -13661,11 +13615,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["topic"] = topic } - if (use_dfs_query_then_fetch !== undefined) { - localVarQueryParameter["use_dfs_query_then_fetch"] = - use_dfs_query_then_fetch - } - if (yearly_decay_percent !== undefined) { localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent } @@ -13712,7 +13661,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -13743,7 +13691,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options: RawAxiosRequestConfig = {}, ): Promise => { @@ -13864,11 +13811,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["topic"] = topic } - if (use_dfs_query_then_fetch !== undefined) { - localVarQueryParameter["use_dfs_query_then_fetch"] = - use_dfs_query_then_fetch - } - if (yearly_decay_percent !== undefined) { localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent } @@ -13916,7 +13858,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] * @param {*} [options] Override http request option. @@ -13949,7 +13890,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, options: RawAxiosRequestConfig = {}, @@ -14075,11 +14015,6 @@ export const LearningResourcesUserSubscriptionApiAxiosParamCreator = function ( localVarQueryParameter["topic"] = topic } - if (use_dfs_query_then_fetch !== undefined) { - localVarQueryParameter["use_dfs_query_then_fetch"] = - use_dfs_query_then_fetch - } - if (yearly_decay_percent !== undefined) { localVarQueryParameter["yearly_decay_percent"] = yearly_decay_percent } @@ -14198,7 +14133,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {LearningResourcesUserSubscriptionCheckListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {LearningResourcesUserSubscriptionCheckListSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14230,7 +14164,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( sortby?: LearningResourcesUserSubscriptionCheckListSortbyEnum, source_type?: LearningResourcesUserSubscriptionCheckListSourceTypeEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig, ): Promise< @@ -14267,7 +14200,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( sortby, source_type, topic, - use_dfs_query_then_fetch, yearly_decay_percent, options, ) @@ -14312,7 +14244,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {number | null} [slop] Allowed distance for phrase search * @param {LearningResourcesUserSubscriptionListSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -14343,7 +14274,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( slop?: number | null, sortby?: LearningResourcesUserSubscriptionListSortbyEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, options?: RawAxiosRequestConfig, ): Promise< @@ -14379,7 +14309,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( slop, sortby, topic, - use_dfs_query_then_fetch, yearly_decay_percent, options, ) @@ -14425,7 +14354,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( * @param {LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum} [sortby] If the parameter starts with \'-\' the sort is in descending order * `featured` - Featured * `id` - Object ID ascending * `-id` - Object ID descending * `readable_id` - Readable ID ascending * `-readable_id` - Readable ID descending * `last_modified` - Last Modified Date ascending * `-last_modified` - Last Modified Date descending * `new` - Newest resources first * `start_date` - Start Date ascending * `-start_date` - Start Date descending * `mitcoursenumber` - MIT course number ascending * `-mitcoursenumber` - MIT course number descending * `views` - Popularity ascending * `-views` - Popularity descending * `upcoming` - Next start date ascending * @param {LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum} [source_type] The subscription type * `search_subscription_type` - search_subscription_type * `channel_subscription_type` - channel_subscription_type * @param {Array} [topic] The topic name. To see a list of options go to api/v1/topics/ - * @param {boolean | null} [use_dfs_query_then_fetch] If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes * @param {number | null} [yearly_decay_percent] Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @param {PercolateQuerySubscriptionRequestRequest} [PercolateQuerySubscriptionRequestRequest] * @param {*} [options] Override http request option. @@ -14458,7 +14386,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( sortby?: LearningResourcesUserSubscriptionSubscribeCreateSortbyEnum, source_type?: LearningResourcesUserSubscriptionSubscribeCreateSourceTypeEnum, topic?: Array, - use_dfs_query_then_fetch?: boolean | null, yearly_decay_percent?: number | null, PercolateQuerySubscriptionRequestRequest?: PercolateQuerySubscriptionRequestRequest, options?: RawAxiosRequestConfig, @@ -14493,7 +14420,6 @@ export const LearningResourcesUserSubscriptionApiFp = function ( sortby, source_type, topic, - use_dfs_query_then_fetch, yearly_decay_percent, PercolateQuerySubscriptionRequestRequest, options, @@ -14595,7 +14521,6 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.sortby, requestParameters.source_type, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -14639,7 +14564,6 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.slop, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -14684,7 +14608,6 @@ export const LearningResourcesUserSubscriptionApiFactory = function ( requestParameters.sortby, requestParameters.source_type, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, requestParameters.PercolateQuerySubscriptionRequestRequest, options, @@ -14900,13 +14823,6 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly topic?: Array - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionCheckList - */ - readonly use_dfs_query_then_fetch?: boolean | null - /** * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @type {number} @@ -15096,13 +15012,6 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly topic?: Array - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionList - */ - readonly use_dfs_query_then_fetch?: boolean | null - /** * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @type {number} @@ -15299,13 +15208,6 @@ export interface LearningResourcesUserSubscriptionApiLearningResourcesUserSubscr */ readonly topic?: Array - /** - * If true sets search_type=dfs_query_then_fetch which makes Opensearchmake an extra pre-query to calculate term frequencies accross indexes - * @type {boolean} - * @memberof LearningResourcesUserSubscriptionApiLearningResourcesUserSubscriptionSubscribeCreate - */ - readonly use_dfs_query_then_fetch?: boolean | null - /** * Relevance score penalty percent per year for for resources without upcoming runs. Only affects results if there is a search term. * @type {number} @@ -15382,7 +15284,6 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.sortby, requestParameters.source_type, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -15428,7 +15329,6 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.slop, requestParameters.sortby, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, options, ) @@ -15475,7 +15375,6 @@ export class LearningResourcesUserSubscriptionApi extends BaseAPI { requestParameters.sortby, requestParameters.source_type, requestParameters.topic, - requestParameters.use_dfs_query_then_fetch, requestParameters.yearly_decay_percent, requestParameters.PercolateQuerySubscriptionRequestRequest, options, diff --git a/frontends/mit-learn/src/page-components/SearchDisplay/SearchDisplay.tsx b/frontends/mit-learn/src/page-components/SearchDisplay/SearchDisplay.tsx index 4943b9ae7f..7e0d8e8299 100644 --- a/frontends/mit-learn/src/page-components/SearchDisplay/SearchDisplay.tsx +++ b/frontends/mit-learn/src/page-components/SearchDisplay/SearchDisplay.tsx @@ -553,7 +553,6 @@ const SearchDisplay: React.FC = ({ max_incompleteness_penalty: searchParams.get( "max_incompleteness_penalty", ), - use_dfs_query_then_fetch: searchParams.get("use_dfs_query_then_fetch"), ...requestParams, aggregations: (facetNames || []).concat([ "resource_category", diff --git a/learning_resources_search/api.py b/learning_resources_search/api.py index f377f832c2..8826a6c3dd 100644 --- a/learning_resources_search/api.py +++ b/learning_resources_search/api.py @@ -595,7 +595,7 @@ def add_text_query_to_search(search, text, search_params, query_type_query): return search -def construct_search(search_params): # noqa: C901 +def construct_search(search_params): """ Construct a learning resources search based on the query @@ -623,7 +623,7 @@ def construct_search(search_params): # noqa: C901 search = Search(index=",".join(indexes)) search = search.source(fields={"excludes": SOURCE_EXCLUDED_FIELDS}) - + search = search.params(search_type="dfs_query_then_fetch") if search_params.get("offset"): search = search.extra(from_=search_params.get("offset")) @@ -669,9 +669,6 @@ def construct_search(search_params): # noqa: C901 if search_params.get("dev_mode"): search = search.extra(explain=True) - if search_params.get("use_dfs_query_then_fetch"): - search = search.params(search_type="dfs_query_then_fetch") - return search diff --git a/learning_resources_search/api_test.py b/learning_resources_search/api_test.py index 20e0ceb6f4..9450f73105 100644 --- a/learning_resources_search/api_test.py +++ b/learning_resources_search/api_test.py @@ -1436,6 +1436,7 @@ def test_execute_learn_search_for_learning_resource_query(opensearch): opensearch.conn.search.assert_called_once_with( body=query, index=["testindex_course_default"], + search_type="dfs_query_then_fetch", ) @@ -1893,6 +1894,7 @@ def test_execute_learn_search_with_script_score( opensearch.conn.search.assert_called_once_with( body=query, index=["testindex_course_default"], + search_type="dfs_query_then_fetch", ) @@ -2302,6 +2304,7 @@ def test_execute_learn_search_with_min_score(mocker, opensearch): opensearch.conn.search.assert_called_once_with( body=query, index=["testindex_course_default"], + search_type="dfs_query_then_fetch", ) @@ -2511,6 +2514,7 @@ def test_execute_learn_search_for_content_file_query(opensearch): opensearch.conn.search.assert_called_once_with( body=query, index=["testindex_course_default"], + search_type="dfs_query_then_fetch", ) diff --git a/learning_resources_search/serializers.py b/learning_resources_search/serializers.py index a26aa7eb52..070e5163cd 100644 --- a/learning_resources_search/serializers.py +++ b/learning_resources_search/serializers.py @@ -284,15 +284,6 @@ class SearchRequestSerializer(serializers.Serializer): default=False, help_text="If true return raw open search results with score explanations", ) - use_dfs_query_then_fetch = serializers.BooleanField( - required=False, - allow_null=True, - default=False, - help_text=( - "If true sets search_type=dfs_query_then_fetch which makes Opensearch" - "make an extra pre-query to calculate term frequencies accross indexes" - ), - ) def validate(self, attrs): unknown = set(self.initial_data) - set(self.fields) diff --git a/learning_resources_search/serializers_test.py b/learning_resources_search/serializers_test.py index 938d000f4b..f80a482c0f 100644 --- a/learning_resources_search/serializers_test.py +++ b/learning_resources_search/serializers_test.py @@ -942,7 +942,6 @@ def test_learning_resources_search_request_serializer(): "slop": 2, "min_score": 0, "max_incompleteness_penalty": 25, - "use_dfs_query_then_fetch": False, } cleaned = { @@ -969,7 +968,6 @@ def test_learning_resources_search_request_serializer(): "slop": 2, "min_score": 0, "max_incompleteness_penalty": 25, - "use_dfs_query_then_fetch": False, } serialized = LearningResourcesSearchRequestSerializer(data=data) @@ -1007,7 +1005,6 @@ def test_content_file_search_request_serializer(): "offered_by": ["xpro", "ocw"], "platform": ["xpro", "edx", "ocw"], "dev_mode": False, - "use_dfs_query_then_fetch": False, } serialized = ContentFileSearchRequestSerializer(data=data) diff --git a/openapi/specs/v1.yaml b/openapi/specs/v1.yaml index 58006cf66b..4d4a278a5e 100644 --- a/openapi/specs/v1.yaml +++ b/openapi/specs/v1.yaml @@ -303,14 +303,6 @@ paths: type: string minLength: 1 description: The topic name. To see a list of options go to api/v1/topics/ - - in: query - name: use_dfs_query_then_fetch - schema: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes tags: - content_file_search responses: @@ -2799,14 +2791,6 @@ paths: type: string minLength: 1 description: The topic name. To see a list of options go to api/v1/topics/ - - in: query - name: use_dfs_query_then_fetch - schema: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes - in: query name: yearly_decay_percent schema: @@ -3309,14 +3293,6 @@ paths: type: string minLength: 1 description: The topic name. To see a list of options go to api/v1/topics/ - - in: query - name: use_dfs_query_then_fetch - schema: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes - in: query name: yearly_decay_percent schema: @@ -3858,14 +3834,6 @@ paths: type: string minLength: 1 description: The topic name. To see a list of options go to api/v1/topics/ - - in: query - name: use_dfs_query_then_fetch - schema: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes - in: query name: yearly_decay_percent schema: @@ -4384,14 +4352,6 @@ paths: type: string minLength: 1 description: The topic name. To see a list of options go to api/v1/topics/ - - in: query - name: use_dfs_query_then_fetch - schema: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes - in: query name: yearly_decay_percent schema: @@ -10338,12 +10298,6 @@ components: nullable: true default: false description: If true return raw open search results with score explanations - use_dfs_query_then_fetch: - type: boolean - nullable: true - default: false - description: If true sets search_type=dfs_query_then_fetch which makes Opensearchmake - an extra pre-query to calculate term frequencies accross indexes id: type: array items: