MeiliSearch - изменить лимит в 20 документов

Я новичок в MeiliSearch и пытаюсь настроить простую демонстрацию. Это очень похоже на эту официальную демонстрацию . Мне интересно, как я могу изменить умолчанию ограничение пов 20 документов в приложении?

1 ответ

Это можно сделать с помощью <ais-configure :hitsPerPage="50" />. Например:

      <div class="search-panel__results">
  <ais-search-box placeholder="Search here…" autofocus/>
  <ais-hits  :transform-items="transformItems">
    <template slot="item" slot-scope="{ item }">
      <ais-configure :hitsPerPage="50" />
      <div>
        <div class="hit-info">🏅 {{ item.year }}</div>
        <div class="hit-info">
          <ais-highlight :hit="item" attribute="firstname" />
          &nbsp;
          <ais-highlight :hit="item" attribute="surname" />
        </div>
        <div class="hit-info motivation">
          <ais-highlight :hit="item" attribute="motivation" />
        </div>
      </div>
    </template>
  </ais-hits>
  <ais-pagination />
</div>
Другие вопросы по тегам