search Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Recently we had a bug in one of our app where search was not able to find anything based on sub keywords or sub text. Lets say we have an article that has keyword "dedicated" in subject or body or in tags. Now if we try to search using keywords say | cat | cate | ted | dedi | dicat | dedi | then outcome was zero search results. This issue was due to the way indexing was done along with missing query configuration in Solr. We fixed the indexing and seaching configuration in solr/conf/schema.xml file. We added/edited following code
In ActiveAdmin, if your resource model is deriving some data from other models, using some kind of relationship(has_one or has_many). In this scenarios where you want to search and filter the resource based on the data in its related table, you can follow below: Suppose you have a model School, and a model Student, now you want to search or filter students based on the school name. We can filter using join(:schools).where("schools.name like") or say an In Query which is inefficient. Either way ActiveAdmin does not provide default filters based on