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

    How can I see which fields are indexed?

    Scheduled Pinned Locked Moved Q&A
    userelasticsearch
    2 Posts 0 Posters 5.7k Views
    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 - Identity Without Constraints
      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 - Identity Without Constraints
        https://fusionauth.io

        1 Reply Last reply
        Reply Quote 0
        • danD dan moved this topic from Q&A on
        • danD dan moved this topic from Frequently Asked Questions (FAQ) on

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post