Question about Facet

I have documents which are indexed from fs river
I want to create a facet that filter document folowing their type (. pdf.
doc. txt etc.) ....
what is the best ways to do ?

I create different types under the same index for exemple: documents that
have "pdf" type will be indexed under "myDoc" index and have "pdf" type ,
document with type txt will be indexed under the same index but have a
"txt" type....

after I create my facet on the type field

is there another way to do it?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey

if you really mean the type of the document (not some metadata inside of
the document), how about this

curl -X POST 'localhost:9200/test/_search?pretty' -d '{ "query":{
"match_all" : {} }, "facets" : { "types" : { "terms" : { "field" :"_type"}
} } }'

In case I didnt get your question completely, just ask harder :slight_smile:

On Tue, Apr 2, 2013 at 3:08 PM, Ammar Yahia yahia.ammar.info@gmail.comwrote:

I have documents which are indexed from fs river
I want to create a facet that filter document folowing their type (. pdf.
doc. txt etc.) ....
what is the best ways to do ?

I create different types under the same index for exemple: documents that
have "pdf" type will be indexed under "myDoc" index and have "pdf" type ,
document with type txt will be indexed under the same index but have a
"txt" type....

after I create my facet on the type field

is there another way to do it?

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

is elasticsearch can detect the type of document at indexing time and
assigns it to a field in the meta data of the document ??
ie when indexing a document type pdf, it automatically detects that this is
a PDF document, and updates a field in the meta data document, this field
indicate a type of indexed docuement

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No. Mapper attachment does not autodetect types.
See save all tika metadata · Issue #1 · elastic/elasticsearch-mapper-attachments · GitHub

I think we can solve this but it's not here yet.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 2 avr. 2013 à 16:08, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

is elasticsearch can detect the type of document at indexing time and assigns it to a field in the meta data of the document ??
ie when indexing a document type pdf, it automatically detects that this is a PDF document, and updates a field in the meta data document, this field indicate a type of indexed docuement

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

ok thx a lot

--Yahia

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.