-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filterableAttributes not set #319
Comments
Hello @jeremylynch @ellnix if you are around, I would love to have your help on this 😊 Do you know where it could come from? |
There are models with filterable_attributes set in the test suite and they seem to be behaving normally. There have been some changes to the settings logic but they are not included in v0.10.2.
This does not look like it was defined in the If that is not the case let me ask some follow up questions:
|
Apologies, in my original issue I had The issue was cause by simply deleting the index, and then attempting to reindex all the records (with |
I encountered the same issue:
Meilisearch definition: meilisearch enqueue: :sync_article_to_meilisearch do
searchable_attributes [:title, :description]
filterable_attributes [:id, :type]
attribute :type
attribute :title
attribute :created_at
attribute :description
attribute :published
end
def self.sync_article_to_meilisearch(article, remove)
if published && !remove
article.index!
else
Article.index.delete_document(article.id)
end
end Then I call Article.index.delete # Make sure the index does not exist
Article.reindex! The settings irb(main):004:0> Article.index.settings
=>
{"displayedAttributes"=>["*"],
"searchableAttributes"=>["*"],
"filterableAttributes"=>[],
"sortableAttributes"=>[],
"rankingRules"=>["words", "typo", "proximity", "attribute", "sort", "exactness"],
"stopWords"=>[],
"synonyms"=>{},
"distinctAttribute"=>nil,
"typoTolerance"=>{"enabled"=>true, "minWordSizeForTypos"=>{"oneTypo"=>5, "twoTypos"=>9}, "disableOnWords"=>[], "disableOnAttributes"=>[]},
"faceting"=>{"maxValuesPerFacet"=>100},
"pagination"=>{"maxTotalHits"=>1000}} |
We have recently upgraded to meilisearch 1.6.0, and are using meilisearch-rails 0.10.2.
We recently ran into an issue where we had to delete an index and then re-create it. However, after deleting the index, and then manually reindexing the model (
Offer.reindex
), we had an error forAttribute "manufacturer.name" is not filterable
.As shown below, the
filterable_attributes
are clearly defined under the model:To fix this, I had to manually execute the below:
Why would the
filterable_attributes
not have been automatically set when callingManufacturer.reindex!
? Is this gem compatible with Meilisearch 1.6 ?The text was updated successfully, but these errors were encountered: