Google Sites API full-text search does not work for non-Western languages

I know how it feels when waiting for somebodies support to handle an API bug while your application is going to not met deadlines defined. The issue you described really sound like a bug, so for “clean” solution you will have to wait until Google Sites team guys will resolve this bug (I already upvoted … Read more

What is the meaning of O( polylog(n) )? In particular, how is polylog(n) defined?

Abuse of notation or not, polylog(n) does mean “some polynomial in log(n)”, just as “poly(n)” can mean “some polynomial in n”. So O(polylog(n)) means “O((log n)k) for some k”. (See Wikipedia: Polylogarithmic, or, to see it in context, Prof. Scott Aaronson’s blog: My Favorite Growth Rates.) The point is that just as we often don’t … Read more

Any reason not use PostgreSQL’s built-in full text search on Heroku?

Edit, 2016 — Why not both? If you’re interested in Postgres vs. Lucene, why not both? Check out the ZomboDB extension for Postgres, which integrates Elasticsearch as a first-class index type. Still a fairly early project but it looks really promising to me. https://github.com/zombodb/zombodb (Technically not available on Heroku, but still worth looking at.) Disclosure: I’m … Read more

How reliable is ElasticSearch as a primary datastore against factors like write loss, data availability

Short answer: it depends on your use case, but you probably don’t want to use it as a primary store. Longer answer: You should really understand all of the possible issues that can come up around resiliency and data loss. Elastic has some great documentation of these issues which you should really understand before using … Read more

MySQL match() against() – order by relevance and column?

This might give the increased relevance to the head part that you want. It won’t double it, but it might possibly good enough for your sake: SELECT pages.*, MATCH (head, body) AGAINST (‘some words’) AS relevance, MATCH (head) AGAINST (‘some words’) AS title_relevance FROM pages WHERE MATCH (head, body) AGAINST (‘some words’) ORDER BY title_relevance … Read more

Search for “whole word match” in MySQL

You can use REGEXP and the [[:<:]] and [[:>:]] word-boundary markers: SELECT * FROM table WHERE keywords REGEXP ‘[[:<:]]rid[[:>:]]’ Update for 2020: (actually 2018+) MySQL updated its RegExp-Engine in version 8.0.4, so you will now need to use the “standard” word boundary marker \b: SELECT * FROM table WHERE keywords REGEXP ‘\\brid\\b’ Also be aware … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)