diff --git a/gui/src/components/UserdataPage.js b/gui/src/components/UserdataPage.js
index b5f5d4f408297b1435464845110d5341d27375e4..1d5b87674666f0cf7477180c96d21c14012950a9 100644
--- a/gui/src/components/UserdataPage.js
+++ b/gui/src/components/UserdataPage.js
@@ -55,7 +55,7 @@ Once you assigned a DOI to a dataset, no entries can be removed or added to the
 function UserdataPage() {
   return <Search
     ownerTypes={['user', 'staging']}
-    initialQuery={{owner: 'user'}}
+    initialOwner="user"
     initialRequest={{order_by: 'upload_time', uploads_grouped: true}}
     initialResultTab="uploads"
     availableResultTabs={['uploads', 'datasets', 'entries']}
diff --git a/gui/src/components/search/Search.js b/gui/src/components/search/Search.js
index 5b06168b2d0383615ac7a5c4d47714ee6b796097..3ac55653cb2fe2e3f2173ac1670fc6942f75e702 100644
--- a/gui/src/components/search/Search.js
+++ b/gui/src/components/search/Search.js
@@ -4,8 +4,7 @@ import { makeStyles } from '@material-ui/core/styles'
 import { Card, Button, Tooltip, Tabs, Tab, Paper, FormControl,
   FormGroup, Checkbox, FormControlLabel, CardContent, IconButton, FormLabel, Select, MenuItem } from '@material-ui/core'
 import { useQueryParam, useQueryParams, StringParam, NumberParam } from 'use-query-params'
-// import SearchBar from './SearchBar'
-import SearchBar from './SearchBarNew'
+import SearchBar from './SearchBar'
 import EntryList from './EntryList'
 import DatasetList from './DatasetList'
 import { DisableOnLoading } from '../api'
diff --git a/gui/src/components/search/SearchBar.js b/gui/src/components/search/SearchBar.js
index 0e8a039d7ea0f2fb7345c4336b3e0bc94a46fe97..fb010c234f874c0e1ae2c419730ad0504364c807 100644
--- a/gui/src/components/search/SearchBar.js
+++ b/gui/src/components/search/SearchBar.js
@@ -1,336 +1,188 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import { withStyles } from '@material-ui/core/styles'
-/* eslint-disable-next-line */
-// import { domains } from '../domains' // TODO this causes a weird import bug
-import ChipInput from 'material-ui-chip-input'
-import Autosuggest from 'react-autosuggest'
-import match from 'autosuggest-highlight/match'
-import parse from 'autosuggest-highlight/parse'
-import Paper from '@material-ui/core/Paper'
-import MenuItem from '@material-ui/core/MenuItem'
-import { Chip, IconButton, Tooltip } from '@material-ui/core'
-import { nomadPrimaryColor } from '../../config'
-import { searchContext } from './SearchContext'
-import ClearIcon from '@material-ui/icons/Cancel'
-
-function renderInput(inputProps) {
-  const { classes, autoFocus, value, onChange, onAdd, onDelete, chips, ref, ...other } = inputProps
-
-  return (
-    <ChipInput
-      clearInputValueOnChange
-      onUpdateInput={onChange}
-      onAdd={onAdd}
-      onDelete={onDelete}
-      value={chips}
-      inputRef={ref}
-      chipRenderer={
-        ({ value, text, isFocused, isDisabled, handleClick, handleDelete, className }, key) => (
-          <Chip
-            key={key}
-            className={className}
-            style={{
-              pointerEvents: isDisabled ? 'none' : undefined,
-              backgroundColor: isFocused ? nomadPrimaryColor[500] : undefined,
-              color: isFocused ? 'white' : 'black'
-            }}
-            onClick={handleClick}
-            onDelete={handleDelete}
-            label={text}
-          />
-        )
-      }
-      {...other}
-    />
-  )
-}
-
-function renderSuggestion(suggestion, { query, isHighlighted }) {
-  const matches = match(getSuggestionValue(suggestion), query)
-  const parts = parse(getSuggestionValue(suggestion), matches)
-
-  return (
-    <MenuItem
-      selected={isHighlighted}
-      component='div'
-      onMouseDown={(e) => e.preventDefault()} // prevent the click causing the input to be blurred
-    >
-      <div>
-        {parts.map((part, index) => {
-          return part.highlight ? (
-            <span key={String(index)} style={{ fontWeight: 300 }}>
-              {part.text}
-            </span>
-          ) : (
-            <strong key={String(index)} style={{ fontWeight: 500 }}>
-              {part.text}
-            </strong>
-          )
-        })}
-      </div>
-    </MenuItem>
-  )
-}
-
-function renderSuggestionsContainer(options) {
-  const { containerProps, children } = options
-
-  return (
-    <Paper {...containerProps} square>
-      {children}
-    </Paper>
-  )
-}
-
-function getSuggestionValue(suggestion) {
-  return `${suggestion.key}=${suggestion.value}`
-}
-
-class SearchBar extends React.Component {
-  static propTypes = {
-    classes: PropTypes.object.isRequired
-  }
-
-  static styles = theme => ({
-    root: {
-      display: 'flex',
-      alignItems: 'flex-end'
-    },
-    clearButton: {
-      padding: theme.spacing(1)
-    },
-    autosuggestRoot: {
-      position: 'relative'
-    },
-    suggestionsContainerOpen: {
-      position: 'absolute',
-      zIndex: 100,
-      marginTop: theme.spacing(1),
-      left: 0,
-      right: 0
-    },
-    suggestion: {
-      display: 'block'
-    },
-    suggestionsList: {
-      margin: 0,
-      padding: 0,
-      listStyleType: 'none'
-    },
-    textField: {
-      width: '100%'
-    }
-  })
-
-  state = {
-    suggestions: [],
-    textFieldInput: ''
+import React, { useRef, useState, useContext, useCallback, useMemo } from 'react'
+import {searchContext} from './SearchContext'
+import Autocomplete from '@material-ui/lab/Autocomplete'
+import TextField from '@material-ui/core/TextField'
+import { CircularProgress } from '@material-ui/core'
+import * as searchQuantities from '../../searchQuantities.json'
+import { apiContext } from '../api'
+
+/**
+ * A few helper functions related to format and analyse suggested options
+ */
+const Options = {
+  split: (suggestion) => suggestion.split('='),
+  join: (quantity, value) => `${quantity}=${value}`,
+  splitForCompare: (suggestion) => {
+    const [quantity, value] = suggestion.split('=')
+    return [quantity ? quantity.toLowerCase() : '', value ? value.toLowerCase() : '']
   }
+}
 
-  getSuggestions(valueWithCase) {
-    const value = valueWithCase.toLowerCase()
-
-    const {statistics} = this.context.response
-    const suggestions = []
-
-    // filter out pseudo quantity total
-    const quantityKeys = Object.keys(statistics).filter(quantity => quantity !== 'total')
-
-    // put authors to the end
-    const authorIndex = quantityKeys.indexOf('authors')
-    if (authorIndex >= 0) {
-      quantityKeys[authorIndex] = quantityKeys.splice(quantityKeys.length - 1, 1, quantityKeys[authorIndex])[0]
-    }
-
-    quantityKeys.forEach(quantity => {
-      Object.keys(statistics[quantity]).forEach(quantityValue => {
-        const quantityValueLower = quantityValue.toLowerCase()
-        if (quantityValueLower.startsWith(value) || (quantity === 'authors' && quantityValueLower.includes(value))) {
-          suggestions.push({
-            key: quantity,
-            value: quantityValue
-          })
-        }
-      })
-    })
-
-    // Add additional quantities to the end
-    const { domain } = this.context
-    const reStr = `^(${Object.keys(domain.additionalSearchKeys).join('|')})=`
-    const additionalSearchKeyRE = new RegExp(reStr)
-    const match = value.match(additionalSearchKeyRE)
-    if (match && domain.additionalSearchKeys[match[1]]) {
-      suggestions.push({
-        key: match[1],
-        value: valueWithCase.substring(match[0].length)
-      })
+/**
+ * This searchbar component shows a searchbar with autocomplete functionality. The
+ * searchbar also includes a status line about the current results. It uses the
+ * search context to manipulate the current query and display results. It does its on
+ * API calls to provide autocomplete suggestion options.
+ */
+export default function SearchBar() {
+  const suggestionsTimerRef = useRef(null)
+  const {response: {statistics, pagination}, domain, query, setQuery} = useContext(searchContext)
+  const defaultOptions = useMemo(() => {
+    return Object.keys(searchQuantities)
+      .map(quantity => searchQuantities[quantity].name)
+      .filter(quantity => !quantity.includes('.') || quantity.startsWith(domain.key + '.'))
+  }, [domain.key])
+
+  const [open, setOpen] = useState(false)
+  const [options, setOptions] = useState(defaultOptions)
+  const [loading, setLoading] = useState(false)
+  const [inputValue, setInputValue] = useState('')
+
+  const {api} = useContext(apiContext)
+
+  const autocompleteValue = Object.keys(query).map(quantity => Options.join(quantity, query[quantity]))
+
+  let helperText = ''
+  if (pagination && statistics) {
+    if (pagination.total === 0) {
+      helperText = <span>There are no more entries matching your criteria.</span>
+    } else {
+      helperText = <span>
+        There {pagination.total === 1 ? 'is' : 'are'} {Object.keys(domain.searchMetrics).filter(key => statistics.total.all[key]).map(key => {
+          return <span key={key}>
+            {domain.searchMetrics[key].renderResultString(statistics.total.all[key])}
+          </span>
+        })}{Object.keys(query).length ? ' left' : ''}.
+      </span>
     }
-
-    // Always add as comment to the end of suggestions
-    suggestions.push({
-      key: 'comment',
-      value: value
-    })
-
-    return suggestions
   }
 
-  handleSuggestionsFetchRequested = ({ value }) => {
-    this.setState({
-      suggestions: this.getSuggestions(value)
-    })
-  };
-
-  handleSuggestionsClearRequested = () => {
-    this.setState({
-      suggestions: []
-    })
-  };
-
-  handleTextFieldInputChange = (event, { newValue }) => {
-    this.setState({
-      textFieldInput: newValue
+  const filterOptions = useCallback((options, params) => {
+    let [quantity, value] = Options.splitForCompare(params.inputValue)
+    const filteredOptions = options.filter(option => {
+      let [optionQuantity, optionValue] = Options.splitForCompare(option)
+      if (!value) {
+        return optionQuantity && (optionQuantity.includes(quantity) || optionQuantity === quantity)
+      } else {
+        return optionValue.includes(value) || optionValue === value
+      }
     })
-  }
+    return filteredOptions
+  }, [])
 
-  handleAddChip(chip) {
-    const values = {...this.context.query}
+  const loadOptions = useCallback((quantity, value) => {
+    const size = searchQuantities[quantity].statistic_size
 
-    let key, value
-    if (chip.includes('=')) {
-      const parts = chip.split(/=(.+)/)
-      key = parts[0]
-      value = parts[1]
-    } else {
-      const suggestion = this.getSuggestions(chip)[0]
-      key = suggestion.key
-      value = suggestion.value
+    if (suggestionsTimerRef.current !== null) {
+      clearTimeout(suggestionsTimerRef.current)
     }
-
-    if (values[key]) {
-      values[key] = key === 'atoms' ? [...values[key], value] : value
-    } else {
-      values[key] = key === 'atoms' ? [value] : value
-    }
-
-    this.setState({
-      textFieldInput: ''
-    })
-    this.context.setQuery(values, true)
-  }
-
-  handleBeforeAddChip(chip) {
-    const suggestions = this.getSuggestions(chip)
-    if (suggestions.length > 0) {
-      return true
-    } else {
-      return false
-    }
-  }
-
-  handleDeleteChip(chip) {
-    if (!chip) {
+    if (loading) {
       return
     }
-    const parts = chip.split('=')
-    const key = parts[0]
-
-    const {query, setQuery} = this.context
-    const values = {...query}
-    delete values[key]
-    setQuery(values, true)
-  }
-
-  handleClear() {
-    const {setQuery} = this.context
-    setQuery({}, true)
-  }
-
-  getChips() {
-    const {query: values} = this.context
-    return Object.keys(values).filter(key => values[key]).map(key => {
-      if (key === 'atoms') {
-        return `atoms=[${values[key].join(',')}]`
+    suggestionsTimerRef.current = setTimeout(() => {
+      setLoading(true)
+      api.suggestions_search(quantity, query, size ? null : value, size || 20, true)
+        .then(response => {
+          setLoading(false)
+          const options = response.suggestions.map(value => Options.join(quantity, value))
+          setOptions(options)
+          setOpen(true)
+        })
+        .catch(() => {
+          setLoading(false)
+        })
+    }, 200)
+  }, [api, suggestionsTimerRef])
+
+  const handleInputChange = useCallback((event, value, reason) => {
+    if (reason === 'input') {
+      setInputValue(value)
+      const [quantity, quantityValue] = Options.split(value)
+
+      if (searchQuantities[quantity]) {
+        loadOptions(quantity, quantityValue)
       } else {
-        let quantityLabel = key
-        return `${quantityLabel}=${values[key]}`
+        setOptions(defaultOptions)
       }
-    })
-  }
-
-  static contextType = searchContext
-
-  render() {
-    const {classes} = this.props
-    const {response: {pagination, statistics}, query, domain} = this.context
-
-    let helperText = ''
-    if (pagination && statistics) {
-      if (pagination.total === 0) {
-        helperText = <span>There are no more entries matching your criteria.</span>
+    }
+  }, [loadOptions])
+
+  const handleChange = (event, entries) => {
+    const newQuery = entries.reduce((query, entry) => {
+      if (entry) {
+        const [quantity, value] = Options.split(entry)
+        if (query[quantity]) {
+          if (searchQuantities[quantity].many) {
+            if (Array.isArray(query[quantity])) {
+              query[quantity].push(value)
+            } else {
+              query[quantity] = [query[quantity], value]
+            }
+          } else {
+            query[quantity] = value
+          }
+        } else {
+          query[quantity] = value
+        }
+      }
+      return query
+    }, {})
+    setQuery(newQuery, true)
+
+    if (entries.length !== 0) {
+      const entry = entries[entries.length - 1]
+      const [quantity, value] = Options.split(entry)
+      if (value) {
+        setInputValue('')
       } else {
-        helperText = <span>
-          There {pagination.total === 1 ? 'is' : 'are'} {Object.keys(domain.searchMetrics).filter(key => statistics.total.all[key]).map(key => {
-            return <span key={key}>
-              {domain.searchMetrics[key].renderResultString(statistics.total.all[key])}
-            </span>
-          })}{Object.keys(query).length ? ' left' : ''}.
-        </span>
+        setInputValue(`${entry}=`)
+        loadOptions(quantity)
       }
     }
-
-    const showClearButton = query && Object.keys(query).find(key => query[key] !== undefined)
-
-    return (
-      <div className={classes.root}>
-        <Autosuggest
-          theme={{
-            container: classes.autosuggestRoot,
-            suggestionsContainerOpen: classes.suggestionsContainerOpen,
-            suggestionsList: classes.suggestionsList,
-            suggestion: classes.suggestion
-          }}
-          renderInputComponent={renderInput}
-          suggestions={this.state.suggestions}
-          onSuggestionsFetchRequested={this.handleSuggestionsFetchRequested}
-          onSuggestionsClearRequested={this.handleSuggestionsClearRequested}
-          renderSuggestionsContainer={renderSuggestionsContainer}
-          getSuggestionValue={getSuggestionValue}
-          renderSuggestion={renderSuggestion}
-          onSuggestionSelected={(e, { suggestionValue }) => { this.handleAddChip(suggestionValue); e.preventDefault() }}
-          focusInputOnSuggestionClick={true}
-          inputProps={{
-            classes,
-            chips: this.getChips(),
-            onChange: this.handleTextFieldInputChange,
-            value: this.state.textFieldInput,
-            onAdd: (chip) => this.handleAddChip(chip),
-            onBeforeAdd: (chip) => this.handleBeforeAddChip(chip),
-            onDelete: (chip, index) => this.handleDeleteChip(chip, index),
-            // label: 'search',
-            fullWidth: true,
-            fullWidthInput: false,
-            InputLabelProps: {
-              shrink: true
-            },
-            placeholder: domain.searchPlaceholder,
-            helperText: helperText
-          }}
-        />
-        {showClearButton && (
-          <Tooltip title="Clear the search">
-            <IconButton
-              classes={{root: classes.clearButton}}
-              onClick={this.handleClear.bind(this)}
-            >
-              <ClearIcon />
-            </IconButton>
-          </Tooltip>
-        )}
-      </div>
-    )
   }
-}
 
-export default withStyles(SearchBar.styles)(SearchBar)
+  React.useEffect(() => {
+    if (!open) {
+      setOptions(defaultOptions)
+    }
+  }, [open])
+
+  return <Autocomplete
+    multiple
+    freeSolo
+    inputValue={inputValue}
+    value={autocompleteValue}
+    limitTags={4}
+    id='search-bar'
+    open={open}
+    onOpen={() => {
+      setOpen(true)
+    }}
+    onClose={() => {
+      setOpen(false)
+    }}
+    onChange={handleChange}
+    onInputChange={handleInputChange}
+    getOptionSelected={(option, value) => option === value}
+    options={options}
+    loading={loading}
+    filterOptions={filterOptions}
+    renderInput={(params) => (
+      <TextField
+        {...params}
+        helperText={helperText}
+        label='Search with quantity=value'
+        variant='outlined'
+        InputProps={{
+          ...params.InputProps,
+          endAdornment: (
+            <React.Fragment>
+              {loading ? <CircularProgress color='inherit' size={20} /> : null}
+              {params.InputProps.endAdornment}
+            </React.Fragment>
+          )
+        }}
+      />
+    )}
+  />
+}
diff --git a/gui/src/components/search/SearchBarNew.js b/gui/src/components/search/SearchBarNew.js
deleted file mode 100644
index d6c8055a1673ab6a670fd5f6e13ec6b0203dfe0c..0000000000000000000000000000000000000000
--- a/gui/src/components/search/SearchBarNew.js
+++ /dev/null
@@ -1,165 +0,0 @@
-import React, { useRef, useState, useContext, useCallback, useMemo } from 'react'
-import {searchContext} from './SearchContext'
-import Autocomplete from '@material-ui/lab/Autocomplete'
-import TextField from '@material-ui/core/TextField'
-import { CircularProgress } from '@material-ui/core'
-import * as searchQuantities from '../../searchQuantities.json'
-import { apiContext } from '../api'
-
-export default function SearchBar() {
-  const suggestionsTimerRef = useRef(null)
-  const {response: {statistics, pagination}, domain, query, setQuery} = useContext(searchContext)
-  const defaultOptions = useMemo(() => {
-    return Object.keys(searchQuantities)
-      .map(quantity => searchQuantities[quantity].name)
-      .filter(quantity => !quantity.includes('.') || quantity.startsWith(domain.key + '.'))
-  }, [domain.key])
-
-  const [open, setOpen] = useState(false)
-  const [options, setOptions] = useState(defaultOptions)
-  const [loading, setLoading] = useState(false)
-  const [inputValue, setInputValue] = useState('')
-
-  const {api} = useContext(apiContext)
-
-  const autocompleteValue = Object.keys(query).map(quantity => `${quantity}=${query[quantity]}`)
-
-  let helperText = ''
-  if (pagination && statistics) {
-    if (pagination.total === 0) {
-      helperText = <span>There are no more entries matching your criteria.</span>
-    } else {
-      helperText = <span>
-        There {pagination.total === 1 ? 'is' : 'are'} {Object.keys(domain.searchMetrics).filter(key => statistics.total.all[key]).map(key => {
-          return <span key={key}>
-            {domain.searchMetrics[key].renderResultString(statistics.total.all[key])}
-          </span>
-        })}{Object.keys(query).length ? ' left' : ''}.
-      </span>
-    }
-  }
-
-  const filterOptions = useCallback((options, params) => {
-    const [quantity, value] = params.inputValue.split('=')
-    const filteredOptions = options.filter(option => {
-      const [optionQuantity, optionValue] = option.split('=')
-      if (!value) {
-        return optionQuantity.includes(quantity) || optionQuantity === quantity
-      } else {
-        return optionValue.includes(value) || optionValue === value
-      }
-    })
-    return filteredOptions
-  }, [])
-
-  const loadOptions = useCallback((quantity, value) => {
-    if (suggestionsTimerRef.current !== null) {
-      clearTimeout(suggestionsTimerRef.current)
-    }
-    suggestionsTimerRef.current = setTimeout(() => {
-      setLoading(true)
-      api.suggestions_search(quantity, query, value, 20, true)
-        .then(response => {
-          setLoading(false)
-          const options = response.suggestions.map(value => `${quantity}=${value}`)
-          setOptions(options)
-          setOpen(true)
-        })
-        .catch(() => {
-          setLoading(false)
-        })
-    }, 200)
-  }, [api, suggestionsTimerRef])
-
-  const handleInputChange = useCallback((event, value, reason) => {
-    if (reason === 'input') {
-      setInputValue(value)
-      const [quantity, quantityValue] = value.split('=')
-
-      if (searchQuantities[quantity]) {
-        loadOptions(quantity, quantityValue)
-      } else {
-        setOptions(defaultOptions)
-      }
-    }
-  }, [loadOptions])
-
-  const handleChange = (event, entries) => {
-    const newQuery = entries.reduce((query, entry) => {
-      if (entry) {
-        const [quantity, value] = entry.split('=')
-        if (query[quantity]) {
-          if (searchQuantities[quantity].many) {
-            if (Array.isArray(query[quantity])) {
-              query[quantity].push(value)
-            } else {
-              query[quantity] = [query[quantity], value]
-            }
-          } else {
-            query[quantity] = value
-          }
-        } else {
-          query[quantity] = value
-        }
-      }
-      return query
-    }, {})
-    setQuery(newQuery, true)
-
-    if (entries.length !== 0) {
-      const entry = entries[entries.length - 1]
-      const [quantity, value] = entry.split('=')
-      if (value) {
-        setInputValue('')
-      } else {
-        setInputValue(`${entry}=`)
-        loadOptions(quantity)
-      }
-    }
-  }
-
-  React.useEffect(() => {
-    if (!open) {
-      setOptions(defaultOptions)
-    }
-  }, [open])
-
-  return <Autocomplete
-    multiple
-    freeSolo
-    inputValue={inputValue}
-    value={autocompleteValue}
-    limitTags={4}
-    id='search-bar'
-    open={open}
-    onOpen={() => {
-      setOpen(true)
-    }}
-    onClose={() => {
-      setOpen(false)
-    }}
-    onChange={handleChange}
-    onInputChange={handleInputChange}
-    getOptionSelected={(option, value) => option === value}
-    options={options}
-    loading={loading}
-    filterOptions={filterOptions}
-    renderInput={(params) => (
-      <TextField
-        {...params}
-        helperText={helperText}
-        label='Search with quantity=value'
-        variant='outlined'
-        InputProps={{
-          ...params.InputProps,
-          endAdornment: (
-            <React.Fragment>
-              {loading ? <CircularProgress color='inherit' size={20} /> : null}
-              {params.InputProps.endAdornment}
-            </React.Fragment>
-          )
-        }}
-      />
-    )}
-  />
-}
diff --git a/gui/src/components/search/SearchContext.js b/gui/src/components/search/SearchContext.js
index 262e286954fb15ac692880df0868449197a97c4c..1a26d6d31b5427f90772792d65871719dc3fd415 100644
--- a/gui/src/components/search/SearchContext.js
+++ b/gui/src/components/search/SearchContext.js
@@ -36,8 +36,8 @@ const useSearchUrlQuery = () => {
   const urlQuery = location.search ? {
     ...qs.parse(location.search.substring(1))
   } : {}
-  const searchQuery = objectFilter(urlQuery, key => searchQuantities[key])
-  const rest = objectFilter(urlQuery, key => !searchQuantities[key])
+  const searchQuery = objectFilter(urlQuery, key => searchQuantities[key] && key !== 'domain')
+  const rest = objectFilter(urlQuery, key => !searchQuantities[key] || key === 'domain')
   if (searchQuery.atoms && !Array.isArray(searchQuery.atoms)) {
     searchQuery.atoms = [searchQuery.atoms]
   }
diff --git a/gui/src/searchQuantities.json b/gui/src/searchQuantities.json
index c7d974cfa17c0dfb057efbc63ce13685da71ae80..bafb2fa2d5f8b61e1f5875eee3f515e300708eb5 100644
--- a/gui/src/searchQuantities.json
+++ b/gui/src/searchQuantities.json
@@ -2,164 +2,137 @@
   "ems.chemical": {
     "name": "ems.chemical",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.sample_constituents": {
     "name": "ems.sample_constituents",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.sample_microstructure": {
     "name": "ems.sample_microstructure",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.experiment_summary": {
     "name": "ems.experiment_summary",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.experiment_location": {
     "name": "ems.experiment_location",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.experiment_time": {
     "name": "ems.experiment_time",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.method": {
     "name": "ems.method",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.probing_method": {
     "name": "ems.probing_method",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.repository_name": {
     "name": "ems.repository_name",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.repository_url": {
     "name": "ems.repository_url",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.entry_repository_url": {
     "name": "ems.entry_repository_url",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.preview_url": {
     "name": "ems.preview_url",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.quantities": {
     "name": "ems.quantities",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "ems.group_hash": {
     "name": "ems.group_hash",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "labels.label": {
     "name": "labels.label",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "labels.type": {
     "name": "labels.type",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "labels.source": {
     "name": "labels.source",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.elements": {
     "name": "optimade.elements",
     "description": "Names of the different elements present in the structure.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.nelements": {
     "name": "optimade.nelements",
     "description": "Number of different elements in the structure as an integer.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.elements_ratios": {
     "name": "optimade.elements_ratios",
     "description": "Relative proportions of different elements in the structure.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.chemical_formula_descriptive": {
     "name": "optimade.chemical_formula_descriptive",
     "description": "The chemical formula for a structure as a string in a form chosen by the API\nimplementation.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.chemical_formula_reduced": {
     "name": "optimade.chemical_formula_reduced",
     "description": "The reduced chemical formula for a structure as a string with element symbols and\ninteger chemical proportion numbers. The proportion number MUST be omitted if it is 1.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.chemical_formula_hill": {
     "name": "optimade.chemical_formula_hill",
     "description": "The chemical formula for a structure in Hill form with element symbols followed by\ninteger chemical proportion numbers. The proportion number MUST be omitted if it is 1.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.chemical_formula_anonymous": {
     "name": "optimade.chemical_formula_anonymous",
     "description": "The anonymous formula is the chemical_formula_reduced, but where the elements are\ninstead first ordered by their chemical proportion number, and then, in order left to\nright, replaced by anonymous symbols A, B, C, ..., Z, Aa, Ba, ..., Za, Ab, Bb, ... and\nso on.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.dimension_types": {
     "name": "optimade.dimension_types",
     "description": "List of three integers. For each of the three directions indicated by the three lattice\nvectors (see property lattice_vectors). This list indicates if the direction is\nperiodic (value 1) or non-periodic (value 0). Note: the elements in this list each\nrefer to the direction of the corresponding entry in lattice_vectors and not\nthe Cartesian x, y, z directions.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.nsites": {
     "name": "optimade.nsites",
     "description": "An integer specifying the length of the cartesian_site_positions property.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "optimade.structure_features": {
     "name": "optimade.structure_features",
     "description": "A list of strings that flag which special features are used by the structure.\n\n- disorder: This flag MUST be present if any one entry in the species list has a\nchemical_symbols list that is longer than 1 element.\n- unknown_positions: This flag MUST be present if at least one component of the\ncartesian_site_positions list of lists has value null.\n- assemblies: This flag MUST be present if the assemblies list is present.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.basis_set": {
     "name": "dft.basis_set",
@@ -250,14 +223,12 @@
   "dft.spacegroup": {
     "name": "dft.spacegroup",
     "description": "The spacegroup of the simulated system as number.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.spacegroup_symbol": {
     "name": "dft.spacegroup_symbol",
     "description": "The spacegroup as international short symbol.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.code_name": {
     "name": "dft.code_name",
@@ -306,38 +277,32 @@
   "dft.code_version": {
     "name": "dft.code_version",
     "description": "The version of the used code.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.n_geometries": {
     "name": "dft.n_geometries",
     "description": "Number of unique geometries.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.n_calculations": {
     "name": "dft.n_calculations",
     "description": "Number of single configuration calculation sections",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.n_total_energies": {
     "name": "dft.n_total_energies",
     "description": "Number of total energy calculations",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.n_quantities": {
     "name": "dft.n_quantities",
     "description": "Number of metainfo quantities parsed from the entry.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.quantities": {
     "name": "dft.quantities",
     "description": "All quantities that are used by this entry.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "dft.searchable_quantities": {
     "name": "dft.searchable_quantities",
@@ -348,14 +313,12 @@
   "dft.geometries": {
     "name": "dft.geometries",
     "description": "Hashes for each simulated geometry",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "dft.group_hash": {
     "name": "dft.group_hash",
     "description": "Hashes that describe unique geometries simulated by this code run.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "dft.labels_springer_compound_class": {
     "name": "dft.labels_springer_compound_class",
@@ -372,128 +335,107 @@
   "upload_id": {
     "name": "upload_id",
     "description": "A random UUID that uniquely identifies the upload of the entry.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "calc_id": {
     "name": "calc_id",
     "description": "A unique ID based on the upload id and entry's mainfile.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "calc_hash": {
     "name": "calc_hash",
     "description": "A raw file content based checksum/hash.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "mainfile": {
     "name": "mainfile",
     "description": "Search within the mainfile path.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "mainfile_path": {
     "name": "mainfile_path",
     "description": "Search for the exact mainfile.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "path": {
     "name": "path",
     "description": "Search within the paths.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "files": {
     "name": "files",
     "description": "Search for exact paths.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "pid": {
     "name": "pid",
     "description": "The unique, sequentially enumerated, integer persistent identifier",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "raw_id": {
     "name": "raw_id",
     "description": "A raw format specific id that was acquired from the files of this entry",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "domain": {
     "name": "domain",
     "description": "The material science domain",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "published": {
     "name": "published",
     "description": "Indicates if the entry is published",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "processed": {
     "name": "processed",
     "description": "Indicates that the entry is successfully processed.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "last_processing": {
     "name": "last_processing",
     "description": "The datetime of the last attempted processing.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "nomad_version": {
     "name": "nomad_version",
     "description": "The NOMAD version used for the last processing attempt.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "nomad_commit": {
     "name": "nomad_commit",
     "description": "The NOMAD commit used for the last processing attempt.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "parser_name": {
     "name": "parser_name",
     "description": "The NOMAD parser used for the last processing attempt.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "comment": {
     "name": "comment",
     "description": "A user provided comment.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "references": {
     "name": "references",
     "description": "User provided references (URLs).",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "uploader.user_id": {
     "name": "uploader.user_id",
     "description": "The unique, persistent keycloak UUID",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "uploader.name": {
     "name": "uploader.name",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "uploader.email": {
     "name": "uploader.email",
     "description": null,
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "uploader": {
     "name": "uploader",
@@ -504,92 +446,77 @@
   "uploader_id": {
     "name": "uploader_id",
     "description": "The uploader of the entry",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "authors": {
     "name": "authors",
     "description": "Search authors with exact names.",
-    "many": true,
-    "statistic_size": 1000
+    "many": true
   },
   "owners": {
     "name": "owners",
     "description": "Search owner with exact names.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "with_embargo": {
     "name": "with_embargo",
     "description": "Indicated if this entry is under an embargo",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "upload_time": {
     "name": "upload_time",
     "description": "The datetime this entry was uploaded to nomad",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "upload_name": {
     "name": "upload_name",
     "description": "The user provided upload name",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "datasets.dataset_id": {
     "name": "datasets.dataset_id",
     "description": "The unique identifier for this dataset as a string. It should be\na randomly generated UUID, similar to other nomad ids.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "datasets.name": {
     "name": "datasets.name",
     "description": "The human readable name of the dataset as string. The dataset name must be\nunique for the user.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "datasets.doi": {
     "name": "datasets.doi",
     "description": "The optional Document Object Identifier (DOI) associated with this dataset.\nNomad can register DOIs that link back to the respective representation of\nthe dataset in the nomad UI. This quantity holds the string representation of\nthis DOI. There is only one per dataset. The DOI is just the DOI name, not its\nfull URL, e.g. \"10.17172/nomad/2019.10.29-1\".",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "datasets.created": {
     "name": "datasets.created",
     "description": "The date when the dataset was first created.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "datasets": {
     "name": "datasets",
     "description": "Search for a particular dataset by exact name.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "dataset_id": {
     "name": "dataset_id",
     "description": "Search for a particular dataset by its id.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "external_id": {
     "name": "external_id",
     "description": "A user provided external id.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "last_edit": {
     "name": "last_edit",
     "description": "The datetime the user metadata was edited last.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "formula": {
     "name": "formula",
     "description": "A (reduced) chemical formula.",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   },
   "atoms": {
     "name": "atoms",
@@ -600,13 +527,11 @@
   "only_atoms": {
     "name": "only_atoms",
     "description": "The atom labels concatenated in order-number order.",
-    "many": true,
-    "statistic_size": 10
+    "many": true
   },
   "n_atoms": {
     "name": "n_atoms",
     "description": "The number of atoms in the entry's material",
-    "many": false,
-    "statistic_size": 10
+    "many": false
   }
 }
diff --git a/nomad/app/api/repo.py b/nomad/app/api/repo.py
index cc18e6cb5b3d159d9fcdfcbdc92483ec3d3f75d2..0ea8e9b7de35ccb6db89d5b5e0cf4fcaf108312d 100644
--- a/nomad/app/api/repo.py
+++ b/nomad/app/api/repo.py
@@ -678,9 +678,11 @@ class RepoSuggestionsResource(Resource):
             abort(400, message='invalid size')
 
         try:
-            search_request.statistic(quantity, size=size, include=include)
+            search_request.statistic(quantity, size=size, include=include, order=dict(_key='desc'))
             results = search_request.execute()
-            results['suggestions'] = list(results['statistics'][quantity].keys())
+            values = results['statistics'][quantity]
+            results['suggestions'] = sorted(
+                values.keys(), key=lambda value: values[value]['code_runs'], reverse=True)
 
             return results, 200
         except KeyError as e:
diff --git a/nomad/datamodel/datamodel.py b/nomad/datamodel/datamodel.py
index 6f196d8ec74663170d3ce3ee25e33afd24756685..c6eea77205aa1e8c53bca8dba9ca8e49578939ab 100644
--- a/nomad/datamodel/datamodel.py
+++ b/nomad/datamodel/datamodel.py
@@ -369,7 +369,7 @@ class EntryMetadata(metainfo.MSection):
         a_search=Search(
             description='Search authors with exact names.',
             metric='cardinality',
-            many_or='append', search_field='authors.name.keyword', statistic_size=1000))
+            many_or='append', search_field='authors.name.keyword'))
 
     shared_with = metainfo.Quantity(
         type=user_reference, shape=['0..*'], default=[], categories=[MongoMetadata, EditableUserMetadata],
diff --git a/nomad/metainfo/search_extension.py b/nomad/metainfo/search_extension.py
index ce95ea1dc2b57f5a8782d6c550b756f22c6275e9..414df9417de9fa9d78d13a3a447f3cfb0a4c9c31 100644
--- a/nomad/metainfo/search_extension.py
+++ b/nomad/metainfo/search_extension.py
@@ -82,7 +82,7 @@ class Search(Elastic):
             many_and: str = None, many_or: str = None,
             order_default: bool = False,
             group: str = None, metric: str = None, metric_name: str = None,
-            statistic_size: int = 10,
+            statistic_size: int = None,
             statistic_order: str = '_key',
             statistic_values: List[str] = None,
             derived: Callable[[Any], Any] = None,
@@ -99,7 +99,9 @@ class Search(Elastic):
         self.group = group
         self.metric = metric
         self.metric_name = metric_name
-        self.statistic_size = statistic_size
+
+        self.statistic_fixed_size = statistic_size
+        self.statistic_size = statistic_size if statistic_size is not None else 20
         self.statistic_order = statistic_order
         self.statistic_values = statistic_values
         self.search_field = search_field
@@ -190,3 +192,4 @@ class Search(Elastic):
         self._statistic_values = values
         if self._statistic_values is not None:
             self.statistic_size = len(self._statistic_values)
+            self.statistic_fixed_size = len(self._statistic_values)
diff --git a/nomad/search.py b/nomad/search.py
index 51c827ae18b06c7c7798cc3d610d7ea465e3917e..718f8de85436094b28daab9fa3e71133df66b98e 100644
--- a/nomad/search.py
+++ b/nomad/search.py
@@ -683,8 +683,8 @@ if __name__ == '__main__':
             'many': search_quantity.many,
         }
 
-        if search_quantity.statistic_size > 0:
-            result['statistic_size'] = search_quantity.statistic_size
+        if search_quantity.statistic_fixed_size is not None:
+            result['statistic_size'] = search_quantity.statistic_fixed_size
         if search_quantity.statistic_values is not None:
             result['statistic_values'] = search_quantity.statistic_values