Re: How to create custom categories for text files indexed in Elasticsearch using the attachment plugin?

2014-02-11 Thread Sagar Singh
Thanks, I guess i should be asking how would i set those meta data during 
indexing, is there a feature that ES can perform for me. i saw a way to 
have custom analyzers and was trying those out to see if i can use that to 
set the meta for me if there is something in that document.

On Tuesday, February 11, 2014 4:00:02 PM UTC-5, Binh Ly wrote:
>
> Ooops, forgot to mention "store": "yes" is optional. You don't have to 
> store anything if you don't need stored metadata fields.
>
> On Tuesday, February 11, 2014 3:57:52 PM UTC-5, Binh Ly wrote:
>>
>> You can simply add more fields on the same level as file. For example:
>>
>>   "mappings": {
>> "doc": {
>>   "properties" : {
>> "file" : { 
>>   "type" : "attachment", 
>>   "fields": {
>> "file": { "store": "yes" }
>>   }
>> },
>> "meta1": {
>>   "type": "string", 
>>   "store": "yes"
>> }
>>   }
>> }
>>   }
>>
>> And then when you index, just specify a value for the "meta1" field in 
>> addition to your "file" field.
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/38c360c3-b0e1-4da9-9018-ee951358386e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to create custom categories for text files indexed in Elasticsearch using the attachment plugin?

2014-02-11 Thread Binh Ly
Ooops, forgot to mention "store": "yes" is optional. You don't have to 
store anything if you don't need stored metadata fields.

On Tuesday, February 11, 2014 3:57:52 PM UTC-5, Binh Ly wrote:
>
> You can simply add more fields on the same level as file. For example:
>
>   "mappings": {
> "doc": {
>   "properties" : {
> "file" : { 
>   "type" : "attachment", 
>   "fields": {
> "file": { "store": "yes" }
>   }
> },
> "meta1": {
>   "type": "string", 
>   "store": "yes"
> }
>   }
> }
>   }
>
> And then when you index, just specify a value for the "meta1" field in 
> addition to your "file" field.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/e6729c4d-14c6-4dbd-bd0a-8d96c3c97019%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to create custom categories for text files indexed in Elasticsearch using the attachment plugin?

2014-02-11 Thread Binh Ly
You can simply add more fields on the same level as file. For example:

  "mappings": {
"doc": {
  "properties" : {
"file" : { 
  "type" : "attachment", 
  "fields": {
"file": { "store": "yes" }
  }
},
"meta1": {
  "type": "string", 
  "store": "yes"
}
  }
}
  }

And then when you index, just specify a value for the "meta1" field in 
addition to your "file" field.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/d53e93b6-c595-43a8-8829-a2f3b68014d1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.