I'm using react instant search to show list of users in select options. I managed to show all the users in select option but **I want to only show users with admin role** (role === 'admin').

Ofcourse I can do this in client side by filtering the hits on role but is there
any way to achieve this with react instant search?

This is how I showed all user.

AlgoliaProvider.js

```js

import React from "react";
import algoliasearch from "algoliasearch/lite";
import { InstantSearch } from "react-instantsearch-dom";

const searchClient = algoliasearch(
  process.env.REACT_APP_ALGOLIA_APP_ID,
  process.env.REACT_APP_ALGOLIA_SEARCH_KEY
);

const AlgoliaProvider = ({ indexName, children, ...rest }) => {
  return (
    <InstantSearch indexName={indexName} searchClient={searchClient} {...rest}>
      {children}
    </InstantSearch>
  );
};

export default AlgoliaProvider;

```

AutoCompleteSelect.js

```js
import React from 'react';
import {  Select } from 'antd';
import { connectAutoComplete } from 'react-instantsearch-dom';

const { Option } = Select;

const AutoCompleteSelect = ({
  hits,
  refine,
  ...rest
}) => {
  const handleSuggestion = value => {
    refine(value);
  };

    return (
      <Select showSearch onSearch={handleSuggestion} {...rest}>
        {hits.map(user => (
          <Option
            key={user.uid}
            value={user.uid}
          >
            <span>{user.name}</span>
          </Option>
        ))}
      </Select>
    );

};

export default connectAutoComplete(AutoCompleteSelect);

```

App.js

```js
 <AlgoliaProvider indexName="User">             
   <AutoCompleteSelect placeholder="user search" />
 </AlgoliaProvider>

```