Your Data Has 100 Attributes - How Many Indexes Do You Need To Search Within Millisecond?

https://hackernoon.imgix.net/images/5OuphibiudS6xWM7RvWzpc2Z6Ju1-tz83d5e.png

Real records rarely have five fields. Products, trips, and configurations can carry hundreds of attributes, and every user or service filters by a different handful. A key-value lookup is fast when you already know the key. But what is the key when it's whatever combination of attributes someone picked a moment ago?

I kept hitting the same wall.

I first ran into this problem at a global travel company, and again at a global e-commerce company. Different domains, identical shape:

  • Many attributes. Records carried far more fields than any screen showed.
  • Unpredictable combinations. One request might filter by destination, rating, and price; the next by brand and cancellation policy. Every new feature invented another combination.
  • A tight budget. The answer had to arrive inside a user-facing request, so a network hop to a separate search cluster was a cost of its own.
  • Data that changed rarely; questions that changed constantly.

...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more