Prints information on the specified index. @param idx index type @param data data reference @param options main options @return success flag
(final CmdIndexInfo idx, final Data data, final MainOptions options)
| 73 | * @return success flag |
| 74 | */ |
| 75 | private static byte[] info(final CmdIndexInfo idx, final Data data, final MainOptions options) { |
| 76 | return switch(idx) { |
| 77 | case ELEMNAME -> |
| 78 | info(ELEMENTS, IndexType.ELEMNAME, data, options, true); |
| 79 | case ATTRNAME -> |
| 80 | info(ATTRIBUTES, IndexType.ATTRNAME, data, options, true); |
| 81 | case PATH -> |
| 82 | info(PATH_INDEX, IndexType.PATH, data, options, true); |
| 83 | case TEXT -> |
| 84 | info(TEXT_INDEX, IndexType.TEXT, data, options, data.meta.textindex); |
| 85 | case ATTRIBUTE -> |
| 86 | info(ATTRIBUTE_INDEX, IndexType.ATTRIBUTE, data, options, data.meta.attrindex); |
| 87 | case TOKEN -> |
| 88 | info(TOKEN_INDEX, IndexType.TOKEN, data, options, data.meta.tokenindex); |
| 89 | case FULLTEXT -> |
| 90 | info(FULLTEXT_INDEX, IndexType.FULLTEXT, data, options, data.meta.ftindex); |
| 91 | default -> |
| 92 | Token.token(LI + NOT_AVAILABLE); |
| 93 | }; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Returns the specified index information. |