Mickey Shine
Mickey Shine

Reputation: 12559

What's the algorithm for faceted search?

faceted search is often seen nowadays, but what's its algorithm, how does it do a faceted search so fast among large datasets?

I am going to implement a faceted search by myself so any tips or clues are welcome

Upvotes: 2

Views: 2483

Answers (2)

mmcconnell1618
mmcconnell1618

Reputation: 26

A quick Google Scholar search for "Faceted Search" should turn up some research papers by the Endeca guys.

http://scholar.google.com/scholar?q=faceted+search&hl=en&btnG=Search&as_sdt=1%2C47&as_sdtp=on

Upvotes: 0

Not_a_Golfer
Not_a_Golfer

Reputation: 49265

In short: You create several indexes, e.g. one for the texts, one for dates, one for geo location, one for numbers, etc. When you add a document to your index, you define how to index each field it has.

Retrieving the documents usually involves crossing results (document ids) from several indexes (products with the words "shoes" in a radius of 100km and a price range of 50-100).

To scale this to huge datasets, you usually use a technique called sharding - each server holds the index data for N documents, and you send the query to all the index servers at once. They each return the top X results, and you sort those and get the unified top X results.

I hope this was the direction you were looking for.

Upvotes: 4

Related Questions