I would like to know how to get the index corresponding to the maximum or minimum ciphertext value in an encrypted vector (encrypted using CKKS), and whether it is possible to switch to FHEW and decrypt the ciphertext using the private key of FHEW to obtain the index corresponding to the maximum or minimum ciphertext value, rather than going through the FHEW->CKKS conversion and decryption process again. Is there any interface or method for this?

In order to obtain the argmin or argmax represented as an index instead of a one hot encoding of the index, you need to set the one hot encoding flag to false in EvalSchemeSwitchingSetup before calling EvalMinSchemeSwitching or EvalMaxSchemeSwitching.

params.SetOneHotEncoding(false);

auto privateKeyFHEW = cc->EvalSchemeSwitchingSetup(params);

Currently, the method for argmin and argmax implemented in OpenFHE is iterative, based on a selection approach in a binary tree. This is described here. Briefly, the comparison of the difference in inputs is done over FHEW ciphertexts (returning a selection vector over the current half of the vector, which gets halved at every iteration), but the selection of the smaller/larger values is performed as a multiplication in CKKS. So, the ciphertext corresponding to the index is directly obtained in CKKS. If you want the index as a FHEW ciphertext, you need to switch from CKKS to FHEW using EvalCKKSToFHEW and use the FHEW private key generated above to decrypt. (If you specified a scaleSign>1 in EvalCompareSwitchPrecompute, then the FHEW ciphertext will be scaled by scaleSign.)