# List of available facet names

**URL:** <https://discuss.elastic.co/t/list-of-available-facet-names/8730>\
**Category:** Elasticsearch\
**Created:** [August 13, 2012, 11:08am UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730 "2012-08-13T11:08:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dmitriy](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Dmitriy](https://discuss.elastic.co/u/Dmitriy)\
**Post date:** [August 13, 2012, 11:08am UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/1 "2012-08-13T11:08:54Z")

</div>

Hi All,

Sorry for my noob question, but I couldn't find an answer in documentation  
and threads.

I'd like to get list of facet names available for some query result set.

Let's say I have the following documents as the result of some query:

{  
"title" : "One",  
"tags" : ["foo"],  
"quantity" : 1  
}  
{  
"title" : "Two",  
"tags" : ["foo", "bar"],  
"quantity" : 2  
}  
{  
"title" : "Three",  
"tags" : ["foo", "bar", "baz"]  
}

Consider the situation when I don't know exact list of document fields.

What is the way to get available facet names: "tags", "quantity"?

--

---

<div class="post-metadata">

**Author:** ![Dmitriy](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Dmitriy](https://discuss.elastic.co/u/Dmitriy)\
**Post date:** [August 14, 2012, 8:56am UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/2 "2012-08-14T08:56:20Z")

</div>

Are there any thoughts? Is it possible? Is it reasonable?

Thanks.

On Monday, August 13, 2012 2:08:54 PM UTC+3, Dmitriy wrote:

> Hi All,
> 
> Sorry for my noob question, but I couldn't find an answer in documentation  
> and threads.
> 
> I'd like to get list of facet names available for some query result set.
> 
> Let's say I have the following documents as the result of some query:
> 
> {  
> "title" : "One",  
> "tags" : ["foo"],  
> "quantity" : 1  
> }  
> {  
> "title" : "Two",  
> "tags" : ["foo", "bar"],  
> "quantity" : 2  
> }  
> {  
> "title" : "Three",  
> "tags" : ["foo", "bar", "baz"]  
> }
> 
> Consider the situation when I don't know exact list of document fields.
> 
> What is the way to get available facet names: "tags", "quantity"?

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 14, 2012, 9:09am UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/3 "2012-08-14T09:09:39Z")

</div>

Look at the result. You will see a facets array with all facets in it.  
Let me add that you have to create facets when you query. So you know before sending the request, all the facet names.

See this: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html)

David

--

Le 14 août 2012 à 10:56, Dmitriy [dmitriy.milashenko@teamdev.com](mailto:dmitriy.milashenko@teamdev.com) a écrit :

> Are there any thoughts? Is it possible? Is it reasonable?
> 
> Thanks.
> 
> On Monday, August 13, 2012 2:08:54 PM UTC+3, Dmitriy wrote:  
> Hi All,
> 
> Sorry for my noob question, but I couldn't find an answer in documentation and threads.
> 
> I'd like to get list of facet names available for some query result set.
> 
> Let's say I have the following documents as the result of some query:
> 
> {  
> "title" : "One",  
> "tags" : ["foo"],  
> "quantity" : 1  
> }  
> {  
> "title" : "Two",  
> "tags" : ["foo", "bar"],  
> "quantity" : 2  
> }  
> {  
> "title" : "Three",  
> "tags" : ["foo", "bar", "baz"]  
> }
> 
> Consider the situation when I don't know exact list of document fields.
> 
> ## What is the way to get available facet names: "tags", "quantity"?

--

---

<div class="post-metadata">

**Author:** ![Dmitriy](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@Dmitriy](https://discuss.elastic.co/u/Dmitriy)\
**Post date:** [August 15, 2012, 12:53pm UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/4 "2012-08-15T12:53:21Z")

</div>

David,

Thanks for you reply.

It seems I was looking for thing like

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Dmitriy

On Tuesday, August 14, 2012 12:09:39 PM UTC+3, David Pilato wrote:

> Look at the result. You will see a facets array with all facets in it.  
> Let me add that you have to create facets when you query. So you know  
> before sending the request, all the facet names.
> 
> See this:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elasticsearch-and-protovis.html)
> 
> David
> 
> --
> 
> Le 14 août 2012 à 10:56, Dmitriy \<[dmitriy.m...@teamdev.com](mailto:dmitriy.m...@teamdev.com) \<javascript:\>\>  
> a écrit :
> 
> Are there any thoughts? Is it possible? Is it reasonable?
> 
> Thanks.
> 
> On Monday, August 13, 2012 2:08:54 PM UTC+3, Dmitriy wrote:
> 
> > Hi All,
> > 
> > Sorry for my noob question, but I couldn't find an answer in  
> > documentation and threads.
> > 
> > I'd like to get list of facet names available for some query result set.
> > 
> > Let's say I have the following documents as the result of some query:
> > 
> > {  
> > "title" : "One",  
> > "tags" : ["foo"],  
> > "quantity" : 1  
> > }  
> > {  
> > "title" : "Two",  
> > "tags" : ["foo", "bar"],  
> > "quantity" : 2  
> > }  
> > {  
> > "title" : "Three",  
> > "tags" : ["foo", "bar", "baz"]  
> > }
> > 
> > Consider the situation when I don't know exact list of document fields.
> > 
> > What is the way to get available facet names: "tags", "quantity"?
> 
> --

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 15, 2012, 1:17pm UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/5 "2012-08-15T13:17:56Z")

</div>

Right. I misunderstood your question sorry.

I thought you were talking about facets and not about mapping.

De : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) [[mailto:elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)]  
De la part de Dmitriy  
Envoyé : mercredi 15 août 2012 14:53  
À : [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com)  
Objet : Re: List of available facet names

David,

Thanks for you reply.

It seems I was looking for thing like  
[http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.h](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.h)  
tml

Dmitriy

On Tuesday, August 14, 2012 12:09:39 PM UTC+3, David Pilato wrote:

Look at the result. You will see a facets array with all facets in it.

Let me add that you have to create facets when you query. So you know before  
sending the request, all the facet names.

See this:  
[http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elastic](http://www.elasticsearch.org/blog/2011/05/13/data-visualization-with-elastic)  
search-and-protovis.html

David

--

Le 14 août 2012 à 10:56, Dmitriy \<[dmitriy.m...@teamdev.com](mailto:dmitriy.m...@teamdev.com) \<javascript:\> \> a  
écrit :

Are there any thoughts? Is it possible? Is it reasonable?

Thanks.

On Monday, August 13, 2012 2:08:54 PM UTC+3, Dmitriy wrote:

Hi All,

Sorry for my noob question, but I couldn't find an answer in documentation  
and threads.

I'd like to get list of facet names available for some query result set.

Let's say I have the following documents as the result of some query:

{

```
"title" : "One", 

"tags" : ["foo"],

"quantity" : 1

```

}

{

```
"title" : "Two",

"tags" : ["foo", "bar"],

"quantity" : 2

```

}

{

```
"title" : "Three", 

"tags" : ["foo", "bar", "baz"]

```

}

Consider the situation when I don't know exact list of document fields.

What is the way to get available facet names: "tags", "quantity"?

--

--

--

---

<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:** [July 6, 2017, 3:16am UTC](https://discuss.elastic.co/t/list-of-available-facet-names/8730/6 "2017-07-06T03:16:17Z")

</div>

Closed on July 6, 2017, 3:16am UTC


