> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mastermindcms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SearchManagerServiceImpl

> Calling public service methods through the REST API: searchManagerServiceImpl

<ResponseField name="beanId" type="string">
  The Spring bean identifier containing the service being called.

  searchManagerServiceImpl
</ResponseField>

<ResponseField name="scope" type="string" default="PROTOTYPE">
  Bean scope. Use PROTOTYPE for service calls.
</ResponseField>

<ResponseField name="functionName" type="string">
  The public service method name shown in the signature below.
</ResponseField>

<ResponseField name="args" type="object[]">
  The method argument array. Each argument is passed as an object with index 0, 1, and so on; the value must match the Java parameter type.
</ResponseField>

## Headers

```http theme={null}
POST /api/v1/bean/request
Content-Type: application/json
Lang-Context: en
Site-Context: my-site
Authorization: Bearer <token>
```

Send `Lang-Context` and `Site-Context` with every request. For protected methods, send the JWT in the `Authorization` header as `Bearer <token>`.

**Access:** ADMIN. **Bearer Token:** conditional for USER/ADMIN.

* GUEST — unauthenticated users; only whitelist services are available.
* USER — authentication is required; methods with USER checks are available.
* ADMIN — full access to public methods of all services.
* If a method checks a role internally, GUEST may receive null.

## Methods

<ResponseField name="search" type="SearchResponse">
  | Argument       | Type                            | Description                 |
  | -------------- | ------------------------------- | --------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### search

  Example JSON request object:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "search",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="countAll" type="long">
  | Argument       | Type                            | Description                 |
  | -------------- | ------------------------------- | --------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### countAll

  Example JSON request object:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "countAll",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="logicalFilters" type="List<GroupFilter>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### logicalFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "logicalFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="rangeFilters" type="List<GroupFilter>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### rangeFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "rangeFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="simpleFilters" type="List<GroupFilter>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### simpleFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "simpleFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="numericFilters" type="List<GroupFilter>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### numericFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "numericFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="listFilters" type="List<GroupFilter>">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### listFilters

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listFilters",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="rangeFilterValues" type="List<GroupFilter>">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `filterId` | `String` | Passed through `args[0].0`. |

  ### rangeFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "rangeFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="listFilterValues" type="List<GroupFilter>">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `filterId` | `String` | Passed through `args[0].0`. |

  ### listFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="simpleFilterValues" type="List<GroupFilter>">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `filterId` | `String` | Passed through `args[0].0`. |

  ### simpleFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "simpleFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="numericFilterValues" type="List<GroupFilter>">
  | Argument   | Type     | Description                 |
  | ---------- | -------- | --------------------------- |
  | `filterId` | `String` | Passed through `args[0].0`. |

  ### numericFilterValues

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "numericFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="fieldFilterValues" type="List<GroupFilter>">
  | Argument       | Type                            | Description                 |
  | -------------- | ------------------------------- | --------------------------- |
  | `requestAsMap` | `LinkedHashMap<String, Object>` | Passed through `args[0].0`. |

  ### fieldFilterValues

  Example JSON request object:

  ```json theme={null}
  {
      "type":  "SellerSKU",
      "searchTerm":  "",
      "query":  {
                    "isPublishedForSale":  true
                },
      "ignoreRegexWrap":  [
                              "id",
                              "name",
                              "embeddedSku",
                              "productsRef",
                              "isPublishedForSale"
                          ],
      "offset":  0,
      "limit":  10,
      "visiblePages":  10,
      "page":  1,
      "sortName":  "createdDate",
      "sortDirection":  "DESC"
  }
  ```

  Request:

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "fieldFilterValues",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="listingFeatureFromAttribute" type="GroupFilter">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `filterId`    | `String` | Passed through `args[0].0`. |
  | `sellerSkuId` | `String` | Passed through `args[1].1`. |

  ### listingFeatureFromAttribute

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "listingFeatureFromAttribute",
    "args": [
      {
        "0": null,
        "1": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="doProcessSearchTerms" type="String[]">
  | Argument      | Type     | Description                 |
  | ------------- | -------- | --------------------------- |
  | `searchTerms` | `String` | Passed through `args[0].0`. |

  ### doProcessSearchTerms

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "doProcessSearchTerms",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="aiSearchKeywords" type="List<String>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `query`  | `String` | Passed through `args[0].0`. |

  ### aiSearchKeywords

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "aiSearchKeywords",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>

<ResponseField name="aiSearchIsActive" type="boolean">
  | Argument | Type | Description                            |
  | -------- | ---- | -------------------------------------- |
  | —        | —    | This method does not accept arguments. |

  ### aiSearchIsActive

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "aiSearchIsActive",
    "args": []
  }
  ```
</ResponseField>

<ResponseField name="parseSearchQuery" type="List<String>">
  | Argument | Type     | Description                 |
  | -------- | -------- | --------------------------- |
  | `query`  | `String` | Passed through `args[0].0`. |

  ### parseSearchQuery

  ```json theme={null}
  {
    "beanId": "searchManagerServiceImpl",
    "scope": "PROTOTYPE",
    "functionName": "parseSearchQuery",
    "args": [
      {
        "0": null
      }
    ]
  }
  ```
</ResponseField>
