Multitenant environment

Hi,

We are migrating from Sphinx to Manticore for a multitenant platform and so far we are very pleased with the performance.

I am trying to find the optimal approach for indexing:

  1. one table per tenant (many small tables with few thousand records)
  2. one single table (15 mil records)
  3. separate tables per groups (30-50 groups)

For Sphinx we used in the past third option and trigrams index for autocompletion. We also used Call Qsuggest for another project with Sphinx and is working well.

My problem is that if we use Call Qsuggest for a multitenant environment the results would not be relevant as it would include results from other tenants (we only want to give suggestions that would return results for current tenant)

My questions are:

  • any hack to apply where filter to Call Qsuggest?
  • would it be a reasonable solution from a performance point of view to have around 2-3000 tables (one table per tenant)
  • any other hack to make use of Qsuggest instead of trigrams?

Thank you

  • any hack to apply where filter to Call Qsuggest?

It’s not possible since CALL QSUGGEST relies on the dictionary and you can’t apply apply an attribute filter to it.

  • would it be a reasonable solution from a performance point of view to have around 2-3000 tables (one table per tenant)

As soon as you have enough file descriptors (you may need to increase the open files limit globally in the system) you should be fine.

  • any other hack to make use of Qsuggest instead of trigrams?

It depends on what you need, e.g. we recently added the REGEX full-text operator which may be helpful in some cases as an alternative to trigrams - Manticore Search Manual: Searching > Full text matching > Operators

Hi Sergey, thanks for clarifications