LGF Database Conversion Hijinx 5

Charles Johnsonfollow me on twitter
Tue Mar 27, 2007 at 1:20 pm PDT • Views: 268

Some more books on my desk:

Most of the Blog Engine is now refactored to use MySQL. (Not on the live server; on the development server.) I saved what I thought would be the hardest part for last: the LGF search feature. But MySQL’s built-in search capabilities are not only much simpler to implement than the existing brute-force “scan every file looking for a match to a string” approach, the MySQL search will be much more powerful, and a lot faster.

For the database nerds, I’ve added FULLTEXT indexing to the entries and comments, so our new search module will be able to give you much more intuitive results, similar to a search engine such as Yahoo or Google. To get even more technical, we’ll have keyword-based “boolean” searches, where you can choose which words to include or exclude from the search.

For example, search for:

Osama bin Laden

…and you’ll find posts that contain any of those three words. A post that has the word “Osama” would show up, even if the other two words weren’t present.

But put a plus symbol in front of each word you want to include:

+Osama +bin +Laden

…and now the search will find posts that contain all three words.

The minus symbol does the opposite; it says, “don’t include this word” in the search.

Results can also be sorted by relevance, and you can even specify the relevance of a search keyword, by using the ‘>’ and ‘~’ operators. There are other boolean operators too, for wildcards and simple pattern matching, but that’s for another post. (If you can’t wait to find out the wonders that lie ahead, here’s the MySQL Reference Manual: Boolean Full-Text Searches.)

And speaking of “faster,” doing a FULLTEXT search through 3.6 million LGF comments for the term “+Osama +bin +Laden” returns 5,157 results.

And it takes 0.0259 seconds. That’s right. 3.6 million comments in two hundredths of a second.

I know, it’s a bit slow. I’m working to optimize it now. (I kid.)

UPDATE at 3/27/07 1:31:33 pm:

Oh, and I should mention, so no one gets the wrong idea — none of this incredible newness is actually live on the site yet. The whole house of cards is in final testing on the development server.

Advertisement

510 comments

^ back to top ^

Name:

Pass:

Register Forgot Your Password? Account Settings Re-send Confirmation (To log in, cookies must be enabled in your browser!)

Turn off ads by subscribing!
For about 33 cents a day, our subscription option turns off all advertisements at LGF!
Read more...


► LGF Headlines

  • Loading...

► Tweeted Articles

  • Loading...

► Tweeted Pages

  • Loading...

► Top 10 Comments

  • Loading...

► Bottom Comments

  • Loading...

► Recent Comments

  • Loading...

► Tools/Info

► LGF Hits

► Resources

► Never Forget

► Statistics

► Tag Cloud

► Contact

You must have Javascript enabled to use the contact form.
Your email:

Subject:

Message:


Messages may be published in our weblog, unless you request otherwise.
Tech Note:
Using the Contact Form

More Partners

Compare Electricity Prices in your area. Texas Electricity is deregulated; you have the right to choose Texas Electric Rates from among many Texas Electric Companies.

Don't panic right away.

TwitterFacebook
LGF Pages
Recent Pages

Daniel Ballard
Mayor Antonio Villaraigosa Screws Over L.A. With $100 Million Credit Bubble That Could Burst Once He Leaves Office - Los Angeles
43 minutes ago
Views: 38 • Comments: 0
Tweets: 0 • Rating: 0

Daniel Ballard
The All-About-Me Mayor: Antonio Villaraigosa's Frenetic Self-Promotion - Page 1 - News - Los Angeles
44 minutes ago
Views: 33 • Comments: 0
Tweets: 0 • Rating: 0

Aigle
Jodi Rudoren Enters the Scene: Tweets or Tea Leaves?
49 minutes ago
Views: 14 • Comments: 0
Tweets: 0 • Rating: 0

researchok
US 'Very Closely' Watching Syrian Chemical Weapons  | ajc.com
58 minutes ago
Views: 35 • Comments: 0
Tweets: 0 • Rating: 0

Channeling Confucius
Susan G. Komen for the Cure's Limited Impact
1 hour, 9 minutes ago
Views: 40 • Comments: 0
Tweets: 0 • Rating: 0

Bob Dillon
End of an Era: NASA Shuts Down Its Last Mainframe
1 hour, 27 minutes ago
Views: 45 • Comments: 1
Tweets: 0 • Rating: 2

Daniel Ballard
Villaraigosa Will Chair Democratic National Convention
1 hour, 38 minutes ago
Views: 48 • Comments: 1
Tweets: 0 • Rating: 2

Bob Dillon
Chemist Applies Google Software to Molecules
1 hour, 56 minutes ago
Views: 44 • Comments: 0
Tweets: 0 • Rating: 2

Daniel Ballard
Meme: What Photographers Actually Do
2 hours, 10 minutes ago
Views: 60 • Comments: 1
Tweets: 0 • Rating: 2

Aigle
New Online Newspaper in Israel
2 hours, 30 minutes ago
Views: 66 • Comments: 0
Tweets: 0 • Rating: 0

 Frank says:

Well, you know I've been here many times, and only certain hours of the day when I'm here am I asleep; the rest of the time I'm actually awake. -- I have a filler on a dat with zappa being interrogated by a couple of swedish fans/state officers(who knows)...in which they are arguing over the pornographic contents of his work. he tells them he has been spying on them, and claims that their porno industry is bigger than that of the US. it's pretty funny. btw-this is from thew '88 tour.