Vue Instant Search Attributes Not Fetching

laravel
attribute
vue-instantsearch

#1

Hello,

I’m using Vue Instant Search to display a list of results. However, any attribute other than “Title”, “Id” and “Image” won’t display. Here is a snipped of my Vue code:

<ais-hits> <template slot="item" slot-scope="{ item }"> <a :href="item.link"> <div class="row"> <div class="col-4"> <img :src="item.image" /> </div> <div class="col-8"> {{ item.type }} <b><ais-highlight :hit="item" attribute="title" /></b> </div> </div> </a> </template> </ais-hits>

If I inspect the Vue instance and look at the Hits object, the “Type” and “Link” attributes aren’t even shown here. If I inspect the data on algolia.com it shows the “Type” and “Link” attributes filled for each model.

I even explicitly added the fields in the Attributes to retrieve settings. Any idea why these attributes aren’t showing or even POST’ing to my Vue?


#2

Hi Vinny,

check if your item.link is has a value, if item.link is empty it will show undefined

I faced same issue i made sure my link has a value then it worked just fine.

just sharing my solution


#3

Hi, it turns out that I was checking it against an older set of records and not my new updated record set.