* Matches the indexPath for $text query. It just checks if the index used * is a text index, as there can only be at max one text index for a collection. */
| 5206 | * is a text index, as there can only be at max one text index for a collection. |
| 5207 | */ |
| 5208 | static bool |
| 5209 | MatchIndexPathForText(IndexPath *indexPath, void *matchContext) |
| 5210 | { |
| 5211 | if (IsBsonRegularIndexAm(indexPath->indexinfo->relam) && |
| 5212 | indexPath->indexinfo->ncolumns > 0) |
| 5213 | { |
| 5214 | for (int ind = 0; ind < indexPath->indexinfo->ncolumns; ind++) |
| 5215 | { |
| 5216 | if (IsTextPathOpFamilyOid(indexPath->indexinfo->relam, |
| 5217 | indexPath->indexinfo->opfamily[ind])) |
| 5218 | { |
| 5219 | return true; |
| 5220 | } |
| 5221 | } |
| 5222 | } |
| 5223 | return false; |
| 5224 | } |
| 5225 | |
| 5226 | |
| 5227 | pg_attribute_noreturn() |
nothing calls this directly
no test coverage detected