function buildOrderedPageIndex(project, category, query) {
        let array = []
        let schemaArray

        switch (category) {
            case 'Topic': {
                schemaArray = SCHEMAS_BY_PROJECT.get(project).array.docsTopicSchema
                break
            }
            case 'Tutorial': {
                schemaArray = SCHEMAS_BY_PROJECT.get(project).array.docsTutorialSchema
                break
            }
            case 'Review': {
                schemaArray = SCHEMAS_BY_PROJECT.get(project).array.docsReviewSchema
                break
            }
        }

        for (let i = 0; i < schemaArray.length; i++) {
            let arrayItem = schemaArray[i]

            switch (category) {
                case 'Topic': {
                    if (arrayItem.topic !== query) { continue }
                    break
                }
                case 'Tutorial': {
                    if (arrayItem.tutorial !== query) { continue }
                    break
                }
                case 'Review': {
                    if (arrayItem.review !== query) { continue }
                    break
                }
            }

            let itemAdded = false
            if (array.length === 0) {
                array.push(arrayItem)
                itemAdded = true
            } else {
                for (let j = 0; j < array.length; j++) {
                    let orderedArrayItem = array[j]
                    if (Number(arrayItem.pageNumber) < Number(orderedArrayItem.pageNumber)) {
                        array.splice(j, 0, arrayItem)
                        itemAdded = true
                        break
                    }
                }
            }
            if (itemAdded === false) {
                array.push(arrayItem)
            }

        }
        return array
    }
@typedef {{
  language: string,
  text: string
}} Translation

@typedef {{
  text: string,
  translations: Translation[]
}} Definition

@typedef {{
  project: string,
  type: string,
  category: string,
  nodeId: string,
  placeholder: {
    [key: string]: string
  }
}} Document

@typedef {{
  style: string,
  text: string,
  translations: Translation[]
}} Paragraph

@typedef {{
  definition: Definition,
  type: string,
  paragraphs: Paragraph[]
}} SchemaDocument