How many search pipeline stages should there be?


How many search pipeline stages should there be?

In my last post about search pipeline stages, we talked about stacking stages of more cost-effective methods of search before running big, expensive wildcard searches.

That might leave you wondering, “What search pipeline stages should I stack before my wildcard search?” or “How many should I stack”?

You could stack as many or as few stages as you like, just be mindful that all those milliseconds add up.

As for what I would start by answering the following questions to decide what stages to put in your pipeline:

What is most commonly searched?

This is an easy starting point to keep an index or cache of what we know is likely to get searched.

What do we want them to see?

If I were Amazon and I had a product that fits the customer's needs with high margins and low return rates, I would prioritize that over some random product that hasn’t been updated or sold since 2010.

What is cost-effective for us to serve up?

If you can index 20% of the results that make 80% of the searches and have them ready to go before the user even types in the search, then you are doing really well.

In the end, it all depends on the value of the search to the user, especially if search is not your flagship feature.

Just keep in mind you have options, don’t feel like wildcard text should be your first option.

If you need help with this, please feel free to reach out.