# Using fulltext for searching for a field within a slice

**URL:** <https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064>\
**Category:** Developing with Prismic\
**Tags:** vuejs\
**Created:** [April 22, 2021, 3:26pm UTC](https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064 "2021-04-22T15:26:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jay](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@jay](https://community.prismic.io/u/jay)\
**Post date:** [April 22, 2021, 3:26pm UTC](https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064/1 "2021-04-22T15:26:58Z")

</div>

Hey all, I'm currently trying to implement fulltext search for our app that uses prismic. I'm trying to be able to use this code here:

`this.$prismic.Predicates.fulltext('my.article.body_content', keyWords)`

`body_content` is within a slice within my custom type, `article`. What's weird though is with the code above, I get a 400 from Prismic and I'm not sure why.

This is the format of my custom type, article.

`{ "Main": { "title": { "type": "StructuredText", "config": { "single": "heading1", "allowTargetBlank": true, "label": "Title" } }, "category": { "type": "Link", "config": { "select": "document", "customtypes": ["category"], "label": "Category" } }, "subcategory": { "type": "Link", "config": { "select": "document", "customtypes": ["subcategory"], "label": "Subcategory" } }, "user_type": { "type": "Select", "config": { "options": ["fiserv,", "worldpay"], "label": "User Type" } }, "uid": { "type": "UID", "config": { "label": "article", "placeholder": "article" } }, "body": { "type": "Slices", "fieldset": "Slice zone", "config": { "labels": { "quote": [{ "name": "section", "display": "section" }], "quote1": [{ "name": "quote", "display": "quote" }], "tip": [{ "name": "tip", "display": "tip" }] }, "choices": { "section": { "type": "Slice", "fieldset": "Section", "description": "A logical section for the article", "icon": "add_alert", "non-repeat": { "top_image": { "type": "Image", "config": { "constraint": {}, "thumbnails": [], "label": "top image" } }, "section_headline": { "type": "StructuredText", "config": { "single": "heading1, heading2, heading3, heading4, heading5, heading6", "label": "Section Headline" } }, "body_content": { "type": "StructuredText", "config": { "multi": "paragraph, preformatted, strong, em, hyperlink, image, embed, list-item, o-list-item, rtl", "allowTargetBlank": true, "label": "Body Content", "placeholder": "Fill This In" } }, "quote_title": { "type": "StructuredText", "config": { "single": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, rtl", "label": "quote title" } }, "quote_author": { "type": "StructuredText", "config": { "single": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, rtl", "label": "quote author" } } }, "repeat": { "image": { "type": "Image", "config": { "constraint": { "width": 300, "height": 200 }, "thumbnails": [], "label": "Image" } }, "tip_title": { "type": "StructuredText", "config": { "single": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, rtl", "label": "tip title" } }, "tip_description": { "type": "StructuredText", "config": { "single": "paragraph, preformatted, heading1, heading2, heading3, heading4, heading5, heading6, strong, em, hyperlink, image, embed, list-item, o-list-item, rtl", "label": "tip description" } } } }, "quote": { "type": "Slice", "fieldset": "Quote", "description": "A short quote", "icon": "add_alert", "non-repeat": { "quote_title": { "type": "StructuredText", "config": { "single": "heading1, heading2, heading3, heading4, heading5, heading6", "label": "Quote Title" } }, "quote_author": { "type": "StructuredText", "config": { "single": "heading1, heading2, heading3, heading4, heading5, heading6", "label": "Quote Author" } } }, "repeat": {}, "display": "list" }, "tip": { "type": "Slice", "fieldset": "Tip", "description": "Support tips and tricks", "icon": "settings", "display": "list", "non-repeat": {}, "repeat": { "tip_title": { "type": "StructuredText", "config": { "single": "heading1, heading2, heading3, heading4, heading5, heading6", "label": "Tip Title" } }, "tip_description": { "type": "StructuredText", "config": { "single": "heading1, heading2, heading3, heading4, heading5, heading6", "label": "Tip Description" } } } } } } } } }`

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [April 23, 2021, 1:41pm UTC](https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064/3 "2021-04-23T13:41:31Z")

</div>

Hello Jay,

Welcome to the Prismic forum.

I assume you need to query the whole document with the word "keyWords". For example:

`Prismic.Predicates.fulltext('document','keyWords')`

Give this a try and let me know.

Thanks,

Priyanka

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [May 3, 2021, 11:48am UTC](https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064/4 "2021-05-03T11:48:28Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 4:37pm UTC](https://community.prismic.io/t/using-fulltext-for-searching-for-a-field-within-a-slice/5064/5 "2021-12-09T16:37:18Z")

</div>


