3

I'm curios how can a NoSQL solution support keyword search in a very very big table distributed accross multiple servers?

By keyword search I mean a DB like the one Google has, with huge amount of documents, and with the ability to answer such question like find "hotels in New York" very fast indeed.

I see very simple solution to support OR operation in NoMysql solution (for example, queries like: "A or B or C") - just to use another very big distributed table that will hold an inverted index from any word to the document it is found in. In such case, given "A or B or C", we can just go directly to "A" or "B" or "C" entries in the index table and collect all the documents-ids. Then, once we have the ids to to fetch the documents themselfes.

But how to design a DB that will support efficient AND operations (for example, if I need to search for "A and B and C")?

Community
  • 1
  • 1
diemacht
  • 2,022
  • 7
  • 30
  • 44
  • for a "very very big table distributed accross multiple servers" using mongodb you would want to look at sharding; see document here: http://www.mongodb.org/download/attachments/2097354/how+queries+work+with+sharding.pdf in conjunction with the mongodb docs on efficient schema design: http://www.mongodb.org/display/DOCS/Schema+Design – Barrie Jan 30 '12 at 16:47

1 Answers1

3

I'd recommend you to take a look at elasticsearch and solr.

Mairbek Khadikov
  • 7,939
  • 3
  • 35
  • 51
  • Seems they already solved similar problem, but it's interesting to know what is the design that supports efficient AND operations? – diemacht Jan 30 '12 at 07:47