oplik0/nodebb-plugin-meilisearch

Attribute `timestamp` is not filterable.

Closed this issue · 5 comments

I got an error on this:

Attribute `timestamp` is not filterable. This index does not have configured filterable attributes. 1:10 timestamp > 1684254060290

I saw this: https://laravel.com/docs/10.x/scout#configuring-filterable-data-for-meilisearch

Doesn't know if that help.

I think is because the advance serach has a value &timeFilter=newer&timeRange= After remove it, it works, but it means we lose this feature.

e.g:

https://turbo.lxsguatian.net/search?in=titlesposts&term=%E7%93%9C&matchWords=all&by=&categories=&searchChildren=false&hasTags=&replies=&repliesFilter=atleast&sortBy=relevance&sortDirection=desc&showAs=posts

doesn't work, but

https://turbo.lxsguatian.net/search?in=titlesposts&term=%E7%93%9C&matchWords=all&by=&categories=&searchChildren=false&hasTags=&replies=&repliesFilter=atleast&timeFilter=newer&timeRange=&sortBy=relevance&sortDirection=desc&showAs=posts

I use nginx to rewrite the URL, to remove &timeFilter and &timeRange=

location /search {
    if ($args ~* "(.*)timeFilter=[^&]*(?:&|$)(.*)") {
        set $args "$1$2";
    }

    if ($args ~* "(.*)timeRange=[^&]*(?:&|$)(.*)") {
        set $args "$1$2";
    }
    proxy_pass http://localhost:3000;
}

But it only shows the results after I refreash the page, don't know why.

https://turbo.lxsguatian.net/search?in=titlesposts&term=neo&matchWords=all&by=&categories=&searchChildren=false&hasTags=&replies=&repliesFilter=atleast&timeFilter=newer&timeRange=&sortBy=relevance&sortDirection=desc&showAs=posts
oplik0 commented

I'm assuming you're using Meilisearch >1.0? Currently the version of meilisearch node library this plugin is using is an older one and it seems the filterable attribute setting changed the name in newer versions.

I'll fix this soon - I'm not sure if I'll have time to test things today, so it might take until tomorrow or friday, but it should be done this week.

I'll just need to test things since there might've been some other breaking changes.

Yes, I tried the localhosted Meilisearch 1.1.x and also the cloud version 1.0.2 and 1.1.x. Both of them got the same timestamp error.

Attribute `timestamp` is not filterable. This index does not have configured filterable attributes. 1:10 timestamp > 1684254060290

But thanks for your help, if you want any help with tests, just let me know.

oplik0 commented

0.6.0 should now work with current Meilisearch versions (and NodeBB v3.0) - sorry for how long it took, I was just quite busy