algolia / angular-instantsearch

⚡️Lightning-fast search for Angular apps, by Algolia
https://algolia.com/doc/deprecated/instantsearch/angular/v4/api-reference/instantsearch/
MIT License
261 stars 73 forks source link

Can't perform facet count, as no facet is set #820

Closed mohamednaleem closed 3 years ago

mohamednaleem commented 3 years ago

Hi,

When I tried to use ais-refinement-list in angular-12v I am getting the below error "Can't perform facet count, as no facet is set" even given the attribute name correctly.

<ais-instantsearch [config]="config">

<ais-refinement-list

attribute="title" operator="or" [limit]="10"

<ais-instantsearch [config]="config">

Please help me with how to solve this issue. Is this issue is for angular-12v

Haroenv commented 3 years ago

is the attribute "title" set up as attributeForFaceting in the dashboard?

mohamednaleem commented 3 years ago

Thanks for the reply, Actually I am using angular12 and not using the Algolia dashboard instead am fetching the data from the strapi headless cms database so using instantMeiliSearch

.html

<ais-instantsearch [config]="config">

<ais-refinement-list

attribute="title"

<ais-hits>
  <ng-template let-hits="hits">
    <p-carousel class="mp-carousel-list mp-carousel-padding" [value]=

"hits" [showNavigators]="true" [responsiveOptions]="responsiveOptions" [numVisible]="5" [numScroll]="5" [showIndicators]="false" [circular]="false">

.ts file import { environment } from 'src/environments/environment'; import { instantMeiliSearch } from ***@***.***/instant-meilisearch'; import { Curatedpick } from '../models/curated-picks'; const searchClient = instantMeiliSearch( 'http://localhost:7700', 'fs83kjsfs038e2o3usflsjfslhs', ) On Mon, Jul 12, 2021 at 2:00 PM Haroen Viaene ***@***.***> wrote: > is the attribute "title" set up as attributeForFaceting in the dashboard? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . >
Haroenv commented 3 years ago

Sorry, we don't support instantMeiliSearch, you can open an issue on their repository

Haroenv commented 3 years ago

FYI, this is a known issue on instant-meilisearch: https://github.com/meilisearch/instant-meilisearch#3-emove-attributes-from-facet-list

mohamednaleem commented 3 years ago

Thanks Algolia/Angular-Instantsearch,

I am following this link. Please refer this and help me what can I do. Here there is no any error.

https://codesandbox.io/s/im-angularis-7xipe?file=/src/app/app.component.ts:159-188

On Mon, Jul 12, 2021 at 4:27 PM Haroen Viaene @.***> wrote:

FYI, this is a known issue on instant-meilisearch: https://github.com/meilisearch/instant-meilisearch#3-emove-attributes-from-facet-list

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/algolia/angular-instantsearch/issues/820#issuecomment-878180504, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFMGKMPQ6CPVUWGVQNCHU7DTXLDBVANCNFSM5AEYZHXA .