In this approach we can create another resource called 'search' and we can handle all the search based operations from this resource. We can access to search service where the all queries located from the search model and we can manage search requests more efficiently and retrieve results more effectively. Then no need to append new search based methods to the search controller and all the validations and filtering can be done using search model.
This approach manipulate the database with the user's requests. Then we can have search history. For the storage issues we can run a rake task to remove records that older than one month or two.
For the testing purposes we can use usual controller tests and model tests. We can verify search results with the user experience using integration testing. There is nothing new and Its just rails basic structure. we can provide better solution for the current advanced search, by adding more options and filters for the user.
solr is highly reliable, scalable service. Since we deal with large number of text based information like research notes, wiki edits, Q & A etc, this library has rich tools to use publiclab search. when we execute all the search queries on top of rails platform, search will take significant time period to respond to the user. Yes we had long conversation about this about two months ago. My suggestions and proposed implementation plan can be found in my GSoC proposal.
If we use this library search queries are not performed top of the rails platform and We can execute wide range of search queries using this gem. And for the sorting.
Yes, with the current situations of the system this may not be a huge requirement, but if think for the long run, solr can help to the system in various ways.
Great, this is a fantastic comparison of options. I like the testing plan for the first one -- we could also unit test the search model really thoroughly. And I also like the idea of solr because it seems very performant.
But is there any option to hybridize, by making a search resource/model that wraps Solr? Just wondering.
Jeff
--
You received this message because you are subscribed to the Google Groups "plots-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plots-gsoc+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If it is what Ujitha meant, then I agree with David: #1 wrapping solr sounds like the best option!
I think that your plan is good, Ujitha. The search classes give is a chance to get the best of both worlds, and give us some flexibility in the future.
Just to explain a little further, I presented the options as I did based on my experience. Some organizations choose to go with a full third party search provider, and other like to develop their own. Each approach has strengths, but the full-third-party search approach is usually better for large, mature businesses that are typically slow to change--banks, large manufacturers, and government orgs typically fall into this category.
Public Lab is a more dynamic organization with some fast-changing systems and a good developer community, so we have the resources to do some of the dirty work ourselves.
Super. Did you happen to see the discussion David and I had in your recent pull request on writing some search tests to merge into publiclab/plots2 master beforehand, so that there's a clear, agreed upon API that both you and other contributors can stick to as your branch diverges?
I liked the idea that this would make it easier to merge your changes back in down the road, and help other students remain compliant with the API you're building for.
This is definitely true. Let's also keep in mind that writing good tests and maintaining clean and readable code and github issues can do a lot to grow a coding community, so let's invest in the future!
Thanks all!