zsxking / OurBulletins

2 stars 1 forks source link

Implement search function #6

Closed zsxking closed 13 years ago

zsxking commented 13 years ago

The search function is long waited to work.

For current stage, use SearchLogic https://github.com/binarylogic/searchlogic seems to be a good fit.

zsxking commented 13 years ago

After some research, I put searchlogic out of play, because it is limited as name scope searching. We will better start with a full-text search function. Next 2 options to compare:

  1. PostgreSQL's build-in full-text search engine.
  2. IndexTank, as provided on Heroku for free for the first 100K documents.
zsxking commented 13 years ago

Did more research, database-based search is quite depending on the db engine and indexes. Making more indexes will use more space, and the free 5MB space cap on heroku may meet faster. Also it consumes the resource of the limit dynos on heroku, because the search engine on shared db will run slower than a dedicated search engine.

IndexTank's free plan provides 100k document. This should power us for some time. We will need some pay features from Heroku long before meeting the cap, IMO. Also removing indexes properly will make it go even longer.

So next is to work IndexTank into the system.

zsxking commented 13 years ago

The function has been implemented using the tanker gem.