Confused about facets in elasticsearch


(Saumya Garg) #1

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(Saumya Garg) #2

I think I figured it out what I needed from the following page:

http://www.elasticsearch.org/guide/reference/api/search/filter.html

I am still unsure about facet filters... Having an example on the
facet_filters page where we can see what information is first stored and
how that information is stored before the facet filter query example
would help clarify.

Saumya

On 04/10/2011 05:40 PM, Saumya Garg wrote:

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(Shay Banon) #3

Stored? I don't understand the question.. . Its so simply to experiment with elasticsearch, just fire up your shell, index some docs with curl, and see how it works. And the search filter has a complete example, it can't get more "exampled" than this, just try it out.
On Monday, April 11, 2011 at 2:21 AM, Saumya Garg wrote:

I think I figured it out what I needed from the following page:

http://www.elasticsearch.org/guide/reference/api/search/filter.html

I am still unsure about facet filters... Having an example on the
facet_filters page where we can see what information is first stored and
how that information is stored before the facet filter query example
would help clarify.

Saumya

On 04/10/2011 05:40 PM, Saumya Garg wrote:

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(Karel Minarik) #4

I think the documentation could be more clear here, I've set a ticket
for it; https://github.com/elasticsearch/elasticsearch.github.com/issues/24

On Apr 11, 1:21 am, Saumya Garg sgargconsult...@gmail.com wrote:

I think I figured it out what I needed from the following page:

http://www.elasticsearch.org/guide/reference/api/search/filter.html

I am still unsure about facet filters... Having an example on the
facet_filters page where we can see what information is first stored and
how that information is stored before the facet filter query example
would help clarify.

Saumya

On 04/10/2011 05:40 PM, Saumya Garg wrote:

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(Karel Minarik) #5

Could you check out this version


? Is it any better?

On Apr 11, 1:21 am, Saumya Garg sgargconsult...@gmail.com wrote:

I think I figured it out what I needed from the following page:

http://www.elasticsearch.org/guide/reference/api/search/filter.html

I am still unsure about facet filters... Having an example on the
facet_filters page where we can see what information is first stored and
how that information is stored before the facet filter query example
would help clarify.

Saumya

On 04/10/2011 05:40 PM, Saumya Garg wrote:

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(jacorob) #6

Karel,

Regardless of whether it helped the original poster, it helped me. Thanks!

Bob

On Wed, Apr 13, 2011 at 4:39 AM, Karel Minarik karel.minarik@gmail.comwrote:

Could you check out this version

https://github.com/karmi/elasticsearch.github.com/blob/a70edc634c349969769ebf4337e429b0bb1f9a97/guide/reference/api/search/facets/index.textile
? Is it any better?

On Apr 11, 1:21 am, Saumya Garg sgargconsult...@gmail.com wrote:

I think I figured it out what I needed from the following page:

http://www.elasticsearch.org/guide/reference/api/search/filter.html

I am still unsure about facet filters... Having an example on the
facet_filters page where we can see what information is first stored and
how that information is stored before the facet filter query example
would help clarify.

Saumya

On 04/10/2011 05:40 PM, Saumya Garg wrote:

I am trying to figure out the facet query language:

I see the following example in the doc --->

{
"facets" : {
"wow_facet" : {
"query" : {
"term" : { "tag" : "wow" }
}
}
}
}

In the above example:

What is wow_facet?
What is tag?

Is their any special quirks about the indexing process for facets? Or
can you turn any field you have have indexed into a facet field?

Thanks,

Saumya


(system) #7