# Hugo Search index.json problem

**URL:** <https://discourse.gohugo.io/t/hugo-search-index-json-problem/41988>\
**Category:** support\
**Created:** [December 18, 2022, 9:43pm UTC](https://discourse.gohugo.io/t/hugo-search-index-json-problem/41988 "2022-12-18T21:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajdegar](https://avatars.discourse-cdn.com/v4/letter/a/3e96dc/32.png) [@Ajdegar](https://discourse.gohugo.io/u/Ajdegar)\
**Post date:** [December 18, 2022, 9:43pm UTC](https://discourse.gohugo.io/t/hugo-search-index-json-problem/41988/1 "2022-12-18T21:43:12Z")

</div>

this code doubles json entries, so search results are doubled.

Someone had the same problem?

```auto
{{- $.Scratch.Add "index" slice -}}
{{- range where site.RegularPages "Type" "in" site.Params.mainSections -}}
    {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "contents" .Plain "permalink" .Permalink) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

```
