Hi Aurélien, It is not actually about any specific case. My questions are just helpers to truly understand what approach we should take in our database. I just have hope that I will get more understanding to get answer to some cases.
Answer to your questions inline. wt., 9 cze 2020 o 13:04 Aurélien Bénel <[email protected]> napisał(a): > Hi Piotr, > > > Let's say that I have created two indexes for fields "docType" and "age": > > (...) > > My question is - How CouchDb will behave in case when I'm searching my db > > using both fields when there are two indexes which contains the same > > fields? > > To answer your question (at least with js views, I don't use Mango but I > suppose it to be similar), > we need more details: > > - Are both fields variable parameters ? Or is one of them a constant? > I think both cases I would consider. However the first one would be that I'm searching using both fields as a variable parameters. I'm not sure about constant question. I think non of those fields are constant - I mean from the database point of view docType won't change in the document that's for sure. > - Will both parameters be always set ? If not, which one might be unset? > > Let's assume that it always will, but like I said what if I'm looking only and searching/querying using docType only ? > > Regards, > > Aurélien -- Piotr Zarzycki Patreon: *https://www.patreon.com/piotrzarzycki <https://www.patreon.com/piotrzarzycki>*
