FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    How can I see which fields are indexed?

    Scheduled Pinned Locked Moved
    Q&A
    user elasticsearch
    0
    2
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by

      I am using the elasticsearch search engine and want to query the user on a field like expiry. I am not seeing any results when I search on that field.

      How can I determine which fields of the user are indexed in elasticsearch?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        We currently don't document these. Probably should; I'll put it on the list.

        Until then, you can find the indexed fields by querying elasticsearch:

        curl -XGET http://elasticsearchhost:port/fusionauth_user/_mapping
        

        This will return something like the below JSON. This will vary based on your FusionAuth installation, however:

        
          "fusionauth_user": {
            "mappings": {
              "_source": {
                "enabled": false
              },
              "properties": {
                "active": {
                  "type": "boolean"
                },
                "birthDate": {
                  "type": "date"
                },
                "breachedPasswordLastCheckedInstant": {
                  "type": "long"
                },
                "breachedPasswordStatus": {
                  "type": "text",
                  "fields": {
                    "keyword": {
                      "type": "keyword",
                      "ignore_above": 256
                    }
                  }
                },
                "data": { 
                },
                "email": {
                  "type": "text",
                  "analyzer": "exact_lower",
                  "fielddata": true
                },
                "fullName": {
                  "type": "text",
                  "fielddata": true
                },
                "id": {
                  "type": "keyword"
                },
                "insertInstant": {
                  "type": "date"
                },
                "lastLoginInstant": {
                  "type": "date"
                },
                "lastUpdateInstant": {
                  "type": "date"
                },
                "login": {
                  "type": "keyword"
                },
                "memberships": {
                  "type": "nested",
                  "include_in_parent": true,
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "groupId": {
                      "type": "keyword"
                    },
                    "id": {
                      "type": "keyword"
                    },
                    "insertInstant": {
                      "type": "date"
                    },
                    "userId": {
                      "type": "keyword"
                    }
                  }
                },
                "mobilePhone": {
                  "type": "text",
                  "fields": {
                    "keyword": {
                      "type": "keyword",
                      "ignore_above": 256
                    }
                  }
                },
                "preferredLanguages": {
                  "type": "text",
                  "fields": {
                    "keyword": {
                      "type": "keyword",
                      "ignore_above": 256
                    }
                  }
                },
                "registrations": {
                  "type": "nested",
                  "include_in_parent": true,
                  "properties": {
                    "applicationId": {
                      "type": "keyword"
                    },
                    "authenticationToken": {
                      "type": "text",
                      "fields": {
                        "keyword": {
                          "type": "keyword",
                          "ignore_above": 256
                        }
                      }
                    },
                    "data": {
                    },
                    "id": {
                      "type": "keyword"
                    },
                    "insertInstant": {
                      "type": "date"
                    },
                    "lastLoginInstant": {
                      "type": "date"
                    },
                    "lastUpdateInstant": {
                      "type": "date"
                    },
                    "preferredLanguages": {
                      "type": "text",
                      "fields": {
                        "keyword": {
                          "type": "keyword",
                          "ignore_above": 256
                        }
                      }
                    },
                    "roles": {
                      "type": "keyword"
                    },
                    "tokens": {
                      "properties": {
                        "5ccff761-f809-49c7-a58c-27a3cb9ab650": {
                          "type": "text",
                          "fields": {
                            "keyword": {
                              "type": "keyword",
                              "ignore_above": 256
                            }
                          }
                        },
                        "84ef0274-70db-44da-8762-aa6bcfbd2981": {
                          "type": "text",
                          "fields": {
                            "keyword": {
                              "type": "keyword",
                              "ignore_above": 256
                            }
                          }
                        },
                        "Google": {
                          "type": "text",
                          "fields": {
                            "keyword": {
                              "type": "keyword",
                              "ignore_above": 256
                            }
                          }
                        }
                      }
                    },
                    "username": {
                      "type": "text",
                      "fields": {
                        "keyword": {
                          "type": "keyword",
                          "ignore_above": 256
                        }
                      }
                    },
                    "usernameStatus": {
                      "type": "text",
                      "fields": {
                        "keyword": {
                          "type": "keyword",
                          "ignore_above": 256
                        }
                      }
                    },
                    "verified": {
                      "type": "boolean"
                    }
                  }
                },
                "tenantId": {
                  "type": "keyword"
                },
                "timezone": {
                  "type": "text",
                  "fields": {
                    "keyword": {
                      "type": "keyword",
                      "ignore_above": 256
                    }
                  }
                },
                "username": {
                  "type": "text",
                  "fielddata": true
                },
                "verified": {
                  "type": "boolean"
                }
              }
            }
          }
        }
        

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post