Change No. of pindex

Hi, I understand that the "total " value in FTS response is no. of pindex.

 "status": {
        "total": 6,
        "failed": 0,
        "successful": 6
    }

Is there anyway we can change it’s value? And how does it affect FTS performance?

Hi @Rajeev_Bhat,

If you are using the recent versions like 6.5, then one can edit this “numPartitions” in the index definition edit page.
Also, one can always update this over the index create/update endpoint.
ref - https://docs.couchbase.com/server/current/rest-api/rest-fts-indexing.html

One may use the below field to edit this attribute,
“planParams”: {
“maxPartitionsPerPIndex”: 171,

1024 (vbucket number) / 171 = 6 partitions.
ie maxPartitionsPerPIndex acts as the dividing factor to 1024 to compute the number of index partitions.

Given one has enough hardware resources to parallelise the work load, this helps in distributing the search/index work load. Too many partitions would also have the downside of heavy scatter gather costs.

If you have at least 1 core to spare per partition for search or indexing, then its a reasonable point to start with.

Cheers!

Thanks @sreeks.
Rajeev