I am working on a Ruby on Rails project, which uses Google Books API. I managed to implement a pagination with will_paginate gem, but I have a small problem. Google always returns different value of totalItems, which is quite confusing, because I am using it to evaluate the total number of pages.
After researching I have found that this is not a bug.
So my question is maybe are there other ways to implement pagination or to evaluate total number of pages?
Related
Was wondering if there are some markups in schema.org for a search results page which Google currently honors .. I was trying
ItemList (http://schema.org/ItemList)
and
AggregateOffer (http://schema.org/AggregateOffer),
but none of them seems to be coming up on Google yet (as in they still dont support it or show up that markup on the search page). Are there any other markups I can try ?
Thank you :)
Search for a restaurant, place, or product and you'll see microformats that google recognizes and uses to format its search results. Yelp reviews all also have a price range. They are used widely. I am pretty sure they use the Places stuff widely as well, and believe I have seen cases of books having author name and so on displayed.
But...
How they are used, in what cases, for what sites, and for what queries google decides to use this information is entirely up to the search engine.
Within weeks of announcements about microformats for product ratings, sites entirely unrelated to the topic were adding microformats having product rating information, so think of them as a hint that Google (and other SE's) might use in some cases when they are confident that it's accurate and helpful.
It might just take time for Google to trust your site.
i have a website where people can leave comments on some articles. \
what i would like to do is to post those answers on my tweeter page.
is there a way?
thanks
edit1:
i've looked around but i am new at this and i was wondering if anyone has an starter example for me
Yes there is a way to do this programmatically, but it depends on the language you plan to use.
Also be warned that if your users leave a lot of comments, you will end up with a lot of tweets. This will most likely hit twitter's update limit (1000 per day, further broken down into a number they don't disclose). Also if you include links you might get reported as spam.
maybe php, or java script
With php, I recommend you look into twitteroauth. JavaScript might get tricky depending on if it's a browser extension, Adobe Air application, or simple JavaScript on a page.
I have spent some time looking for a rail3 blog engine for use on an existing site. I want the blog on the same domain as the application for SEO points eg www.site.com/blog not blog.site.com
Having spent some time on this I have found:
Toto
Jekyll.
Which generate static pages, I really like this idea as its optimal under-load as its highly cached. Not sure how our not technical blog writers will cope with this.
Also I looked at more dynamic platforms like:
typo (which seams dated, I guess they are finding it hard to port to rails 3)
mephisto
Are people giving up on this as this post Need to link WP Blog with Rails App on Heroku suggests? Seams crazy given the value of this. Also, this post was good but not really conclusive for me https://stackoverflow.com/questions/1807670/blog-engine-for-rails-application.
I've been really impressed by monologue, so far.
https://github.com/jipiboily/monologue
It's a bare-bones db-backed blog engine.
One of the creators of heroku wrote a small blog engine.
https://github.com/adamwiggins/scanty
wondering if anyone has heard of a way to filter Twitter search results to the users 'following' list? I'd like to do a search for pics that people I follow have posted. The pics part is fairly trivial (search for image URLs) but I'm guessing that a user-filtered search is beyond the API, even with oAuth.
I've seen a couple of services like snapbird.org that advertise this feature (even though they don't seem to work well), any guesses as to how they go about this?
Thanks!
You can implement this specific image search easily with the help of jetwick.com available as open source here: https://github.com/karussell/Jetwick
Currently searching in your friends is possible but adding yet another filter isn't that hard. Patches are welcome ;)
I’m evaluating full text search methods for Rails 3 ATM. Does anyone here have a recommendation? Seems to me as if most of the known methods (Sunspot, Sphinx, Ferret, Xapian) aren’t yet ready for Rails 3. Is that so? At the moment I’ve got plenty of resources left on the machine were I’d like to deploy my app but nevertheless, I’d like to keep the idle load for the search engine as low as possible. I’m planning to use PostgreSQL if that’s of any relevance here.
After some reading I’m almost sure that I’d like to use Sunspot or Xapian. But if there’s any other (and better) solution please tell me :-) Especially regarding Sunspot I’m not sure if it was clever to have a complete Tomcat running in addition to my Rails app. Anyone has experience with this constellation?
Thanks in advance,
Ulf
If you are using PostgreSQL you can get an awful lot out of its built-in text search capabilities before you need to reach for external libraries. I've been using tsearch queries for years with excellent results.
PostgreSQL full text search analyses word proximity to calculate Relevance & ranking and offers useful features like highlighting of search results.
It is also aware of language specific normalisation rules, for example it knows to ignore the s and es pluralization suffixes in English; so searches for 'country' will also bring back highlighted results for 'countries', much the same way that Google does.
I'm not suggesting that you shouldn't use the libraries that you've mentioned, but it is worth investigating the database to see if will already fulfil the majority, if not all of your requirements.
You can use sunspot with Rails3, no problem. We have done so successfully using the sunspot/sunspot_rails gems (1.2.rc4). And it's not too much of a hassle to run Solr within a Tomcat server.
For fulltext-search features you should use a search engine.
For example you could use the Lucene Library with jRuby.
If you like to stay with standard Ruby (cRuby) you coud use Solr.
For rails there are also some Solr plugins:
For example starting with http://wiki.apache.org/solr/SolRuby could be a good idea.
Sunspot is Rails3 ready, we're using it on a few Rails3 apps already. I've had a lot of success with Solr and Sunspot. So much that we're starting a blog series on it