Analytics
Analytics - Namespaces

Get Compound Index Patterns

Changed on

Identify compound index opportunities.

Finds metadata fields commonly used together in filters, suggesting opportunities for compound (multi-field) indexes.

Use Cases:

  • Optimize multi-field queries
  • Create compound indexes
  • Understand query complexity
  • Improve complex filter performance

Response Includes:

  • Field combinations used together
  • Frequency of combination usage
  • Average and P95 latency
  • Sorted by combination frequency

Compound Index Example: If brand + status appears frequently, create:

db.documents.createIndex({"metadata.brand": 1, "metadata.status": 1})

Example:

curl -X GET "https://api.mixpeek.com/v1/analytics/namespaces/indexes/compound-patterns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "X-Namespace: your-namespace"
get/v1/analytics/namespaces/indexes/compound-patterns

Request

  • Base URL: https://api.mixpeek.com
  • URL: https://api.mixpeek.com/v1/analytics/namespaces/indexes/compound-patterns
  • Auth: HTTP bearer and API key in header X-Namespace

Query parameters

daysinteger

Days of history to analyze

limitinteger

Maximum patterns to return

Response

Successful Response

namespace_idstring required

Namespace ID analyzed

time_range_daysinteger required

Number of days analyzed

total_patternsinteger required

Total patterns found

Changes

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      the endpoint scheme security BearerAuth AND NamespaceHeader was added to the API