How do I limit the number of results returned when I type in the searchbox
See original GitHub issueSorry just a dumb question,. Cause I’m torn between ais-refinement-list
and ais-results
and where to add them…
<ais-instant-search
:search-client="searchClient"
index-name="criminals"
>
<ais-search-box v-model="criminalsName" class="bg-grey-lightest border p-2 border-gray mr-4 h-10 w-full rounded-sm font-basic mt-2 mb-4 w-full" placeholder="Search criminals...">
</ais-search-box>
<ais-hits v-show="this.criminalsName.length > 0 ">
<template
slot="item"
slot-scope="{ item }"
>
<div id="searchresults" class="h-auto max-w-3xl mx-auto w-full">
<span class="p-4 border-b flex justify-between items-center group hover:bg-teal-100">
<a class="block flex-1 no-underline" href="#">
<ais-highlight
:hit="item"
attribute="full_name"
/>
<p class="font-bold text-sm text-indigo-600 hover:text-indigo-500">
<span class="mr-2 text-teal-500">Alias</span>
<ais-highlight
:hit="item"
attribute="alias"
/>
<span class="mr-2 text-teal-500">Contact Number</span>
<div>
<!-- <ais-results :limit="10"></ais-results> -->
<!-- <ais-refinement-list :limit="5"></ais-refinement-list> -->
</div>
<ais-highlight
:hit="item"
attribute="contact_number"
/>
</p>
</ais-highlight>
</a>
<a href="#">
<img class="hidden md:block h-16 border-none" src="https://www.tailwindtoolbox.com/components/searchy.gif">
</a>
</span>
</div>
</template>
</ais-hits>
</ais-instant-search>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Configure how many Search results are returned - MSOutlook ...
Disabling the search limit can be done in the Search Options section: File-> Options-> Search-> disable option: Improve search speed by limiting ...
Read more >Limit number of searchresults from a simple jQuery keyup ...
Better way would be to pass max parameter to your server side url that returns the search results so that it will only...
Read more >Using Limiters to Refine Your Search - EBSCO Connect
In the Find field, enter your search terms. · Select the limiters you want to use from the Limit Your Results section of...
Read more >Change settings for the Search Results Web Part
For example, when a user types the search term yellow in the Search Box, ... On the REFINERS tab, you can choose to...
Read more >Video: Narrow your search results - Microsoft Support
When you use a filter, the same SEARCH TOOLS tab appears on the ribbon as when you click in the Instant Search box....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can add hits per page either via the dashboard, or via a configure widget:
Hope that’s clear!
I could see your template was a little invalid, so here’s a version with those issues resolved @abrhambas01 https://codesandbox.io/s/smoosh-night-j7r1c