# Indexing a document

**URL:** <https://discuss.elastic.co/t/indexing-a-document/130884>\
**Category:** Elasticsearch\
**Created:** [May 7, 2018, 5:49pm UTC](https://discuss.elastic.co/t/indexing-a-document/130884 "2018-05-07T17:49:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_g](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@john\_g](https://discuss.elastic.co/u/john_g)\
**Post date:** [May 7, 2018, 5:49pm UTC](https://discuss.elastic.co/t/indexing-a-document/130884/1 "2018-05-07T17:49:12Z")

</div>

Hi

I am new to Elasticsearch.

We are planning to a database that has the following columns.

[USER-ID USER-NAME GROUP PARENT-GROUP GROUP-JOIN-DATE]

The database would have billions of entries. An user belonging to a particular group may have multiple parent group. A parent group decides which specific group a user could be part of. For example A user needs to be part of either Student or Employee group to be part CanteenAccount group.

Is there any way we can do the following?

- Index the document using different fields  
For example, To query all groups a user belongs to, To query all group hierarchy of an user, To retrieve  
all users joining after a date

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 4, 2018, 5:49pm UTC](https://discuss.elastic.co/t/indexing-a-document/130884/2 "2018-06-04T17:49:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
