I am getting the correct search results when a user searches for a keyword. I have set the pagination limit to 12 and the first 12 searches results are shown as expected.
If a search has more than 12 results pagination is included. Although when I click a pagination link the next results page is not displaying the correct results. It is displaying 100+ results as the results of the search, regardless.
Below I have included my code:
Search Form
{exp:low_search:form collection="test-collection" search_mode="keywords" result_page="search/index"}</pre>
<input placeholder="Search" type="text" name="keywords">
<input type="submit">
{/exp:low_search:form}
Search Results
{exp:low_search:results
query="{segment_2}"
channel="product_swatches"
paginate="bottom"
paginate_base="search"
limit="12"
}
<div class="swatch_listing">
<figure>
<img src="{product_image}" alt="{title}">
<figcaption>
<span>
{title}
</span>
</figcaption>
</figure>
</div>
{paginate}
<section id="pagination" class="clearfix">
<div class="pg_prev">
{if previous_page}
<a href="{auto_path}">« Previous</a>
{/if}
</div>
<div class="pg_list">
{pagination_links}
{page}
<a href="{pagination_url}"
class="page-{pagination_page_number}
{if current_page}active{/if}"
>
{pagination_page_number}
</a>
{/page}
{/pagination_links}
</div>
<div class="pg_next">
{if next_page}
<a href="{auto_path}">Next »</a>
{/if}
</div>
</section>
{/paginate}
{if low_search_no_results}
<p>There were no results for this search</p>
{/if}
{/exp:low_search:results}
low_search:results
tag to achannel:entries
tag, does the pagination work then?