How to write Conditional boolean query using Nest in c#?

2015-03-17 Thread Sadhana Upadhyay
  .Filter(ff => ff
  .Bool(bb => bb
  .Must(mm =>
 mm.Terms("cityId", 
filterInputs.cities) &&
 mm.Terms("fuelTypeId", 
filterInputs.fuels) &&
 mm.Terms("sellerType", 
filterInputs.sellers) &&
 mm.Terms("transmissionId", 
filterInputs.transmissions) &&
 mm.Terms("ownerTypeId", 
filterInputs.owners) &&

 mm.Terms("usedCarMasterColorsId", filterInputs.colors) &&
 mm.Terms("bodyStyleId", 
filterInputs.bodytypes) &&
 mm.Range(y => 
y.OnField("certificationId").GreaterOrEquals(filterInputs.certifiedCars)) &&
 mm.Range(y => 
y.OnField("photoCount").GreaterOrEquals(filterInputs.carsWithPhotos)) &&
 mm.Range(y => 
y.OnField("makeYear").GreaterOrEquals(filterInputs.yearMin).LowerOrEquals(filterInputs.yearMax))
 
&&
 mm.Range(r => 
r.OnField("price").GreaterOrEquals(filterInputs.budgetMin).LowerOrEquals(filterInputs.budgetMax))
 
&&
 mm.Range(k => 
k.OnField("kilometers").GreaterOrEquals(filterInputs.kmMin).LowerOrEquals(filterInputs.kmMax))
 
&&
 mm.Terms("makeId", 
filterInputs.NewMakes) ||
 mm.Terms("rootId", 
filterInputs.NewRoots) 
  )
  )
  )

I need query if
filterInputs.NewMakes is null then && condition with mm.Terms("rootId", 
filterInputs.NewRoots)  otherwise it should be || condition.

Thank in advance.

-- 
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/ce4383f8-7019-4a5d-84c7-85a806ab0723%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Nested query resulting in missing source fields?

2015-03-17 Thread Woody Peterson
I have a monstrous query with a monstrous response. It was originally 
written to work around some limitations in Elasticsearch 0.8, if I remember 
right, namely missing grouping.

I'm having an issue where a certain nested query inside of a dis_max is 
producing hits that don't contain any source fields, and I see no reason 
why this should be the case.

You don't have to study these in detail, just skim the first one to the 
'nested' part and glance at the results, then do the same for the second 
one (note the missing 'nested' part, and all the extra data in the results).

https://gist.github.com/woahdae/1142fa956d28c2d84a57

vs

https://gist.github.com/woahdae/fe3d1a3562a463aea4b5

I'm a dog flying an airplane at this point, anybody know where to look next?

-- 
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/9c11b6b6-08c4-4652-8dd5-9f197a8e301b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch ICU Analysis plugin for 1.4.3 / proper Lucene version

2015-03-17 Thread David Pilato
I think we need to release latest version we have.

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 17 mars 2015 à 16:46, Jun Ohtani  a écrit :
> 
> Hi,
> 
> I’m not sure about that.
> 
> Do you install ICU plugin version 2.4.1 to Elasticsearch 1.4.3?
> 
> If you would like to install ICU plugin to Elasticsearch 1.4.3, you should 
> use ICU plugin 2.4.2.
> 
> bin/plugin install elasticsearch/elasticsearch-analysis-icu/2.4.2
> 
> 
> Jun Ohtani
> joht...@gmail.com
> blog : http://blog.johtani.info
> twitter : http://twitter.com/johtani
> 
>> 2015/03/18 1:34、JZ  のメール:
>> 
>> Dear all,
>> 
>> I am wondering whether you can provide a compiled version of the ICU 
>> Analysis plugin for Elasticsearch 1.4.3. I have tried to install the plugin 
>> version 1.4.2 on ES 1.4.3 but then I get this error on restarting:
>> 
>> cannot start plugin due to incorrect Lucene version: plugin [4.10.3], node 
>> [4.10.2].
>> 
>> See:
>> https://github.com/elastic/elasticsearch-analysis-icu
>> 
>> I have tried to compile it from source, but then I get Maven dependency 
>> errors returned.
>> 
>> Thanks in advance!
>> 
>> /JZ
>> 
>> -- 
>> 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/CAA%2BD3eXq7jKOFOEJjBftQRCK%3DJ%2Bw6%2BUw7PHrjMWG8_w%2B%3Dshv%3DA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/38A4A33E-816C-41CC-A552-25248E65E8AC%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/0BBFD38B-BC42-41AA-BB9C-C361C99E9DB4%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.


i want to know sum aggregation result accuracy.

2015-03-17 Thread hongsgo
hello, 

dear community members.

i want to know sum aggregation result accuracy.
is it result  100% confidence possible?

http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html

it's have accuracy different for both term aggregation and sum aggregation?

http://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-approximate-counts

please let me know.

thank you.




--
View this message in context: 
http://elasticsearch-users.115913.n3.nabble.com/i-want-to-know-sum-aggregation-result-accuracy-tp4072175.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

-- 
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/1426649552579-4072175.post%40n3.nabble.com.
For more options, visit https://groups.google.com/d/optout.


Re: search on nested multi fields

2015-03-17 Thread Chen Wang
Its my bad.
I defined the index in a wrong way: Once I move properties under 
user_activity_v2  to _default_
It starts working.
Chen

On Tuesday, March 17, 2015 at 5:36:57 PM UTC-7, Chen Wang wrote:
>
> the index definition is this:
>   "settings": {
> "index": {
> "number_of_shards": 7,
> "number_of_replicas": 1,
> "analysis": {
> "analyzer": {
> "analyzer_raw": {
> "tokenizer": "keyword",
> "filter": "lowercase"
> }
> }
> }
> }
> },
> "mappings": {
> "_default_": {
> "_ttl": {
> "enabled": 'true',
> "default": ttl
> }
> },
> "user_activity_v2": {
> "_id": {
> "path": "customer_id"
> },
> "properties": {
> "customer_id": {"type": "long"},
> "store_purchase": {
> "type": "nested",
> "include_in_parent": "true",
> "properties": {
> "item_id":{"type": "string"},
> "cat": {
> "type": "multi_field",
> "fields": {
> "cat": {
> "type": "string",
> },
> "original": {
> "type": "string",
> "search_analyzer": 
> "analyzer_raw",
> "index_analyzer": 
> "analyzer_raw"
> }
> }
> }
> }
>
> On Tuesday, March 17, 2015 at 5:24:04 PM UTC-7, Chen Wang wrote:
>>
>> Folks,
>> I have defined a nested object with multi_fields attribute: the "cat" in 
>> store_purchase
>>
>>
>> I loaded some data into Es:
>>  {
>> "_index": "user_activity_v2",
>> "_type": "combined",
>> "_id": "1229369",
>> "_score": 1,
>> "_source": {
>>"store_purchase": [
>>   {
>>  "item_id": "10423846",
>>  "subcat": "First Aid",
>>  "brand_name": "brand name",
>>  "event_time": "2015-03-09",
>>  "cat": "otc"
>>   },
>>   {
>>  "item_id": "34897214",
>>  "subcat": "coffee",
>>  "brand_name": "brand name2",
>>  "event_time": "2015-03-09",
>>  "cat": "cat2 with space"
>>   },
>> }
>>
>> However, I cannot find any data from the following search
>>
>> GET _search
>> {
>>   "query": {
>> "bool": {
>>   "must": [
>>
>> {
>>   "nested": {
>> "path": "store_purchase", 
>> "query": {
>>   "bool": {
>> "must": [ 
>>   { "match": { "store_purchase.cat": "otc" }}
>> ]
>> 
>>   ]
>> }}}
>>
>> i also tried with{ "match": { "store_purchase.cat.original": "otc" 
>> }}, it all returns nothing.
>>
>> What I am missing here?
>> Thanks,
>> Chen
>>
>>
>>

-- 
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/1237c72c-3fe6-48c0-b581-b80592470900%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: spark version, elasticsearch-hadoop version, akka version sync up

2015-03-17 Thread Costin Leau
You're close:
elasticsearch-hadoop snapshot (aka dev aka master) works on spark 1.2, 1.1
and 1.0, both core and sql
elasticsearch-hadoop beta3 (not snapshot) works on spark 1.1 and spark 1.0,
both core and sql
elasticsearch-hadoop beta2 (not snapshot) works on spark 1.0 (core and sql)

The support for spark 1.3 hasn't been committed yet, I'd like to push it
out once I (hopefully) manage to keep compatibility on the sql integration
with spark 1.2 and lower. Once it is, it will be available in the
nightly/dev builds published (as the name implies) every 24th - each day or
night, depending on your timezon [1].


> Costin - I am amazed by your ability to keep all this straight - my head
would explode dealing with all the dependencies in flux.  Kudos to you.

Thanks. As most (if not all) things in life, practice makes perfect ;)

[1]
http://www.elastic.co/guide/en/elasticsearch/hadoop/master/install.html#download-dev

On Wed, Mar 18, 2015 at 12:59 AM, Jeff Steinmetz <
jeffrey.steinm...@gmail.com> wrote:

> Thank you for the summary - you are confirming (as a sanity check for
> myself):
>
> elasticsearch-hadoop beta3 (not snapshot) on spark core 1.1 only
> elasticsearch-hadoop-beta3-SNAPSHOT with spark core 1.1, 1.2 and 1.3 -- as
> long as I don't use Spark SQL when using 1.2 and 1.3
>
> Costin - I am amazed by your ability to keep all this straight - my head
> would explode dealing with all the dependencies in flux.  Kudos to you.
>
>
> On Tuesday, March 17, 2015 at 2:12:06 PM UTC-7, Costin Leau wrote:
>>
>> es-hadoop doesn't depend on akka, only on Spark. The scala version that
>> es-hadoop is compiled against matches the one used by the Spark version
>> compiled against for each release - typically this shouldn't pose a problem.
>>
>> Unfortunately, despite the minor version increments, some of the Spark
>> APIs or components (in particular Spark SQL) have changed drastically
>> between each release breaking backwards compatibility. For example, Beta3
>> works until Spark 1.1 (which was the latest stable release during its
>> release) but not with 1.2. This is fixed in master however the current dev
>> build doesn't work with Spark SQL in the newly released 1.3 (does work with
>> Spark core).
>>
>> This has already been fixed locally however I'm having difficulties
>> trying to preserve compatibility across the Spark SQL 1.2 release and 1.3.
>>
>> Long story short, as long as the dependencies for Spark are in order, the
>> same should apply for es-hadoop as well since it relies only on Spark (and
>> Scala of course).
>>
>> On Tue, Mar 17, 2015 at 10:43 PM, Jeff Steinmetz 
>> wrote:
>>
>>> There are plenty of spark / akka / scala / elasticsearch-hadoop
>>> dependencies to keep track of.
>>>
>>> Is it true that elasticsearch-hadoop needs to be compiled for a specific
>>> spark version to run correctly on the cluster?  I'm also trying to keep
>>> track of the akka version and scala version.  i.e, wil es-hadoop compiled
>>> for spark 1.2  work with Spark 1.3 ?
>>>
>>> When the elasticsearch-hadoop versions are released, as v2.0 v2.1,
>>> v2.1.0.Beta3, at what point do we need to keep in mind what spark version
>>> it was also compiled against?
>>> i.e., is it safe to assume the es-hadoop versions are tied to a specific
>>> spark core version?
>>>
>>> I've been keeping the following chart in my notes to see what all the
>>> versions are with all dependencies
>>> =
>>>
>>> Akka Version  Dependencies
>>> Current Akka Stable Release:  2.3.9
>>>
>>> Elasticsearch-Hadoop:  2.1.0Beta3 = Spark 1.1.0
>>> Elasticsearch-Hadoop:  2.1.0Beta3-SNAPSHOT = Spark 1.2.1
>>> Elasticsearch-Hadoop: what about spark 1.3 ?
>>>
>>> Spark: 1.3, Akka: 2.3.4-spark
>>> Spark: 1.2, Akka: 2.3.4-spark
>>> Spark: 1.1, Akka: 2.2.3-shaded-protobuf
>>>
>>> Activator 1.2.12 comes with with Akka 2.3.4
>>>
>>> Play 2.3.8, akka 2.3.4, scala 2.11.1 (will also work with 2.10.4 )
>>> Play 2.2.x, akka 2.2.0
>>>
>>> Spark Job Server 0.4.1, Spark Core 1.1.0, Akka, 2.2.4
>>> Spark Job Server Master as of Feb 22, 2015, Spark Core 1.2.0,  Akka
>>> 2.3.4, Scala 2.10.4
>>>
>>> Akka persistence latest 2.3.4 or later
>>> Akka 2.3.9 is released for Scala 2.10.4 and 2.11.5
>>>
>>>
>>>  --
>>> 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 elasticsearc...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/elasticsearch/28ad3f78-8b3d-450a-a29d-06d3e6636cfd%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop rece

Re: search on nested multi fields

2015-03-17 Thread Chen Wang
the index definition is this:
  "settings": {
"index": {
"number_of_shards": 7,
"number_of_replicas": 1,
"analysis": {
"analyzer": {
"analyzer_raw": {
"tokenizer": "keyword",
"filter": "lowercase"
}
}
}
}
},
"mappings": {
"_default_": {
"_ttl": {
"enabled": 'true',
"default": ttl
}
},
"user_activity_v2": {
"_id": {
"path": "customer_id"
},
"properties": {
"customer_id": {"type": "long"},
"store_purchase": {
"type": "nested",
"include_in_parent": "true",
"properties": {
"item_id":{"type": "string"},
"cat": {
"type": "multi_field",
"fields": {
"cat": {
"type": "string",
},
"original": {
"type": "string",
"search_analyzer": 
"analyzer_raw",
"index_analyzer": "analyzer_raw"
}
}
}
}

On Tuesday, March 17, 2015 at 5:24:04 PM UTC-7, Chen Wang wrote:
>
> Folks,
> I have defined a nested object with multi_fields attribute: the "cat" in 
> store_purchase
>
>
> I loaded some data into Es:
>  {
> "_index": "user_activity_v2",
> "_type": "combined",
> "_id": "1229369",
> "_score": 1,
> "_source": {
>"store_purchase": [
>   {
>  "item_id": "10423846",
>  "subcat": "First Aid",
>  "brand_name": "brand name",
>  "event_time": "2015-03-09",
>  "cat": "otc"
>   },
>   {
>  "item_id": "34897214",
>  "subcat": "coffee",
>  "brand_name": "brand name2",
>  "event_time": "2015-03-09",
>  "cat": "cat2 with space"
>   },
> }
>
> However, I cannot find any data from the following search
>
> GET _search
> {
>   "query": {
> "bool": {
>   "must": [
>
> {
>   "nested": {
> "path": "store_purchase", 
> "query": {
>   "bool": {
> "must": [ 
>   { "match": { "store_purchase.cat": "otc" }}
> ]
> 
>   ]
> }}}
>
> i also tried with{ "match": { "store_purchase.cat.original": "otc" }}, 
> it all returns nothing.
>
> What I am missing here?
> Thanks,
> Chen
>
>
>

-- 
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/185cfeaf-1788-48c7-af72-ee98fa8ed956%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


search on nested multi fields

2015-03-17 Thread Chen Wang
Folks,
I have defined a nested object with multi_fields attribute: the "cat" in 
store_purchase


I loaded some data into Es:
 {
"_index": "user_activity_v2",
"_type": "combined",
"_id": "1229369",
"_score": 1,
"_source": {
   "store_purchase": [
  {
 "item_id": "10423846",
 "subcat": "First Aid",
 "brand_name": "brand name",
 "event_time": "2015-03-09",
 "cat": "otc"
  },
  {
 "item_id": "34897214",
 "subcat": "coffee",
 "brand_name": "brand name2",
 "event_time": "2015-03-09",
 "cat": "cat2 with space"
  },
}

However, I cannot find any data from the following search

GET _search
{
  "query": {
"bool": {
  "must": [
   
{
  "nested": {
"path": "store_purchase", 
"query": {
  "bool": {
"must": [ 
  { "match": { "store_purchase.cat": "otc" }}
]

  ]
}}}

i also tried with{ "match": { "store_purchase.cat.original": "otc" }}, 
it all returns nothing.

What I am missing here?
Thanks,
Chen


-- 
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/7802f86f-fde6-4502-9e76-3c9347ba618a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: mappings: use wildcards from field name

2015-03-17 Thread Jun Ohtani
Hi,

You try to use “dynamic_templates” .
http://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-root-object-type.html#_dynamic_templates

I hope that those help you out.



Jun Ohtani
joht...@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani

> 2015/02/27 2:56、sebastian  のメール:
> 
> Hi,
> 
> 
> Can I create a mapping and use wildcards in the fields name? For example, I 
> want to create a template with the following mapping:
> 
> {
> "user": {
> "dynamic": "false", 
> "properties": { 
> "email": { "type":"string" },
> "*_metadata": {
> "type": "object", 
> "dynamic": "true" 
> } 
> } 
> }
> }
> 
> Then, the "foo_metadata", "bar_metadata", etc fields will be mapped.
> 
> Is it possible?
> 
> 
> -- 
> 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/6d7d08b8-c2f2-4109-9720-c75f031092a6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/772DDFF6-B4D6-4BFD-BAE8-8BDA63BB78C6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch ICU Analysis plugin for 1.4.3 / proper Lucene version

2015-03-17 Thread Jun Ohtani
Hi,

I’m not sure about that.

Do you install ICU plugin version 2.4.1 to Elasticsearch 1.4.3?

If you would like to install ICU plugin to Elasticsearch 1.4.3, you should use 
ICU plugin 2.4.2.

bin/plugin install elasticsearch/elasticsearch-analysis-icu/2.4.2


Jun Ohtani
joht...@gmail.com
blog : http://blog.johtani.info
twitter : http://twitter.com/johtani

> 2015/03/18 1:34、JZ  のメール:
> 
> Dear all,
> 
> I am wondering whether you can provide a compiled version of the ICU Analysis 
> plugin for Elasticsearch 1.4.3. I have tried to install the plugin version 
> 1.4.2 on ES 1.4.3 but then I get this error on restarting:
> 
> cannot start plugin due to incorrect Lucene version: plugin [4.10.3], node 
> [4.10.2].
> 
> See:
> https://github.com/elastic/elasticsearch-analysis-icu
> 
> I have tried to compile it from source, but then I get Maven dependency 
> errors returned.
> 
> Thanks in advance!
> 
> /JZ
> 
> -- 
> 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/CAA%2BD3eXq7jKOFOEJjBftQRCK%3DJ%2Bw6%2BUw7PHrjMWG8_w%2B%3Dshv%3DA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/38A4A33E-816C-41CC-A552-25248E65E8AC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Indexing and Searching XML documents

2015-03-17 Thread Mark Walkom
You can use Logstash to change the XML into JSON, but you will need to do
the JSON to XML output yourself.

On 17 March 2015 at 15:17, Venkat Ankam  wrote:

> I have a requirement to index and search millions of XML documents related
> to mortgage (Uniform Closing Dataset XMLs).
>
> Indexed data will be requested by a web services of many internal
> applications through REST API.
>
> Output should be in XML format.
>
> How do I implement this in ELK stack?  How to convert XML input to JSON
> and how to get output in XML format?
>
> Request you to share any examples related this scenario.
>
> Regards,
> Venkat
>
> --
> 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/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X9mnyYuGoEtS2DDKo4LTkTtpcaRg9FCa1X6G5F%2Br1UE%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: spark version, elasticsearch-hadoop version, akka version sync up

2015-03-17 Thread Jeff Steinmetz
Thank you for the summary - you are confirming (as a sanity check for 
myself): 

elasticsearch-hadoop beta3 (not snapshot) on spark core 1.1 only
elasticsearch-hadoop-beta3-SNAPSHOT with spark core 1.1, 1.2 and 1.3 -- as 
long as I don't use Spark SQL when using 1.2 and 1.3

Costin - I am amazed by your ability to keep all this straight - my head 
would explode dealing with all the dependencies in flux.  Kudos to you.


On Tuesday, March 17, 2015 at 2:12:06 PM UTC-7, Costin Leau wrote:
>
> es-hadoop doesn't depend on akka, only on Spark. The scala version that 
> es-hadoop is compiled against matches the one used by the Spark version 
> compiled against for each release - typically this shouldn't pose a problem.
>
> Unfortunately, despite the minor version increments, some of the Spark 
> APIs or components (in particular Spark SQL) have changed drastically 
> between each release breaking backwards compatibility. For example, Beta3 
> works until Spark 1.1 (which was the latest stable release during its 
> release) but not with 1.2. This is fixed in master however the current dev 
> build doesn't work with Spark SQL in the newly released 1.3 (does work with 
> Spark core).
>
> This has already been fixed locally however I'm having difficulties trying 
> to preserve compatibility across the Spark SQL 1.2 release and 1.3.
>
> Long story short, as long as the dependencies for Spark are in order, the 
> same should apply for es-hadoop as well since it relies only on Spark (and 
> Scala of course).
>
> On Tue, Mar 17, 2015 at 10:43 PM, Jeff Steinmetz  > wrote:
>
>> There are plenty of spark / akka / scala / elasticsearch-hadoop 
>> dependencies to keep track of.
>>
>> Is it true that elasticsearch-hadoop needs to be compiled for a specific 
>> spark version to run correctly on the cluster?  I'm also trying to keep 
>> track of the akka version and scala version.  i.e, wil es-hadoop compiled 
>> for spark 1.2  work with Spark 1.3 ?
>>
>> When the elasticsearch-hadoop versions are released, as v2.0 v2.1, 
>> v2.1.0.Beta3, at what point do we need to keep in mind what spark version 
>> it was also compiled against?
>> i.e., is it safe to assume the es-hadoop versions are tied to a specific 
>> spark core version?
>>
>> I've been keeping the following chart in my notes to see what all the 
>> versions are with all dependencies
>> =
>>
>> Akka Version  Dependencies
>> Current Akka Stable Release:  2.3.9
>>
>> Elasticsearch-Hadoop:  2.1.0Beta3 = Spark 1.1.0
>> Elasticsearch-Hadoop:  2.1.0Beta3-SNAPSHOT = Spark 1.2.1
>> Elasticsearch-Hadoop: what about spark 1.3 ?
>>
>> Spark: 1.3, Akka: 2.3.4-spark
>> Spark: 1.2, Akka: 2.3.4-spark
>> Spark: 1.1, Akka: 2.2.3-shaded-protobuf
>>
>> Activator 1.2.12 comes with with Akka 2.3.4
>>
>> Play 2.3.8, akka 2.3.4, scala 2.11.1 (will also work with 2.10.4 )
>> Play 2.2.x, akka 2.2.0
>>
>> Spark Job Server 0.4.1, Spark Core 1.1.0, Akka, 2.2.4
>> Spark Job Server Master as of Feb 22, 2015, Spark Core 1.2.0,  Akka 
>> 2.3.4, Scala 2.10.4
>>
>> Akka persistence latest 2.3.4 or later
>> Akka 2.3.9 is released for Scala 2.10.4 and 2.11.5
>>
>>
>>  -- 
>> 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 elasticsearc...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/28ad3f78-8b3d-450a-a29d-06d3e6636cfd%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/0c19d1fa-17b9-4e6e-a698-b49c7d6919d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PayloadTermQuery in ElasticSearch

2015-03-17 Thread joergpra...@gmail.com
I created an example payload plugin

https://github.com/jprante/elasticsearch-payload

but I can't get a custom per-field similarity to work.  Setting up a field
with a prebuilt similarity works flawlessly, but with a custom one, it is
not even listed in the mapping.

It looks like SimilarityLookupService fails to find custom similarities.

If someone can help in tracking down the issue, I'd be glad. Maybe I do
something wrong.

Jörg

On Tue, Mar 17, 2015 at 5:02 PM, Nikolas Everett  wrote:

> I imagine the right way to do this is with a plugin but I'm not 100% sure.
>
> On Tue, Mar 17, 2015 at 11:47 AM, Devaraja Swami 
> wrote:
>
>> I plan to store floats in the payload and boost the score
>> (multiplicatively) based on the average value of the payloads over the
>> occurrences of the matching term in the document. ie., exactly as in
>> AveragePayloadFunction in Lucene.
>>
>> On Tue, Mar 17, 2015 at 2:16 AM, joergpra...@gmail.com <
>> joergpra...@gmail.com> wrote:
>>
>>> The concrete implementation depends on what you store in the payload
>>> (e.g. scores)
>>>
>>> Jörg
>>>
>>> On Tue, Mar 17, 2015 at 7:01 AM, Devaraja Swami >> > wrote:
>>>
 I need to use PayloadTermQuery from Lucene.
 Does anyone know how I can use this in ElasticSearch?
 I am using ES 1.4.4, with the Java API.
 In Lucene, I could use this by directly instantiating PayloadTermQuery,
 but there are no APIs in ES QueryBuilders for this.
 I don't need a query parser, because I can build the query directly
 using the Java API (don't need a JSON representation of the query),
 so I only need to be able to construct, in Java, a query builder
 encapsulating a PayloadTermQuery.

 Thanks in advance!

 -devarajaswami

  --
 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/8fc84082-6fc7-42aa-9caf-8ab527bc8a0b%40googlegroups.com
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>  --
>>> 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/CAKdsXoFwk_Ve_OK9J%2BfsEzGwbtOnaL7%2BeqT%3DR61hCoX8Mzi-fQ%40mail.gmail.com
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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/CABMSir6hF%3DuM1jp0jgoBq_v30YNVB-8JLF7PLyvFjyXbdqtLvg%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CAPmjWd2%2B-YFPsRVB0QywSuMFEVXL-UgQyxJRGBjGn4Lw0KWT4A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAKdsXoEO1XqR0SdrJtRHPPONrL%2B1a6iGi3xBvQikxFkAS0pXLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Courier Fetch error, maybe due to lack of @timestamp?

2015-03-17 Thread Itamar Syn-Hershko
@timestamp is generated automatically by logstash, any documents not added
by logstash will not have it

--

Itamar Syn-Hershko
http://code972.com | @synhershko 
Freelance Developer & Consultant
Lucene.NET committer and PMC member

On Wed, Mar 18, 2015 at 12:51 AM, David Reagan  wrote:

> @timestamp has always been applied automatically. Only time I've ever
> touched it is when I've adjusted the date to what the log message holds,
> rather than when the log message is processed by logstash.
>
> So, I have no idea where it comes from, or how I could have turned it off
> on something.
>
> Is that in the template?
>
> --David Reagan
>
> On Tue, Mar 17, 2015 at 2:24 PM, Itamar Syn-Hershko 
> wrote:
>
>> Like the error suggests, "No mapping found for [@timestamp] in order to
>> sort on"
>>
>> Kibana expects a @timestamp field - make sure to push that in your source
>>
>> --
>>
>> Itamar Syn-Hershko
>> http://code972.com | @synhershko 
>> Freelance Developer & Consultant
>> Lucene.NET committer and PMC member
>>
>> On Tue, Mar 17, 2015 at 11:19 PM, David Reagan  wrote:
>>
>>> I keep getting an error like this: "Courier Fetch: 5 of 270 shards
>>> failed." in Kibana 4.0.1.
>>>
>>> After some Googling, I think it has something to do with @timestamp not
>>> existing for some of my data. But I'm not sure, because
>>> https://groups.google.com/d/topic/elasticsearch/L6AG3dZOGJ8/discussion
>>> was solved by not searching the kibana indexes. I'm only searching my
>>> logstash indexes. And I'm still getting that error.
>>>
>>> In kibana 4 I went to Settings->Indices and made sure I only have
>>> logstash-* listed under Index Patterns.
>>>
>>> I did recently update the template to what was in the logstash git HEAD.
>>>
>>> See http://pastebin.com/w7PmHxXS for my
>>> /var/log/elasticsearch/index.log output. As well as the template I'm using.
>>> It's at the bottom of the paste.
>>>
>>> I did check with curl -XGET '
>>> http://localhost:9200/_cat/shards?pretty=true' to see if any shards had
>>> issues. They all had "STARTED" as their status.
>>>
>>> Any suggestions?
>>>
>>> --
>>> 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/9d816fa6-62c4-4651-a1e3-30c4f9239f5a%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "elasticsearch" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/elasticsearch/dH6zw6swHBg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> elasticsearch+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zsf8HH4WFvF8geoDy4zNhWOX6Y6hEsaLv8E8xhc04F62A%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CANo%2B_AdzgruuC8mb5W2fKrxYi58tyBwak%2B-3g8w2hbWJTyRThw%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHTr4ZsPGBtn9cSLt6Dyz0M%2BEznMCFM0d0Chj1h4%3DwJFX3qTng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: correctly analyzed field not found by query_string search

2015-03-17 Thread Ryan Pedela
 For anyone who has a similar problem, I have figured out the issue. By 
default, it appears to me that only the _all field is searched. The _all 
field contains "pharmacy_docs" but not "pharmacy". If the search is 
modified to search the "name" fields then the search works. And if you 
wanted to support searching for "pharmacy_docs", you could add "_all" to 
the list such as:

curl 'http://localhost:9200/my_index/_search?pretty' -d '{
"query": {
"query_string": {
"fields": [ "_all", "name" ],
"query": "pharmacy_docs"
}
}
}'

-- 
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/352b95b7-0651-4d1e-88e1-44be6ebf2e6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Courier Fetch error, maybe due to lack of @timestamp?

2015-03-17 Thread David Reagan
@timestamp has always been applied automatically. Only time I've ever
touched it is when I've adjusted the date to what the log message holds,
rather than when the log message is processed by logstash.

So, I have no idea where it comes from, or how I could have turned it off
on something.

Is that in the template?

--David Reagan

On Tue, Mar 17, 2015 at 2:24 PM, Itamar Syn-Hershko 
wrote:

> Like the error suggests, "No mapping found for [@timestamp] in order to
> sort on"
>
> Kibana expects a @timestamp field - make sure to push that in your source
>
> --
>
> Itamar Syn-Hershko
> http://code972.com | @synhershko 
> Freelance Developer & Consultant
> Lucene.NET committer and PMC member
>
> On Tue, Mar 17, 2015 at 11:19 PM, David Reagan  wrote:
>
>> I keep getting an error like this: "Courier Fetch: 5 of 270 shards
>> failed." in Kibana 4.0.1.
>>
>> After some Googling, I think it has something to do with @timestamp not
>> existing for some of my data. But I'm not sure, because
>> https://groups.google.com/d/topic/elasticsearch/L6AG3dZOGJ8/discussion
>> was solved by not searching the kibana indexes. I'm only searching my
>> logstash indexes. And I'm still getting that error.
>>
>> In kibana 4 I went to Settings->Indices and made sure I only have
>> logstash-* listed under Index Patterns.
>>
>> I did recently update the template to what was in the logstash git HEAD.
>>
>> See http://pastebin.com/w7PmHxXS for my /var/log/elasticsearch/index.log
>> output. As well as the template I'm using. It's at the bottom of the paste.
>>
>> I did check with curl -XGET '
>> http://localhost:9200/_cat/shards?pretty=true' to see if any shards had
>> issues. They all had "STARTED" as their status.
>>
>> Any suggestions?
>>
>> --
>> 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/9d816fa6-62c4-4651-a1e3-30c4f9239f5a%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/dH6zw6swHBg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAHTr4Zsf8HH4WFvF8geoDy4zNhWOX6Y6hEsaLv8E8xhc04F62A%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANo%2B_AdzgruuC8mb5W2fKrxYi58tyBwak%2B-3g8w2hbWJTyRThw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Indexing and Searching XML documents

2015-03-17 Thread joergpra...@gmail.com
It strongly depends on the method how you want to convert XML to JSON and
vice versa.

Maybe this plugin can give you some hints about Jackson XML regarding
parsing and formatting

https://github.com/jprante/elasticsearch-xml

Do not expect XML schema, validation, or XSL stylesheet, this is not
included.

Jörg

On Tue, Mar 17, 2015 at 11:17 PM, Venkat Ankam  wrote:

> I have a requirement to index and search millions of XML documents related
> to mortgage (Uniform Closing Dataset XMLs).
>
> Indexed data will be requested by a web services of many internal
> applications through REST API.
>
> Output should be in XML format.
>
> How do I implement this in ELK stack?  How to convert XML input to JSON
> and how to get output in XML format?
>
> Request you to share any examples related this scenario.
>
> Regards,
> Venkat
>
> --
> 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/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAKdsXoGPWOG9J6qa9rnOVBfzjGORL3oKpR%3DmNrzj4oTNkEQW9Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: large number of indexes for multi-tenant product

2015-03-17 Thread Mark Walkom
This is a super timely blog from the Found crew -
https://found.no/foundation/multi-tenancy/

On 17 March 2015 at 14:11, Mark Walkom  wrote:

> There are practical limits, based on your dataset, node sizing, version
> etc.
>
> You'd be better off segregating indices by a higher level definition (eg
> customer number, 1-999, 1000-1999 etc), using routing and then aliases on
> top. This way you conceptually get the same layout as a single index per
> customer, but it gives you the option to split larger customers out to
> their own index and without wasting resources on small use customers.
>
> On 16 March 2015 at 19:11, Richard Blaylock  wrote:
>
>> Hi all,
>>
>> We have a multi-tenant product and are leaning towards dynamically
>> creating (and deleting) various indexes relevant to a tenant at runtime: as
>> a tenant is created, so are that tenant's indexes.  When a tenant is
>> deleted so are that tenant's indexes.  Each index is specific to that
>> tenant and could vary in size, but we do not expect any given index to ever
>> be larger than a single disk (e.g. 80 GB).
>>
>> Due to index shard issues (static, too many shards per index = a hit on
>> performance (more map/reduce work to do), etc.), and due to the nature of
>> our application, we are currently opting for a single-shard-per-index model
>> - each index will have one and only one shard.  We will have replicas for
>> fault tolerance.
>>
>> On the surface, this appears to be an ideal design choice for
>> multi-tenant applications: for any given index, one and only one shard will
>> be 'hit' - no need to search across multiple shards, ever.  It also reduces
>> contention because indexes are always tenant-specific: as an index becomes
>> larger, any slowness due to the large index *only* impacts the
>> corresponding tenant (customer), whereas the alternative - using one index
>> across tenants - one tenant's use/load could negatively impact other
>> tenants' query performance.
>>
>> So for multi-tenancy, this single-shard-per-index model sounds ideal for
>> our use case - the *only* issue here is that the number of indexes
>> increases dramatically as the number of tenants (customers) increases.
>> Consider a system with 20,000 tenants, each having (potentially) hundreds
>> or thousands, or even 10s of thousands of indexes, resulting in millions of
>> indexes overall.  This is manageable from our product's perspective, but
>> what impact would this have on ElasticSearch, if any?
>>
>> Are there practical limits? IIUC, there is a Lucene index (file) per
>> shard, so if there are hundreds of thousands or millions of Lucene
>> indexes/files - other than disk space and file descriptor count per ES
>> node, are there any other limits?  Does performance degrade as the number
>> of single-shard-indexes increases?  Or is there no problem at all?
>>
>> Thanks,
>> Richard
>>
>> --
>> 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/607f62c1-5854-43e0-9d25-3f748aca44a4%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/CAEYi1X99jYR7a%2BYuf3o-C_bxE5OvxybTAKr2rQL4HEEDqS0R6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ElasticSearch documents relationship question

2015-03-17 Thread Mark Walkom
Take a look at
http://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html
to get you started.

On 17 March 2015 at 15:07, Mithrawnuroudo  wrote:

> Could you help me to model architecture of storing posts and comments in
> ElasticSearch?
>
> Currenlty i have simple data structure - I store in ES "posts" as
> documents in ES index. I do search on that index to find posts with
> particular words. Posts are not related to anything. Every post has unique
> url and that's it. Simple.
>
> I want to add possibility to store comments to post."Comments" will be
> special version of "posts" - comment has parent(other post) and comments
> have particular order between other comments of their parent. I wonder how
> should i model relationship between posts/comments and which ES data
> structure should i use. I don't know anything about documents relationship
> in Elasticsearch, so any help will be great.
>
> --
> 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/e262e145-3b1f-45f0-a374-a6b2dd8ad189%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X9UMUeaXp%2BTa%2BGr9apsJeXCxtv8caMc9hhgdWx%3D_mN--g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch - transport client singleton

2015-03-17 Thread David Pilato
Yes!

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 17 mars 2015 à 11:23, Александр Свиридов  a écrit :
> 
> I am newbie in elastic and I don't understand how should I work with 
> transport client connections. Should I use singleton for Client, something 
> like
> 
> class ElasticClientManager {
>   private static Client client;
>  
>  public static Client getClient(){
> if (client==null) {
>   Settings settings = ImmutableSettings.settingsBuilder()
> .put("cluster.name", "elasticsearch")
> .put("client.transport.sniff", true).build();
> 
>client = new TransportClient(settings)
> .addTransportAddress(new 
> InetSocketTransportAddress("localhost",9300));
> }
>return client;
>  }
> }
> 
> By other words - I create one client and keep the reference in it in 
> singleton. Every time I need to query elastic I do
> 
> Client client = ElasticClientManager.getClient();
> GetResponse getResponse = client.prepareGet().execute().actionGet();
> 
> Is such approach right?
> 
> 
> -- 
> Александр Свиридов
> -- 
> 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/1426616605.710285922%40f217.i.mail.ru.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/6268C917-24DD-4081-A012-9BE565539438%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.


Indexing and Searching XML documents

2015-03-17 Thread Venkat Ankam
I have a requirement to index and search millions of XML documents related
to mortgage (Uniform Closing Dataset XMLs).

Indexed data will be requested by a web services of many internal
applications through REST API.

Output should be in XML format.

How do I implement this in ELK stack?  How to convert XML input to JSON and
how to get output in XML format?

Request you to share any examples related this scenario.

Regards,
Venkat

-- 
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/CAMVHyg2Y826yt1o6yMW9pjwE3bFdWTVouAFQhZuiktjvnZV4Zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ElasticSearch documents relationship question

2015-03-17 Thread Mithrawnuroudo
 

Could you help me to model architecture of storing posts and comments in 
ElasticSearch?

Currenlty i have simple data structure - I store in ES "posts" as documents 
in ES index. I do search on that index to find posts with particular words. 
Posts are not related to anything. Every post has unique url and that's it. 
Simple.

I want to add possibility to store comments to post."Comments" will be 
special version of "posts" - comment has parent(other post) and comments 
have particular order between other comments of their parent. I wonder how 
should i model relationship between posts/comments and which ES data 
structure should i use. I don't know anything about documents relationship 
in Elasticsearch, so any help will be great.

-- 
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/e262e145-3b1f-45f0-a374-a6b2dd8ad189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Courier Fetch error, maybe due to lack of @timestamp?

2015-03-17 Thread Itamar Syn-Hershko
Like the error suggests, "No mapping found for [@timestamp] in order to
sort on"

Kibana expects a @timestamp field - make sure to push that in your source

--

Itamar Syn-Hershko
http://code972.com | @synhershko 
Freelance Developer & Consultant
Lucene.NET committer and PMC member

On Tue, Mar 17, 2015 at 11:19 PM, David Reagan  wrote:

> I keep getting an error like this: "Courier Fetch: 5 of 270 shards
> failed." in Kibana 4.0.1.
>
> After some Googling, I think it has something to do with @timestamp not
> existing for some of my data. But I'm not sure, because
> https://groups.google.com/d/topic/elasticsearch/L6AG3dZOGJ8/discussion
> was solved by not searching the kibana indexes. I'm only searching my
> logstash indexes. And I'm still getting that error.
>
> In kibana 4 I went to Settings->Indices and made sure I only have
> logstash-* listed under Index Patterns.
>
> I did recently update the template to what was in the logstash git HEAD.
>
> See http://pastebin.com/w7PmHxXS for my /var/log/elasticsearch/index.log
> output. As well as the template I'm using. It's at the bottom of the paste.
>
> I did check with curl -XGET 'http://localhost:9200/_cat/shards?pretty=true'
> to see if any shards had issues. They all had "STARTED" as their status.
>
> Any suggestions?
>
> --
> 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/9d816fa6-62c4-4651-a1e3-30c4f9239f5a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHTr4Zsf8HH4WFvF8geoDy4zNhWOX6Y6hEsaLv8E8xhc04F62A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Courier Fetch error, maybe due to lack of @timestamp?

2015-03-17 Thread David Reagan
I keep getting an error like this: "Courier Fetch: 5 of 270 shards failed." 
in Kibana 4.0.1.

After some Googling, I think it has something to do with @timestamp not 
existing for some of my data. But I'm not sure, because 
https://groups.google.com/d/topic/elasticsearch/L6AG3dZOGJ8/discussion was 
solved by not searching the kibana indexes. I'm only searching my logstash 
indexes. And I'm still getting that error.

In kibana 4 I went to Settings->Indices and made sure I only have 
logstash-* listed under Index Patterns.

I did recently update the template to what was in the logstash git HEAD.

See http://pastebin.com/w7PmHxXS for my /var/log/elasticsearch/index.log 
output. As well as the template I'm using. It's at the bottom of the paste.

I did check with curl -XGET 'http://localhost:9200/_cat/shards?pretty=true' 
to see if any shards had issues. They all had "STARTED" as their status.

Any suggestions? 

-- 
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/9d816fa6-62c4-4651-a1e3-30c4f9239f5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: spark version, elasticsearch-hadoop version, akka version sync up

2015-03-17 Thread Costin Leau
es-hadoop doesn't depend on akka, only on Spark. The scala version that
es-hadoop is compiled against matches the one used by the Spark version
compiled against for each release - typically this shouldn't pose a problem.

Unfortunately, despite the minor version increments, some of the Spark APIs
or components (in particular Spark SQL) have changed drastically between
each release breaking backwards compatibility. For example, Beta3 works
until Spark 1.1 (which was the latest stable release during its release)
but not with 1.2. This is fixed in master however the current dev build
doesn't work with Spark SQL in the newly released 1.3 (does work with Spark
core).

This has already been fixed locally however I'm having difficulties trying
to preserve compatibility across the Spark SQL 1.2 release and 1.3.

Long story short, as long as the dependencies for Spark are in order, the
same should apply for es-hadoop as well since it relies only on Spark (and
Scala of course).

On Tue, Mar 17, 2015 at 10:43 PM, Jeff Steinmetz <
jeffrey.steinm...@gmail.com> wrote:

> There are plenty of spark / akka / scala / elasticsearch-hadoop
> dependencies to keep track of.
>
> Is it true that elasticsearch-hadoop needs to be compiled for a specific
> spark version to run correctly on the cluster?  I'm also trying to keep
> track of the akka version and scala version.  i.e, wil es-hadoop compiled
> for spark 1.2  work with Spark 1.3 ?
>
> When the elasticsearch-hadoop versions are released, as v2.0 v2.1,
> v2.1.0.Beta3, at what point do we need to keep in mind what spark version
> it was also compiled against?
> i.e., is it safe to assume the es-hadoop versions are tied to a specific
> spark core version?
>
> I've been keeping the following chart in my notes to see what all the
> versions are with all dependencies
> =
>
> Akka Version  Dependencies
> Current Akka Stable Release:  2.3.9
>
> Elasticsearch-Hadoop:  2.1.0Beta3 = Spark 1.1.0
> Elasticsearch-Hadoop:  2.1.0Beta3-SNAPSHOT = Spark 1.2.1
> Elasticsearch-Hadoop: what about spark 1.3 ?
>
> Spark: 1.3, Akka: 2.3.4-spark
> Spark: 1.2, Akka: 2.3.4-spark
> Spark: 1.1, Akka: 2.2.3-shaded-protobuf
>
> Activator 1.2.12 comes with with Akka 2.3.4
>
> Play 2.3.8, akka 2.3.4, scala 2.11.1 (will also work with 2.10.4 )
> Play 2.2.x, akka 2.2.0
>
> Spark Job Server 0.4.1, Spark Core 1.1.0, Akka, 2.2.4
> Spark Job Server Master as of Feb 22, 2015, Spark Core 1.2.0,  Akka 2.3.4,
> Scala 2.10.4
>
> Akka persistence latest 2.3.4 or later
> Akka 2.3.9 is released for Scala 2.10.4 and 2.11.5
>
>
>  --
> 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/28ad3f78-8b3d-450a-a29d-06d3e6636cfd%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJogdmf9z8JjP_LWTjObDuKiE4DzdSOH2rA%3DdbtkfqQakXYbkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: large number of indexes for multi-tenant product

2015-03-17 Thread Mark Walkom
There are practical limits, based on your dataset, node sizing, version etc.

You'd be better off segregating indices by a higher level definition (eg
customer number, 1-999, 1000-1999 etc), using routing and then aliases on
top. This way you conceptually get the same layout as a single index per
customer, but it gives you the option to split larger customers out to
their own index and without wasting resources on small use customers.

On 16 March 2015 at 19:11, Richard Blaylock  wrote:

> Hi all,
>
> We have a multi-tenant product and are leaning towards dynamically
> creating (and deleting) various indexes relevant to a tenant at runtime: as
> a tenant is created, so are that tenant's indexes.  When a tenant is
> deleted so are that tenant's indexes.  Each index is specific to that
> tenant and could vary in size, but we do not expect any given index to ever
> be larger than a single disk (e.g. 80 GB).
>
> Due to index shard issues (static, too many shards per index = a hit on
> performance (more map/reduce work to do), etc.), and due to the nature of
> our application, we are currently opting for a single-shard-per-index model
> - each index will have one and only one shard.  We will have replicas for
> fault tolerance.
>
> On the surface, this appears to be an ideal design choice for multi-tenant
> applications: for any given index, one and only one shard will be 'hit' -
> no need to search across multiple shards, ever.  It also reduces contention
> because indexes are always tenant-specific: as an index becomes larger, any
> slowness due to the large index *only* impacts the corresponding tenant
> (customer), whereas the alternative - using one index across tenants - one
> tenant's use/load could negatively impact other tenants' query performance.
>
> So for multi-tenancy, this single-shard-per-index model sounds ideal for
> our use case - the *only* issue here is that the number of indexes
> increases dramatically as the number of tenants (customers) increases.
> Consider a system with 20,000 tenants, each having (potentially) hundreds
> or thousands, or even 10s of thousands of indexes, resulting in millions of
> indexes overall.  This is manageable from our product's perspective, but
> what impact would this have on ElasticSearch, if any?
>
> Are there practical limits? IIUC, there is a Lucene index (file) per
> shard, so if there are hundreds of thousands or millions of Lucene
> indexes/files - other than disk space and file descriptor count per ES
> node, are there any other limits?  Does performance degrade as the number
> of single-shard-indexes increases?  Or is there no problem at all?
>
> Thanks,
> Richard
>
> --
> 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/607f62c1-5854-43e0-9d25-3f748aca44a4%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X_UA2XX8M8bDCCS%2Bx4p9Ta5-nk1vj45pLh9JDSePY0AGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch high heap usage

2015-03-17 Thread Mark Walkom
Take a look at
http://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html

On 16 March 2015 at 20:29,  wrote:

> Hello Mark,
>
> Thanks for your answer! We are using the default values, so no doc_values.
> I did some research about it and it sounds very interesting and helpful to
> keep the heap usage lower.
> How can I add doc_values: true to the index template so that the new daily
> based generated indexes using this feature.
>
> Cheers
> Chris
>
> On Monday, March 16, 2015 at 11:36:13 AM UTC+7, Mark Walkom wrote:
>>
>> Those are reasonably large documents. You also seem to have a lot of
>> shards for the data.
>>
>> What sort of data is it, are you using doc values, how are you bucketing
>> data (ie time series indices)?
>>
>> On 15 March 2015 at 20:39,  wrote:
>>
>>> Hello,
>>>
>>> We have a 2 node elasticsearch cluster which is used by logstash to
>>> store log files. The current input is around 100 documents (logs) per
>>> second wit a size of around 50kb - 150kb.
>>> Compared to what i have read so far this is not a high amount but we
>>> experience already a high heap usage 70% form the total of 11GB heap size,
>>> the system has in total 32GB RAM. CPU and IO are totally fine.
>>>
>>> Any suggestion highly appreciated!
>>>
>>> Cheers
>>> Chris
>>>
>>> 
>>>
>>>  --
>>> 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 elasticsearc...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/elasticsearch/c2679cad-72ec-472f-a009-a6c9e2abbb9d%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> 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/bdd6d405-61b4-449d-b1ce-3f95bdf8b0c2%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X89%3D9nd1AVZGvu7TWSM7%2BA_dNsVo%3D9Z0YcxNT%3DsNc6msQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


spark version, elasticsearch-hadoop version, akka version sync up

2015-03-17 Thread Jeff Steinmetz
There are plenty of spark / akka / scala / elasticsearch-hadoop 
dependencies to keep track of.

Is it true that elasticsearch-hadoop needs to be compiled for a specific 
spark version to run correctly on the cluster?  I'm also trying to keep 
track of the akka version and scala version.  i.e, wil es-hadoop compiled 
for spark 1.2  work with Spark 1.3 ?

When the elasticsearch-hadoop versions are released, as v2.0 v2.1, 
v2.1.0.Beta3, at what point do we need to keep in mind what spark version 
it was also compiled against?
i.e., is it safe to assume the es-hadoop versions are tied to a specific 
spark core version?

I've been keeping the following chart in my notes to see what all the 
versions are with all dependencies
=

Akka Version  Dependencies
Current Akka Stable Release:  2.3.9

Elasticsearch-Hadoop:  2.1.0Beta3 = Spark 1.1.0
Elasticsearch-Hadoop:  2.1.0Beta3-SNAPSHOT = Spark 1.2.1
Elasticsearch-Hadoop: what about spark 1.3 ?

Spark: 1.3, Akka: 2.3.4-spark
Spark: 1.2, Akka: 2.3.4-spark
Spark: 1.1, Akka: 2.2.3-shaded-protobuf

Activator 1.2.12 comes with with Akka 2.3.4

Play 2.3.8, akka 2.3.4, scala 2.11.1 (will also work with 2.10.4 )
Play 2.2.x, akka 2.2.0

Spark Job Server 0.4.1, Spark Core 1.1.0, Akka, 2.2.4
Spark Job Server Master as of Feb 22, 2015, Spark Core 1.2.0,  Akka 2.3.4, 
Scala 2.10.4

Akka persistence latest 2.3.4 or later
Akka 2.3.9 is released for Scala 2.10.4 and 2.11.5


-- 
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/28ad3f78-8b3d-450a-a29d-06d3e6636cfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Number of shards in 4 node Cluster

2015-03-17 Thread Andrew Selden
I typically suggest to start with the default of 5 shards. A single shard can 
hold several tens of gigabytes. Certainly in your case it seems like 20 shards 
is overkill for a 4 node cluster. 


> On Mar 17, 2015, at 11:00 AM, John S  wrote:
> 
> Hi All,
> 
> Is there any best practices of having on the number of shards for a cluster? 
> I have a 4 node cluster and used shards of 20.
> 
> During any node failure or other events i doubts since the shards number is 
> high, replication to new node is taking more time...
> 
> Is there any metrics or formula to be done for number or shards?
> 
> Regards
> John
> 
> -- 
> 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/6e51f1e4-8938-4196-84a9-007705869b6a%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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/DD2AA858-ABD4-49F5-9F9C-D73C01F615CE%40elastic.co.
For more options, visit https://groups.google.com/d/optout.


Re: Number of shards in 4 node Cluster

2015-03-17 Thread Mark Walkom
What sort of data do you have, time based or static? If it's the former
then going with any arbitrary number is less of a problem as you can change
this the next roll over period. If it's static then 4 would be a good start.

There aren't any metrics around this, other than *not* creating a large
number to start with, as each shard is a lucene instance and does take
resources.

On 17 March 2015 at 11:00, John S  wrote:

> Hi All,
>
> Is there any best practices of having on the number of shards for a
> cluster? I have a 4 node cluster and used shards of 20.
>
> During any node failure or other events i doubts since the shards number
> is high, replication to new node is taking more time...
>
> Is there any metrics or formula to be done for number or shards?
>
> Regards
> John
>
> --
> 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/6e51f1e4-8938-4196-84a9-007705869b6a%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X_B9mxm9xnJtzoSc-tj1G-MoZ7vdQ-ye%2B7woLfj7aRHJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Sorting and range filtering semantic versions

2015-03-17 Thread Mike Turley
Did you ever find a good solution for this?  I am trying to solve the same 
problem (just sorting, not range filtering).

On Monday, January 26, 2015 at 2:47:30 AM UTC-5, Eric Smith wrote:
>
> I am trying to figure out some sort of indexing scheme where I can do 
> range filters on semantic versions .  Values look 
> like these:
>
> "1.0.2.5", "1.10.2.5", "2.3.434.1"
>
> I know that I can add a separate field with the numbers padded out, but I 
> was hoping to have a single field where I could do things like this:
>
> "version:>1.0" "version:1.0.2.5" "version:1.0" "version:[1.0 TO 2.0]"
>
> I have created some pattern capture filters to allow querying partial 
> version numbers. I even created some pattern replacement filters to pad the 
> values out so that they could be lexicographically sorted, but those 
> filters only control the tokens that are indexed and not the value that is 
> used for sorting and range filters.
>
> Is there a way to customize the value that is used for sorting and range 
> filters?  It seems like it just uses the original value and I don't have 
> any control of it?
>
> Any help would be greatly appreciated!
>

-- 
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/2a80f6c9-ae8e-4df9-a1df-30e3eda6697f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why does creating a repository fail?

2015-03-17 Thread David Reagan
According to http://www.kernelcrash.com/blog/nfs-uidgid-mapping/2007/09/10/
the method described in that post only applies to old, out of date,
systems.

I also found no mention of a map file in
http://linux.die.net/man/8/mount.nfs or http://linux.die.net/man/5/nfs

The closest I found to something I could use was
http://serverfault.com/questions/514118/mapping-uid-and-gid-of-local-user-to-the-mounted-nfs-share
But it seems to only apply to nfs version 4. We, for some reason, are on
version 3.

Hmm... Would adding the suid flag to the mount help?


As for iSCSI, it doesn't matter if the file system sees it as a local
device. Currently my file system sees my nfs mounts as pretty much local
mounts. But it still thinks that some of my elasticsearch owned files are
actually owned by my ntp user... I don't see how "formatting however I
want" will help with that kind of issue. Permissions are set by uid and
gid, not the name. Unless iSCSI has some feature that overrides that.

--David Reagan

On Tue, Mar 17, 2015 at 11:11 AM, Mark Walkom  wrote:

> iSCSI can be mounted as a block device that you can format however you
> want, if you do it that way the uid problem won't show up as the system
> sees it as a local FS.
>
> On 17 March 2015 at 09:00, David Reagan  wrote:
>
>> @Mark Walkom, So, I'm looking into iscsi. From what I have learned so
>> far, you actually format the LUN with whatever file system you want. So,
>> wouldn't the gid/uid issue show up there as well, if I formatted to ext3 or
>> ext4? Since Ubuntu would treat it like a normal partition and use typical
>> linux file perms on it.
>>
>> --David Reagan
>>
>> On Mon, Mar 16, 2015 at 5:37 PM, David Reagan  wrote:
>>
>>> If I were manually creating the elasticsearch user, that'd be easy. But
>>> I'm relying on apt to do the job for me. So, yeah...
>>>
>>> Hmm... I suppose I could manually create an elasticsearch2 user, then
>>> modify the defaults files to use it when running ES. Still seems clunky...
>>>
>>> --David Reagan
>>>
>>> On Mon, Mar 16, 2015 at 5:20 PM, Andrew Selden 
>>> wrote:
>>>
 I’m not that familiar with iSCSI so I hesitate to say for sure, but
 anytime you are cross-mounting filesystems on Linux you have to take
 uid/gid consistency into account.

 - Andrew

 On Mar 16, 2015, at 4:46 PM, David Reagan  wrote:

 Would an iSCSI mount have the same issue? I believe our SAN supports
 both.

 --David Reagan

 On Mon, Mar 16, 2015 at 4:40 PM, Andrew Selden 
 wrote:

> Hi David,
>
> This is a common problem with NFS. Unfortunately the protocol assumes
> identical uid/gid mappings across all machines. It’s just one of those
> annoying sys-admin tasks that one has to take into account when using NFS.
> To get your permissions back to less permissive settings you will have to
> edit the /etc/passwd and /etc/group files to keep them in sync.
>
> See http://www.tldp.org/HOWTO/NFS-HOWTO/troubleshooting.html#SYMPTOM4
> for more context.
>
> - Andrew
>
>
> On Mar 16, 2015, at 4:04 PM, David Reagan  wrote:
>
> First, it is a file permissions issue. I did get snapshots to run when
> I chmoded to 777. As you can see from the ls output, /mounts/prod_backup 
> is
> 777. Prior to that it was 775 or 755. So, I could revise my question to
> "How can I get snapshots working without using insecure file permissions?"
>
> root@log-elasticsearch-01:~# mount
> /dev/mapper/ws--template--01-root on / type ext4 (rw,errors=remount-ro)
> proc on /proc type proc (rw,noexec,nosuid,nodev)
> sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
> none on /sys/fs/fuse/connections type fusectl (rw)
> none on /sys/kernel/debug type debugfs (rw)
> none on /sys/kernel/security type securityfs (rw)
> udev on /dev type devtmpfs (rw,mode=0755)
> devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
> tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
> none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
> none on /run/shm type tmpfs (rw,nosuid,nodev)
> /dev/sda1 on /boot type ext2 (rw)
> rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
> nfsip:/vol/Logs/prod_backup on /mounts/prod_backup type nfs
> (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
> nfsip:/vol/Logs/log-elasticsearch-01 on /mounts/log-elasticsearch-01
> type nfs (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
>
> root@log-elasticsearch-01:~# ls -ld /mounts
> drwxr-xr-x 6 root root 4096 Oct  1 13:43 /mounts
>
> root@log-elasticsearch-01:~# ls -ld /mounts/prod_backup/
> drwxrwxrwx 4 elasticsearch elasticsearch 4096 Mar 16 13:41
> /mounts/prod_backup/
>
> --David Reagan
>
> On Mon, Mar 16, 2015 at 3:47 PM, Mark Walkom 
> wrote:
>
>> Can you post the output from *mount* and *ls -ld /mounts
>> /mounts/pr

Re: What's wrong with this query?

2015-03-17 Thread Roger de Cordova Farias
Look at this example on how to use multiple filters:
http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-filtered-query.html#_multiple_filters

You should wrap them on a bool filter

2015-03-17 15:32 GMT-03:00 jrkroeg :

> I'm trying to get the top 100 documents which match the filtered criteria,
> and sort by distance from the pin.location.
>
> Here's my query - which isn't resulting in error, but should be returning
> results:
>
> {
>  "query": {
>  "filtered": {
>  "query": {
>  "match_all": {}
>  },
>  "filter": [
>  {
>  "term": {
>  "searchTerm1": "N"
>  }
>  },
>  {
>  "term": {
>  "searchTerm2": "Y"
>  }
>  },
>  {
>  "term": {
>  "searchTerm3": "Y"
>  }
>  },
>  {
>  "term": {
>  "searchTerm4": "Y"
>  }
>  }
>  ]
>  }
>  },
> "sort": [
> {
> "_geo_distance": {
> "pin.location": {
> "lat": 34.073620,
> "lon": -118.400356
> },
> "order": "asc",
> "unit": "mi"
> }
> }
> ],
> "size": 100
> }
>
>
> On a separate note, I'd like to find a way to make the filter more of a
> suggestion, rather than forced - how would I achieve this?
>
> --
> 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/22379295-332d-4ebe-aef3-6c9b2326e755%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAJp2533a5NcTmSnSYBDTJtmPpVk9a1vyiO9TZkYnPqdyP3TwnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2015-03-17 Thread fayez joell
YouTube videos of



 U.S. Congress money laundering hearing


of

Saudi Billionaire  " Maan  Al sanea"

 with *bank of America*


and  The  owner of Saad Hospital and  Schools

 in the Eastern Province in *Saudi Arabia*



and the Chairman of the Board of Directors of Awal Bank  in *Bahrain*


With Arabic Subtitles


http://www.youtube.com/watch?v=mIBNnQvhU8s





*موقع اليوتيوب الذي عرض جلسة استماع الكونجرس الأمريكي *

* لمتابعة نشاطات غسل الأموال ونشاطات*



*السعودي معن عبدالواحد الصانع*



*مالك مستشفى  وشركة سعد  ومدارس سعد بالمنطقة الشرقية بالسعودية   ورئيس مجلس
ادارة بنك اوال البحريني*



*مترجم باللغة العربية*



http://www.youtube.com/watch?v=mIBNnQvhU8s

-- 
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/CAJNWts0XK4DAXzqN%2B2MNUiRCvLht7v1b-Cs-zfUFK2RphjQ%2BHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


What's wrong with this query?

2015-03-17 Thread jrkroeg
I'm trying to get the top 100 documents which match the filtered criteria, 
and sort by distance from the pin.location.

Here's my query - which isn't resulting in error, but should be returning 
results:

{
 "query": {
 "filtered": {
 "query": {
 "match_all": {}
 },
 "filter": [
 {
 "term": {
 "searchTerm1": "N"
 }
 },
 {
 "term": {
 "searchTerm2": "Y"
 }
 },
 {
 "term": {
 "searchTerm3": "Y"
 }
 },
 {
 "term": {
 "searchTerm4": "Y"
 }
 }
 ]
 }
 },
"sort": [
{
"_geo_distance": {
"pin.location": {
"lat": 34.073620,
"lon": -118.400356
},
"order": "asc",
"unit": "mi"
}
}
],
"size": 100
}


On a separate note, I'd like to find a way to make the filter more of a 
suggestion, rather than forced - how would I achieve this?

-- 
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/22379295-332d-4ebe-aef3-6c9b2326e755%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Elasticsearch - transport client singleton

2015-03-17 Thread Александр Свиридов
 I am newbie in elastic and I don't understand how should I work with transport 
client connections. Should I use singleton for Client, something like

class ElasticClientManager {
  private static Client client;
 
 public static Client getClient(){
    if (client==null) {
  Settings settings = ImmutableSettings.settingsBuilder()
    .put("cluster.name", "elasticsearch")
    .put("client.transport.sniff", true).build();

   client = new TransportClient(settings)
    .addTransportAddress(new 
InetSocketTransportAddress("localhost",9300));
    }
   return client;
 }
}

By other words - I create one client and keep the reference in it in singleton. 
Every time I need to query elastic I do

Client client = ElasticClientManager.getClient();
GetResponse getResponse = client.prepareGet().execute().actionGet();

Is such approach right?


-- 
Александр Свиридов

-- 
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/1426616605.710285922%40f217.i.mail.ru.
For more options, visit https://groups.google.com/d/optout.


Elasticsearch - transport client singleton

2015-03-17 Thread Александр Свиридов
 I am newbie in elastic and I don't understand how should I work with transport 
client connections. Should I use singleton for Client, something like

class ElasticClientManager {
  private static Client client;
 
 public static Client getClient(){
    if (client==null) {
  Settings settings = ImmutableSettings.settingsBuilder()
    .put("cluster.name", "elasticsearch")
    .put("client.transport.sniff", true).build();

   client = new TransportClient(settings)
    .addTransportAddress(new 
InetSocketTransportAddress("localhost",9300));
    }
   return client;
 }
}

By other words - I create one client and keep the reference in it in singleton. 
Every time I need to query elastic I do

Client client = ElasticClientManager.getClient();
GetResponse getResponse = client.prepareGet().execute().actionGet();

Is such approach right? 

-- 
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/1426616386.538391541%40f217.i.mail.ru.
For more options, visit https://groups.google.com/d/optout.


Re: Why does creating a repository fail?

2015-03-17 Thread Mark Walkom
iSCSI can be mounted as a block device that you can format however you
want, if you do it that way the uid problem won't show up as the system
sees it as a local FS.

On 17 March 2015 at 09:00, David Reagan  wrote:

> @Mark Walkom, So, I'm looking into iscsi. From what I have learned so far,
> you actually format the LUN with whatever file system you want. So,
> wouldn't the gid/uid issue show up there as well, if I formatted to ext3 or
> ext4? Since Ubuntu would treat it like a normal partition and use typical
> linux file perms on it.
>
> --David Reagan
>
> On Mon, Mar 16, 2015 at 5:37 PM, David Reagan  wrote:
>
>> If I were manually creating the elasticsearch user, that'd be easy. But
>> I'm relying on apt to do the job for me. So, yeah...
>>
>> Hmm... I suppose I could manually create an elasticsearch2 user, then
>> modify the defaults files to use it when running ES. Still seems clunky...
>>
>> --David Reagan
>>
>> On Mon, Mar 16, 2015 at 5:20 PM, Andrew Selden  wrote:
>>
>>> I’m not that familiar with iSCSI so I hesitate to say for sure, but
>>> anytime you are cross-mounting filesystems on Linux you have to take
>>> uid/gid consistency into account.
>>>
>>> - Andrew
>>>
>>> On Mar 16, 2015, at 4:46 PM, David Reagan  wrote:
>>>
>>> Would an iSCSI mount have the same issue? I believe our SAN supports
>>> both.
>>>
>>> --David Reagan
>>>
>>> On Mon, Mar 16, 2015 at 4:40 PM, Andrew Selden 
>>> wrote:
>>>
 Hi David,

 This is a common problem with NFS. Unfortunately the protocol assumes
 identical uid/gid mappings across all machines. It’s just one of those
 annoying sys-admin tasks that one has to take into account when using NFS.
 To get your permissions back to less permissive settings you will have to
 edit the /etc/passwd and /etc/group files to keep them in sync.

 See http://www.tldp.org/HOWTO/NFS-HOWTO/troubleshooting.html#SYMPTOM4
 for more context.

 - Andrew


 On Mar 16, 2015, at 4:04 PM, David Reagan  wrote:

 First, it is a file permissions issue. I did get snapshots to run when
 I chmoded to 777. As you can see from the ls output, /mounts/prod_backup is
 777. Prior to that it was 775 or 755. So, I could revise my question to
 "How can I get snapshots working without using insecure file permissions?"

 root@log-elasticsearch-01:~# mount
 /dev/mapper/ws--template--01-root on / type ext4 (rw,errors=remount-ro)
 proc on /proc type proc (rw,noexec,nosuid,nodev)
 sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
 none on /sys/fs/fuse/connections type fusectl (rw)
 none on /sys/kernel/debug type debugfs (rw)
 none on /sys/kernel/security type securityfs (rw)
 udev on /dev type devtmpfs (rw,mode=0755)
 devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
 tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
 none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
 none on /run/shm type tmpfs (rw,nosuid,nodev)
 /dev/sda1 on /boot type ext2 (rw)
 rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
 nfsip:/vol/Logs/prod_backup on /mounts/prod_backup type nfs
 (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
 nfsip:/vol/Logs/log-elasticsearch-01 on /mounts/log-elasticsearch-01
 type nfs (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)

 root@log-elasticsearch-01:~# ls -ld /mounts
 drwxr-xr-x 6 root root 4096 Oct  1 13:43 /mounts

 root@log-elasticsearch-01:~# ls -ld /mounts/prod_backup/
 drwxrwxrwx 4 elasticsearch elasticsearch 4096 Mar 16 13:41
 /mounts/prod_backup/

 --David Reagan

 On Mon, Mar 16, 2015 at 3:47 PM, Mark Walkom 
 wrote:

> Can you post the output from *mount* and *ls -ld /mounts
> /mounts/prod_backup*?
>
> On 16 March 2015 at 13:33, David Reagan  wrote:
>
>> Why does this happen?
>>
>>
>> curl -XPUT 'http://localhost:9200/_snapshot/my_backup?pretty=true'
>>> -d '{
>>> > "type": "fs",
>>> > "settings": {
>>> > "location": "/mounts/prod_backup/my_backup",
>>> > "compress": true
>>> > }
>>> > }'
>>> {
>>>   "error" :
>>> "RemoteTransportException[[log-elasticsearch-02][inet[/10.x.x.83:9300]][cluster:admin/repository/put]];
>>> nested: RepositoryVerificationException[[my_backup]
>>> [vxUQwUTCQwOaLyCy0eMK8A,
>>> 'RemoteTransportException[[log-elasticsearch-04][inet[/10.x.x.80:9300]][internal:admin/repository/verify]];
>>> nested: RepositoryVerificationException[[my_backup] store location
>>> [/mounts/prod_backup/my_backup] is not accessible on the node
>>> [[log-elasticsearch-04][vxUQwUTCQwOaLyCy0eMK8A][log-elasticsearch-04][inet[/10.x.x.80:9300;
>>> nested:
>>> FileNotFoundException[/mounts/prod_backup/my_backup/tests-yZ57gviiQUGS55tr_ULhhg-vxUQwUTCQwOaLyCy0eMK8A
>>> (Permission denied)]; '], [GMTt6Y-3Qle1F

Re[6]: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Александр Свиридов
 I agree with you that in single node environment only transport layer should 
be used. But I want to know how to make node client work because maybe I will 
need it in future and I want to know what I can do with elastic java api.


Вторник, 17 марта 2015, 11:56 -06:00 от Aaron Mefford :
>What is the advantage you expect from using the Node client, especially in a 
>single node environment?
>
>With client.transport.sniff true it should discover the other nodes, if other 
>nodes exist.
>
>On Tue, Mar 17, 2015 at 11:42 AM, Александр Свиридов  < ooo_satu...@mail.ru > 
>wrote:
>>Thank you. I did this way:
>>
>> Settings settings = ImmutableSettings.settingsBuilder()
>>    .put(" cluster.name ", "elasticsearch")
>>    .put("client.transport.sniff", true).build();
>>
>>    Client client = new TransportClient(settings)
>>    .addTransportAddress(new 
>>InetSocketTransportAddress("localhost",9300));
>>
>>And everything works fine. So, both cluster and index exist.
>>
>>However, as I understand it is not node client. What you sugget is transport 
>>client. Now I want to understand how to make node client work. 
>>
>>
>>Вторник, 17 марта 2015, 11:26 -06:00 от Aaron Mefford < aa...@definemg.com >:
>>>This is what I use in my code, not sure how correct it is given the abysmal 
>>>state of the the Java API documentation.
>>>
>>>import org.elasticsearch.common.settings.Settings;
>>>import org.elasticsearch.common.settings.ImmutableSettings;
>>>import org.elasticsearch.client.Client;
>>>import org.elasticsearch.client.transport.TransportClient;
>>>import org.elasticsearch.common.transport.InetSocketTransportAddress;
>>>
>>>
>>>
>>>        Settings settings = ImmutableSettings.settingsBuilder()
>>>                                .put(" cluster.name ", elasticClusterName)
>>>                                .put("client.transport.sniff", true).build();
>>>
>>>        esClient = new TransportClient(settings)
>>>            .addTransportAddress(new 
>>>InetSocketTransportAddress(elasticHost,elasticPort));
>>>
>>>
>>>On Tue, Mar 17, 2015 at 11:19 AM, Александр Свиридов  < ooo_satu...@mail.ru 
 wrote:
I am quite newbie to elactis. Could you explain with java code what you 
mean?


Вторник, 17 марта 2015, 9:46 -07:00 от  aa...@definemg.com :
>Is there a reason not to just specify the IP address and to try and rely 
>on multicast?
>
>I realize this is all on one node as you have stated that, but that seems 
>even more reason that it would be little issue to specify the IP.  While 
>multicast makes it easy to stand up a cluster in an ideal situation, my 
>experience has been that it leads to more problems down the road, and 
>things generally work better when not using multicast.   I heard the same 
>suggestion repeatedly at Elastic{on}.
>
>Aaron
>
>On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>>I have one physical server and I work only on it (no other servers).
>>At this server I have running elastic 1.4.2 - I use this version as this 
>>is the last version elastic osgi bundle is ready for. Also at this server 
>>I have glassfish 4.1 as java-ee server.
>>I run elastic node client inside my java-ee application. And I do it this 
>>way:
>>Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
>>Client client = node.client();
>>GetResponse getResponse = 
>>client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
>>Map source = getResponse.getSource();
>>System.out.println("--");
>>System.out.println("Index: "+ getResponse.getIndex());
>>System.out.println("Type: "+ getResponse.getType());
>>System.out.println("Id: "+ getResponse.getId());
>>System.out.println("Version: "+ getResponse.getVersion());
>>System.out.println(source);
>>
>>In log I see the following:
>>>[2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.discovery] [tid: _ThreadID=30 
>>>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 
>>>800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>>>[2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.cluster.service] [tid: _ThreadID=128 
>>>_ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
>>>[timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
>>>[Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][ webserver1.com 
>>>][local[1]]{local=true}}, removed {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][ 
>>>webserver1.com ][local[1]]{local=true},}, reason: 
>>>local-disco-initial_connect(master)]]
>>>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.http] [tid: _ThreadID=30 
>>>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664502] [levelValue: 
>>>80

Re: Why does creating a repository fail?

2015-03-17 Thread Mark Walkom
As has been mentioned, use uid remapping when mounting.

On 16 March 2015 at 17:37, David Reagan  wrote:

> If I were manually creating the elasticsearch user, that'd be easy. But
> I'm relying on apt to do the job for me. So, yeah...
>
> Hmm... I suppose I could manually create an elasticsearch2 user, then
> modify the defaults files to use it when running ES. Still seems clunky...
>
> --David Reagan
>
> On Mon, Mar 16, 2015 at 5:20 PM, Andrew Selden  wrote:
>
>> I’m not that familiar with iSCSI so I hesitate to say for sure, but
>> anytime you are cross-mounting filesystems on Linux you have to take
>> uid/gid consistency into account.
>>
>> - Andrew
>>
>> On Mar 16, 2015, at 4:46 PM, David Reagan  wrote:
>>
>> Would an iSCSI mount have the same issue? I believe our SAN supports
>> both.
>>
>> --David Reagan
>>
>> On Mon, Mar 16, 2015 at 4:40 PM, Andrew Selden  wrote:
>>
>>> Hi David,
>>>
>>> This is a common problem with NFS. Unfortunately the protocol assumes
>>> identical uid/gid mappings across all machines. It’s just one of those
>>> annoying sys-admin tasks that one has to take into account when using NFS.
>>> To get your permissions back to less permissive settings you will have to
>>> edit the /etc/passwd and /etc/group files to keep them in sync.
>>>
>>> See http://www.tldp.org/HOWTO/NFS-HOWTO/troubleshooting.html#SYMPTOM4
>>> for more context.
>>>
>>> - Andrew
>>>
>>>
>>> On Mar 16, 2015, at 4:04 PM, David Reagan  wrote:
>>>
>>> First, it is a file permissions issue. I did get snapshots to run when I
>>> chmoded to 777. As you can see from the ls output, /mounts/prod_backup is
>>> 777. Prior to that it was 775 or 755. So, I could revise my question to
>>> "How can I get snapshots working without using insecure file permissions?"
>>>
>>> root@log-elasticsearch-01:~# mount
>>> /dev/mapper/ws--template--01-root on / type ext4 (rw,errors=remount-ro)
>>> proc on /proc type proc (rw,noexec,nosuid,nodev)
>>> sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
>>> none on /sys/fs/fuse/connections type fusectl (rw)
>>> none on /sys/kernel/debug type debugfs (rw)
>>> none on /sys/kernel/security type securityfs (rw)
>>> udev on /dev type devtmpfs (rw,mode=0755)
>>> devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
>>> tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
>>> none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
>>> none on /run/shm type tmpfs (rw,nosuid,nodev)
>>> /dev/sda1 on /boot type ext2 (rw)
>>> rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
>>> nfsip:/vol/Logs/prod_backup on /mounts/prod_backup type nfs
>>> (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
>>> nfsip:/vol/Logs/log-elasticsearch-01 on /mounts/log-elasticsearch-01
>>> type nfs (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
>>>
>>> root@log-elasticsearch-01:~# ls -ld /mounts
>>> drwxr-xr-x 6 root root 4096 Oct  1 13:43 /mounts
>>>
>>> root@log-elasticsearch-01:~# ls -ld /mounts/prod_backup/
>>> drwxrwxrwx 4 elasticsearch elasticsearch 4096 Mar 16 13:41
>>> /mounts/prod_backup/
>>>
>>> --David Reagan
>>>
>>> On Mon, Mar 16, 2015 at 3:47 PM, Mark Walkom 
>>> wrote:
>>>
 Can you post the output from *mount* and *ls -ld /mounts
 /mounts/prod_backup*?

 On 16 March 2015 at 13:33, David Reagan  wrote:

> Why does this happen?
>
>
> curl -XPUT 'http://localhost:9200/_snapshot/my_backup?pretty=true' -d
>> '{
>> > "type": "fs",
>> > "settings": {
>> > "location": "/mounts/prod_backup/my_backup",
>> > "compress": true
>> > }
>> > }'
>> {
>>   "error" :
>> "RemoteTransportException[[log-elasticsearch-02][inet[/10.x.x.83:9300]][cluster:admin/repository/put]];
>> nested: RepositoryVerificationException[[my_backup]
>> [vxUQwUTCQwOaLyCy0eMK8A,
>> 'RemoteTransportException[[log-elasticsearch-04][inet[/10.x.x.80:9300]][internal:admin/repository/verify]];
>> nested: RepositoryVerificationException[[my_backup] store location
>> [/mounts/prod_backup/my_backup] is not accessible on the node
>> [[log-elasticsearch-04][vxUQwUTCQwOaLyCy0eMK8A][log-elasticsearch-04][inet[/10.x.x.80:9300;
>> nested:
>> FileNotFoundException[/mounts/prod_backup/my_backup/tests-yZ57gviiQUGS55tr_ULhhg-vxUQwUTCQwOaLyCy0eMK8A
>> (Permission denied)]; '], [GMTt6Y-3Qle1Fm3SGl-LTQ,
>> 'RemoteTransportException[[log-estools-01][inet[/10.x.x.8:9300]][internal:admin/repository/verify]];
>> nested: RepositoryVerificationException[[my_backup] store location
>> [/mounts/prod_backup/my_backup] is not accessible on the node
>> [[log-estools-01][GMTt6Y-3Qle1Fm3SGl-LTQ][log-estools-01][inet[/10.x.x.8:9300]]{data=false}]];
>> nested:
>> FileNotFoundException[/mounts/prod_backup/my_backup/tests-yZ57gviiQUGS55tr_ULhhg-GMTt6Y-3Qle1Fm3SGl-LTQ
>> (Permission denied)]; '], [ffpuQF_zRZGGPRkZRgq1mw,
>> 'RemoteTransportException[[log-elasticsearch-03][inet[/10.x.x.92:9300]

Re: Data not indexed into ElasticSearch from RabbitMQ

2015-03-17 Thread Mark Walkom
I'd recommend that you use Logstash with the rabbitmq input instead. Rivers
are being deprecated so fewer people will likely be able to help.

On 17 March 2015 at 10:23, Olalekan Elesin 
wrote:

> After proper setting up RabbitMQ river for elasticsearch, I issued the
> command GET :9200/_river/my_river/status,
>
> {
>
> "_index": "_river",
>
> "_type": "my_river",
>
> "_id": "_status",
>
> "_version": 2,
>
> "found": true,
>
> "_source": {
>
> "node": {
>
> "id": "-nA8mbDEQ4e3l4HVqlIToA",
>
> "name": "Skullfire",
>
> "transport_address": "inet[/:9300]"
>
> }
>
> }
>
> }
>
> but data is shown to be indexed. Please help.
>
> Thank you.
>
>
>  --
> 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/124cd5c2-3de4-441d-978d-6243eb7fe22d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X_Lvi5%2BfZmxBB%2B_ALNn0jMMoiw_RV38QMp5y9JkHrfSkg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Number of shards in 4 node Cluster

2015-03-17 Thread John S
Hi All,

Is there any best practices of having on the number of shards for a 
cluster? I have a 4 node cluster and used shards of 20.

During any node failure or other events i doubts since the shards number is 
high, replication to new node is taking more time...

Is there any metrics or formula to be done for number or shards?

Regards
John

-- 
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/6e51f1e4-8938-4196-84a9-007705869b6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re[4]: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Aaron Mefford
What is the advantage you expect from using the Node client, especially in
a single node environment?

With client.transport.sniff true it should discover the other nodes, if
other nodes exist.

On Tue, Mar 17, 2015 at 11:42 AM, Александр Свиридов 
wrote:

> Thank you. I did this way:
>
>  Settings settings = ImmutableSettings.settingsBuilder()
> .put("cluster.name", "elasticsearch")
> .put("client.transport.sniff",
> true).build();
>
> Client client = new TransportClient(settings)
> .addTransportAddress(new
> InetSocketTransportAddress("localhost",9300));
>
> And everything works fine. So, both cluster and index exist.
>
> However, as I understand it is not node client. What you sugget is
> transport client. Now I want to understand how to make node client work.
>
>
> Вторник, 17 марта 2015, 11:26 -06:00 от Aaron Mefford  >:
>
>   This is what I use in my code, not sure how correct it is given the
> abysmal state of the the Java API documentation.
>
> import org.elasticsearch.common.settings.Settings;
> import org.elasticsearch.common.settings.ImmutableSettings;
> import org.elasticsearch.client.Client;
> import org.elasticsearch.client.transport.TransportClient;
> import org.elasticsearch.common.transport.InetSocketTransportAddress;
>
>
>
> Settings settings = ImmutableSettings.settingsBuilder()
> .put("cluster.name", elasticClusterName)
> .put("client.transport.sniff",
> true).build();
>
> esClient = new TransportClient(settings)
> .addTransportAddress(new
> InetSocketTransportAddress(elasticHost,elasticPort));
>
>
> On Tue, Mar 17, 2015 at 11:19 AM, Александр Свиридов  > wrote:
>
> I am quite newbie to elactis. Could you explain with java code what you
> mean?
>
>
> Вторник, 17 марта 2015, 9:46 -07:00 от aa...@definemg.com
> :
>
>   Is there a reason not to just specify the IP address and to try and
> rely on multicast?
>
> I realize this is all on one node as you have stated that, but that seems
> even more reason that it would be little issue to specify the IP.  While
> multicast makes it easy to stand up a cluster in an ideal situation, my
> experience has been that it leads to more problems down the road, and
> things generally work better when not using multicast.   I heard the same
> suggestion repeatedly at Elastic{on}.
>
> Aaron
>
> On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>
> I have one physical server and I work only on it (no other servers).
>
> At this server I have running elastic 1.4.2 - I use this version as this
> is the last version elastic osgi bundle is ready for. Also at this server I
> have glassfish 4.1 as java-ee server.
>
> I run elastic node client inside my java-ee application. And I do it this
> way:
>
> Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
> Client client = node.client();
> GetResponse getResponse = 
> client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
> Map source = getResponse.getSource();
> System.out.println("--");
> System.out.println("Index: "+ getResponse.getIndex());
> System.out.println("Type: "+ getResponse.getType());
> System.out.println("Id: "+ getResponse.getId());
> System.out.println("Version: "+ getResponse.getVersion());
> System.out.println(source);
>
>
>
> In log I see the following:
>
> [2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.discovery] [tid: _ThreadID=30
> _ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue:
> 800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>
> [2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.cluster.service] [tid: _ThreadID=128
> _ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]]
> [timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new
> [Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][webserver1.com][local[1]]{local=true}},
> removed 
> {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][webserver1.com][local[1]]{local=true},},
> reason: local-disco-initial_connect(master)]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address
> {inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
>
> and I get this exeption: ...
>
> Caused by: 
> org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
> at 
> org.elasticsearch.cluster.metadata.Meta

Re[4]: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Александр Свиридов
 Thank you. I did this way:

 Settings settings = ImmutableSettings.settingsBuilder()
    .put("cluster.name", "elasticsearch")
    .put("client.transport.sniff", true).build();

    Client client = new TransportClient(settings)
    .addTransportAddress(new 
InetSocketTransportAddress("localhost",9300));

And everything works fine. So, both cluster and index exist.

However, as I understand it is not node client. What you sugget is transport 
client. Now I want to understand how to make node client work. 


Вторник, 17 марта 2015, 11:26 -06:00 от Aaron Mefford :
>This is what I use in my code, not sure how correct it is given the abysmal 
>state of the the Java API documentation.
>
>import org.elasticsearch.common.settings.Settings;
>import org.elasticsearch.common.settings.ImmutableSettings;
>import org.elasticsearch.client.Client;
>import org.elasticsearch.client.transport.TransportClient;
>import org.elasticsearch.common.transport.InetSocketTransportAddress;
>
>
>
>        Settings settings = ImmutableSettings.settingsBuilder()
>                                .put(" cluster.name ", elasticClusterName)
>                                .put("client.transport.sniff", true).build();
>
>        esClient = new TransportClient(settings)
>            .addTransportAddress(new 
>InetSocketTransportAddress(elasticHost,elasticPort));
>
>
>On Tue, Mar 17, 2015 at 11:19 AM, Александр Свиридов  < ooo_satu...@mail.ru > 
>wrote:
>>I am quite newbie to elactis. Could you explain with java code what you mean?
>>
>>
>>Вторник, 17 марта 2015, 9:46 -07:00 от  aa...@definemg.com :
>>>Is there a reason not to just specify the IP address and to try and rely on 
>>>multicast?
>>>
>>>I realize this is all on one node as you have stated that, but that seems 
>>>even more reason that it would be little issue to specify the IP.  While 
>>>multicast makes it easy to stand up a cluster in an ideal situation, my 
>>>experience has been that it leads to more problems down the road, and things 
>>>generally work better when not using multicast.   I heard the same 
>>>suggestion repeatedly at Elastic{on}.
>>>
>>>Aaron
>>>
>>>On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
I have one physical server and I work only on it (no other servers).
At this server I have running elastic 1.4.2 - I use this version as this is 
the last version elastic osgi bundle is ready for. Also at this server I 
have glassfish 4.1 as java-ee server.
I run elastic node client inside my java-ee application. And I do it this 
way:
Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
Client client = node.client();
GetResponse getResponse = 
client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
Map source = getResponse.getSource();
System.out.println("--");
System.out.println("Index: "+ getResponse.getIndex());
System.out.println("Type: "+ getResponse.getType());
System.out.println("Id: "+ getResponse.getId());
System.out.println("Version: "+ getResponse.getVersion());
System.out.println(source);

In log I see the following:
>[2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.discovery] [tid: _ThreadID=30 
>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 
>800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>[2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.cluster.service] [tid: _ThreadID=128 
>_ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
>[timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
>[Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][ webserver1.com ][local[1]]{local=true}}, 
>removed {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][ webserver1.com 
>][local[1]]{local=true},}, reason: local-disco-initial_connect(master)]]
>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.http] [tid: _ThreadID=30 
>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664502] [levelValue: 
>800] [[ [Pistol] bound_address {inet[/0:0:0:0:0:0:0:0:9202]}, 
>publish_address {inet[/SERVER IP:9202]}]]
>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.node] [tid: _ThreadID=30 
>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664502] [levelValue: 
>800] [[ [Pistol] started]]
and I get this exeption: ...
Caused by: 
 org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
at 
org.elasticsearch.action.support.single.shard.TransportShardS

Re: Re[2]: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Aaron Mefford
This is what I use in my code, not sure how correct it is given the abysmal
state of the the Java API documentation.

import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;



Settings settings = ImmutableSettings.settingsBuilder()
.put("cluster.name", elasticClusterName)
.put("client.transport.sniff",
true).build();

esClient = new TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress(elasticHost,elasticPort));


On Tue, Mar 17, 2015 at 11:19 AM, Александр Свиридов 
wrote:

> I am quite newbie to elactis. Could you explain with java code what you
> mean?
>
>
> Вторник, 17 марта 2015, 9:46 -07:00 от aa...@definemg.com:
>
>   Is there a reason not to just specify the IP address and to try and
> rely on multicast?
>
> I realize this is all on one node as you have stated that, but that seems
> even more reason that it would be little issue to specify the IP.  While
> multicast makes it easy to stand up a cluster in an ideal situation, my
> experience has been that it leads to more problems down the road, and
> things generally work better when not using multicast.   I heard the same
> suggestion repeatedly at Elastic{on}.
>
> Aaron
>
> On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>
> I have one physical server and I work only on it (no other servers).
>
> At this server I have running elastic 1.4.2 - I use this version as this
> is the last version elastic osgi bundle is ready for. Also at this server I
> have glassfish 4.1 as java-ee server.
>
> I run elastic node client inside my java-ee application. And I do it this
> way:
>
> Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
> Client client = node.client();
> GetResponse getResponse = 
> client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
> Map source = getResponse.getSource();
> System.out.println("--");
> System.out.println("Index: "+ getResponse.getIndex());
> System.out.println("Type: "+ getResponse.getType());
> System.out.println("Id: "+ getResponse.getId());
> System.out.println("Version: "+ getResponse.getVersion());
> System.out.println(source);
>
>
>
> In log I see the following:
>
> [2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.discovery] [tid: _ThreadID=30
> _ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue:
> 800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>
> [2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.cluster.service] [tid: _ThreadID=128
> _ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]]
> [timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new
> [Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][webserver1.com][local[1]]{local=true}},
> removed 
> {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][webserver1.com][local[1]]{local=true},},
> reason: local-disco-initial_connect(master)]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address
> {inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
> [org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
>
> and I get this exeption: ...
>
> Caused by: 
> org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
> at 
> org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
> at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
> at 
> org.elasticsearch.client.support.AbstractClient.get(AbstractClient.jav

Data not indexed into ElasticSearch from RabbitMQ

2015-03-17 Thread Olalekan Elesin
After proper setting up RabbitMQ river for elasticsearch, I issued the 
command GET :9200/_river/my_river/status, 

{

"_index": "_river",

"_type": "my_river",

"_id": "_status",

"_version": 2,

"found": true,

"_source": {

"node": {

"id": "-nA8mbDEQ4e3l4HVqlIToA",

"name": "Skullfire",

"transport_address": "inet[/:9300]"

}

}

}

but data is shown to be indexed. Please help. 

Thank you.


-- 
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/124cd5c2-3de4-441d-978d-6243eb7fe22d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re[2]: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Александр Свиридов
 I am quite newbie to elactis. Could you explain with java code what you mean?


Вторник, 17 марта 2015, 9:46 -07:00 от aa...@definemg.com:
>Is there a reason not to just specify the IP address and to try and rely on 
>multicast?
>
>I realize this is all on one node as you have stated that, but that seems even 
>more reason that it would be little issue to specify the IP.  While multicast 
>makes it easy to stand up a cluster in an ideal situation, my experience has 
>been that it leads to more problems down the road, and things generally work 
>better when not using multicast.   I heard the same suggestion repeatedly at 
>Elastic{on}.
>
>Aaron
>
>On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>>I have one physical server and I work only on it (no other servers).
>>At this server I have running elastic 1.4.2 - I use this version as this is 
>>the last version elastic osgi bundle is ready for. Also at this server I have 
>>glassfish 4.1 as java-ee server.
>>I run elastic node client inside my java-ee application. And I do it this way:
>>Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
>>Client client = node.client();
>>GetResponse getResponse = 
>>client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
>>Map source = getResponse.getSource();
>>System.out.println("--");
>>System.out.println("Index: "+ getResponse.getIndex());
>>System.out.println("Type: "+ getResponse.getType());
>>System.out.println("Id: "+ getResponse.getId());
>>System.out.println("Version: "+ getResponse.getVersion());
>>System.out.println(source);
>>
>>In log I see the following:
>>>[2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.discovery] [tid: _ThreadID=30 
>>>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 
>>>800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>>>[2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.cluster.service] [tid: _ThreadID=128 
>>>_ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
>>>[timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
>>>[Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][ webserver1.com ][local[1]]{local=true}}, 
>>>removed {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][ webserver1.com 
>>>][local[1]]{local=true},}, reason: local-disco-initial_connect(master)]]
>>>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
>>>[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address 
>>>{inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>>>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>>>[org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
>>>[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
>>and I get this exeption: ...
>>Caused by: 
>> org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
at 
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
at 
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
at 
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
>>
>>So it can't find the index - my.index-0.2.2. However this index exists! 
>>Besides, when I do curl -XGET ' http://localhost:9200/_cluster/state?pretty=1 
>>' I see there only one node and this  is not SCKIrGHQTaC5eEYmYfZ0Iw. I 
>>suppose that the node I create using java API creates new cluster and dosn't 
>>connect to my existing cluster - that's why it says - it's master. Or I don't 
>>understand something I have problem with code. Besides I've checked tha name 
>>of cluster it's elasticsearch. So, how can I connect to my existing 
>>elasticsearch cluster?
>-- 
>You

Re: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Mark Walkom
We do recommend to use unicast in production.

On 17 March 2015 at 09:46,  wrote:

> Is there a reason not to just specify the IP address and to try and rely
> on multicast?
>
> I realize this is all on one node as you have stated that, but that seems
> even more reason that it would be little issue to specify the IP.  While
> multicast makes it easy to stand up a cluster in an ideal situation, my
> experience has been that it leads to more problems down the road, and
> things generally work better when not using multicast.   I heard the same
> suggestion repeatedly at Elastic{on}.
>
> Aaron
>
> On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>>
>> I have one physical server and I work only on it (no other servers).
>>
>> At this server I have running elastic 1.4.2 - I use this version as this
>> is the last version elastic osgi bundle is ready for. Also at this server I
>> have glassfish 4.1 as java-ee server.
>>
>> I run elastic node client inside my java-ee application. And I do it this
>> way:
>>
>> Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
>> Client client = node.client();
>> GetResponse getResponse = 
>> client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
>> Map source = getResponse.getSource();
>> System.out.println("--");
>> System.out.println("Index: "+ getResponse.getIndex());
>> System.out.println("Type: "+ getResponse.getType());
>> System.out.println("Id: "+ getResponse.getId());
>> System.out.println("Version: "+ getResponse.getVersion());
>> System.out.println(source);
>>
>>
>>
>> In log I see the following:
>>
>> [2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] []
>> [org.elasticsearch.discovery] [tid: _ThreadID=30
>> _ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue:
>> 800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>>
>> [2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] []
>> [org.elasticsearch.cluster.service] [tid: _ThreadID=128
>> _ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]]
>> [timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new
>> [Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][webserver1.com][local[1]]{local=true}},
>> removed {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][webserver1.com
>> ][local[1]]{local=true},}, reason: local-disco-initial_connect(master)]]
>>
>> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
>> [org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
>> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address
>> {inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>>
>> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] []
>> [org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)]
>> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
>>
>> and I get this exeption: ...
>>
>> Caused by: 
>> org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
>> at 
>> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
>> at 
>> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
>> at 
>> org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
>> at 
>> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
>> at 
>> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
>> at 
>> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
>> at 
>> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
>> at 
>> org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
>> at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
>> at 
>> org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
>> at 
>> org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
>> at 
>> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
>> at 
>> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
>>
>> So it can't find the index - my.index-0.2.2. However this index exists!
>> Besides, when I do curl -XGET 'http://localhost:9200/_
>> cluster/state?pretty=1' I see there only one node and this *is not*
>> SCKIrGHQTaC5eEYmYfZ0Iw. I suppose that the node I create using java API
>> creates new cluster and dosn't connect to my existing cluster - that's why
>> it says - it's master. Or I don't understand something I have problem with
>> code. Besides I've checked tha name of cluster it's elasticsearch. So,
>> how

Re: ES performance tunning

2015-03-17 Thread Mark Walkom
​Take a look at
http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html
for other settings.

On 17 March 2015 at 00:48, Hoon Cho  wrote:

>
> I was searching for ES performance by google and I find some documents.
> They says modify ES config is good for ES performance.
> So, I edit my ES config like below.
>
> */etc/elasticsearch/elasticsearch.yml*
> index.number_of_replica: 0
> index.number_of_shards: 3
> index.translog.flush_threshold_ops: 5
> index.refresh_interval: -1
> indices.memory.index_buffer_size: 50%
> index.store.type: mmapfs
> bootstrap.mlockall: true
>
> */etc/default/elasticsearch*
> ES_HEAP_SIZE: 4g (my machine has 8g RAM)
> MAX_LOCKED_MEMORY=unlimited
>
>
> After configure above restart ES and LS.
>
> *# /etc/init.d/elasticsearch restart && sudo restart logstash*
>
>
> And make sure ES setting is correctly using curl command.
>
> *# curl 'localhost:9200/logstash-iis-test04/_settings?pretty'*
> {
>   "logstash-iis-test04" : {
> "settings" : {
>   "index" : {
> "creation_date" : "1426555104697",
> "uuid" : "0PuOIGj-RnKS9cMKXbsryQ",
> "number_of_replicas" : "0",
> "number_of_shards" : "3",
> "refresh_interval" : "5s",
> "version" : {
>   "created" : "1010199"
> }
>   }
> }
>   }
> }
>
> ​As you see, index.number_of_replicas and index.number_of_shards values is
> correct
> but , index.refresh_interval is not correct (I set this value is -1)
> and another setting is not shown, where can I find another settings?
>
> I want to see settings like index.translog.flush_threshold_ops,
> index.refresh_interval, indices.memory.index_buffer_size,
> index.store.type, bootstrap.mlockall..
> and want to know this settings is correctly applied.
>
> Maybe you know why this result is shown, please advice to me.
>
> Regards
>
>
>
>  --
> 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/b7f46e6b-d212-4d0d-b577-86e0056438ee%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X89p%3DELJC%3D1PLCjVwdx2XKboWHPKQvC2mdJ_N%2BNSPXBVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


issue with singleton analyzer in single JVM multi-index setup

2015-03-17 Thread Dmitry Kan
Hello!

I'm a newbie in elasticsearch, so forgive if the question is lame.

I have implemented a custom plugin using a custom lemmatizer and a 
tokenizer. The simplified class sequence: 


AnalysisMorphologyPlugin->MorphologyAnalysisBinderProcessor->SemanticAnalyzerTwitterLemmatizerProvider->RussianLemmatizingTwitterAnalyzer

In the RussianLemmatizingTwitterAnalyzer's ctor I load the custom object for 
lemmatization (object unrelated to lucene/es) in a singleton fashion (in a 
syncrhonized code block).
Then, when creating 14 indices in the same JVM I see 
 14 instances of RussianLemmatizingTwitterAnalyzer, 
 4 instances of SemanticAnalyzerTwitterLemmatizerProvider, 
 4 instances of MorphologyAnalysisBinderProcessor,
 30 instances of the custom lemmatizer (in each 
RussianLemmatizingTwitterAnalyzer only one instance is expected, so should be 
14), 
 1 instance of AnalysisMorphologyPlugin.

The question is, can RussianLemmatizingTwitterAnalyzer object be made shared 
between indices? Or is it by design, that they must load separately per index?
What could be wrong in the code that makes 30 instances of the custom singleton 
lemmatizer instead of 14?

The current standing is that *with* the plugin 100M of RAM is reserved by the 
JVM with no data. *Without* the plugin the JVM reserves 2M with no data. 
Elasticsearch 1.3.2, Lucene 4.9.0.

Regards,

Dmitry Kan

-- 
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/7e0b09a0-c88c-4c56-bc8f-1b895d534cc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch - node client does not connect to cluster

2015-03-17 Thread aaron
Is there a reason not to just specify the IP address and to try and rely on 
multicast?

I realize this is all on one node as you have stated that, but that seems 
even more reason that it would be little issue to specify the IP.  While 
multicast makes it easy to stand up a cluster in an ideal situation, my 
experience has been that it leads to more problems down the road, and 
things generally work better when not using multicast.   I heard the same 
suggestion repeatedly at Elastic{on}.

Aaron

On Tuesday, March 17, 2015 at 9:25:46 AM UTC-6, ooo_saturn7 wrote:
>
> I have one physical server and I work only on it (no other servers).
>
> At this server I have running elastic 1.4.2 - I use this version as this 
> is the last version elastic osgi bundle is ready for. Also at this server I 
> have glassfish 4.1 as java-ee server.
>
> I run elastic node client inside my java-ee application. And I do it this 
> way:
>
> Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
> Client client = node.client();
> GetResponse getResponse = 
> client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
> Map source = getResponse.getSource();
> System.out.println("--");
> System.out.println("Index: "+ getResponse.getIndex());
> System.out.println("Type: "+ getResponse.getType());
> System.out.println("Id: "+ getResponse.getId());
> System.out.println("Version: "+ getResponse.getVersion());
> System.out.println(source);
>
>
>
> In log I see the following:
>
> [2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
> [org.elasticsearch.discovery] [tid: _ThreadID=30 
> _ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 
> 800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>
> [2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
> [org.elasticsearch.cluster.service] [tid: _ThreadID=128 
> _ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
> [timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
> [Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][webserver1.com][local[1]]{local=true}}, 
> removed 
> {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][webserver1.com][local[1]]{local=true},}, 
> reason: local-disco-initial_connect(master)]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
> [org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address 
> {inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>
> [2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
> [org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
> [timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
>
> and I get this exeption: ...
>
> Caused by: 
> org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] missing
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
> at 
> org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
> at 
> org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
> at 
> org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
> at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
> at 
> org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
> at 
> org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
> at 
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
> at 
> org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
>
> So it can't find the index - my.index-0.2.2. However this index exists! 
> Besides, when I do curl -XGET '
> http://localhost:9200/_cluster/state?pretty=1' I see there only one node 
> and this *is not* SCKIrGHQTaC5eEYmYfZ0Iw. I suppose that the node I 
> create using java API creates new cluster and dosn't connect to my existing 
> cluster - that's why it says - it's master. Or I don't understand something 
> I have problem with code. Besides I've checked tha name of cluster it's 
> elasticsearch. So, how can I connect to my existing elasticsearch cluster?
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To 

Re: Logstash Geohash Question

2015-03-17 Thread Mark Walkom
It'll be able to read geoip.coordinates if you point to it.

On 17 March 2015 at 09:07, Michael  wrote:

> What do you mean exactly?
>
> These are the fields I'm able to obtain, whereas geoip.coordinates is
> built by using
>
> add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
> add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}"  ]
>
> in my logstash.conf.
>
>
> geoip.city_name Warsaw*t*geoip.continent_code EU*#*geoip.coordinates
> ["21.0","52.25"]*t*geoip.country_code2 PL*t*geoip.country_code3 POL*t*
> geoip.country_name Poland*t*geoip.ip 217.67.205.50*#*geoip.latitude 52.25
> *#*geoip.location [21,52.25]*#*geoip.longitude 21*t*geoip.real_region_name
>  Mazowieckie*t*geoip.region_name 78*t*geoip.timezone Europe/Warsaw
> Can please be so kind and post the part of your geoip filter in your
> logstash.conf where handle the building of fields in order to use in tile
> map of kb4?
>
> Thanks in advance
>
>
>
> Am Samstag, 7. März 2015 16:40:07 UTC+1 schrieb Mark Walkom:
>>
>> ES needs a single lat+lon field to read. It or KB won't combine things
>>
>  --
> 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/633b740d-1f9d-43ed-acdd-670e30829503%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAEYi1X9ytHKCe5SkTwC9ZPkSBkA%2Bn8cTdBCZq99TZqYqA7cCCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How do you run ES with limited data storage space?

2015-03-17 Thread aaron
While ES does compress by default, it also stores data in data structures, 
that increase the size of the data. The net is that your data will be much 
larger than the equivalent log file gzipped.  However, running logstash to 
ingest 1.5 years of logs may well take much longer than you would expect.

There is no reason you shouldn't be able to move snapshots off of your 
shared drive onto an external drive or other storage, such as S3.

One thing you should reconsider is what you are trying to do with your 
resources.  It sounds like it is simply too much.  If the budget cannot 
budge to accommodate the requirements, then the requirements must budge to 
accommodate the budget.  Perhaps you can identify some log sources that do 
not have the same retention requirements.  Perhaps it is some segment of 
your logs that is not as important.  For instance is it really important to 
keep that Java Stack trace from a year ago?  Now I don't know the nature of 
your logs, but I do know the nature of logs, and there are important log 
entries, and there are mundane repetitive entries.  What I am driving at is 
that leveraging the ability of using ES aliasing and cross index searching 
you can segment your logs into important indexes and not important.  You 
can still search across all the indexes, but you can establish retention 
policies which differ for the less important, while preserving the precious 
resources you have for the important.

Some data you can take an RRD style approach with and create indexes that 
have summary information in them which will allow you to generate 
historical dashboards that still capture the essence of the day, if not the 
detail.  For instance while you could not show the individual requests on a 
given day, you could still show the request volume over a three year period.

While this goes against the nature of the e logging efforts, these are some 
of the ideas I had while reading about your situation.

Aaron

On Monday, March 16, 2015 at 6:42:43 PM UTC-6, Mark Walkom wrote:
>
> There's not a lot you can do here unless you want to start uploading 
> snapshots to S3, or something else that is not on your NAS.
> ES does compress by default and we are working on using a better algorithm 
> for future releases which will help, but there's no ETA for that.
>
> On 16 March 2015 at 17:29, David Reagan > 
> wrote:
>
>> So, I haven't figured out the right search terms to find the answer via 
>> Google yet, I've read a lot of the docs on the subject of Snapshot and 
>> Restore without finding an answer, and I haven't had the time or resources 
>> to test some of my own ideas. Hence, I'm posting this in the hopes that 
>> someone who has already solved this problem will share. 
>>
>> How do you run ES with limited data storage space?
>>
>> Basically, short of getting more space, what can I do to make the best 
>> use of what I have, and still meet as many of my goals as possible?
>>
>> My setup is 4 data nodes. Due to lack of resources/money, they are all 
>> thin provisioned VMs, and all my data has to be on NFS/SAN mounts. Storing 
>> data on the actual VM's hard disk would negatively effect other VMs and 
>> services.
>>
>> Our NFS SAN is also low on space. So I only have about 1.5TB to use. 
>> Initially this seemed like plenty, but a couple weeks ago, ES started 
>> complaining about running out of space. Usage on that mount was over 80%. 
>> My snapshot repository had ballooned to over 700GB, and each node's data 
>> mount point was around 150GB. 
>>
>> Currently, I'm only using ES for logs.
>>
>> For day to day use, I should be fine with 1 month of open indices. Thus, 
>> I've been keeping older indices closed already. So I can't really do much 
>> more when it comes to closing indices.
>>
>> I also run the optimize command nightly on any logstash index older that 
>> a couple days.
>>
>> I'd just delete the really old data, but I have use cases for data up to 
>> 1.5 years old. Considering that snapshots of only a few months nearly used 
>> up all my space, and how much space a month of logs is currently taking up, 
>> I'm not sure how I can store that much data.
>>
>> So, in general, how would you solve my problem? I need to have immediate 
>> access to 1 months worth of logs (via Kibana), be able to relatively 
>> quickly access up to 6 months of logs (open closed indices?), and access up 
>> to 1.5 years worth temporarily (restore snapshots to new cluster on my 
>> desktop?)
>>
>> Would there be a way to move snapshots off of the NFS SAN to an external 
>> hard drive? 
>>
>> Should I tell logstash to send logs to a text file that get's logrotated 
>> for a year and a half? Or does ES do a good enough job with compression 
>> that gzipping wouldn't help? If it was just a text file, I could unzip it, 
>> then tell Logstash to read the file into an ES cluster.
>>
>> ES already compresses stored indices by default, right? So there's 
>> nothing I can do there?
>>
>>
>>  -- 
>> You r

Elasticsearch ICU Analysis plugin for 1.4.3 / proper Lucene version

2015-03-17 Thread JZ
Dear all,

I am wondering whether you can provide a compiled version of the ICU
Analysis plugin for Elasticsearch 1.4.3. I have tried to install the plugin
version 1.4.2 on ES 1.4.3 but then I get this error on restarting:

cannot start plugin due to incorrect Lucene version: plugin [4.10.3], node
[4.10.2].

See:
https://github.com/elastic/elasticsearch-analysis-icu

I have tried to compile it from source, but then I get Maven dependency
errors returned.

Thanks in advance!

/JZ

-- 
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/CAA%2BD3eXq7jKOFOEJjBftQRCK%3DJ%2Bw6%2BUw7PHrjMWG8_w%2B%3Dshv%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Logstash Geohash Question

2015-03-17 Thread Michael
What do you mean exactly?

These are the fields I'm able to obtain, whereas geoip.coordinates is built 
by using 

add_field => [ "[geoip][coordinates]", "%{[geoip][longitude]}" ]
add_field => [ "[geoip][coordinates]", "%{[geoip][latitude]}"  ]

in my logstash.conf.


geoip.city_name Warsaw*t*geoip.continent_code EU*#*geoip.coordinates 
["21.0","52.25"]*t*geoip.country_code2 PL*t*geoip.country_code3 POL*t*
geoip.country_name Poland*t*geoip.ip 217.67.205.50*#*geoip.latitude 52.25*#*
geoip.location [21,52.25]*#*geoip.longitude 21*t*geoip.real_region_name 
Mazowieckie*t*geoip.region_name 78*t*geoip.timezone Europe/Warsaw
Can please be so kind and post the part of your geoip filter in your 
logstash.conf where handle the building of fields in order to use in tile 
map of kb4?

Thanks in advance



Am Samstag, 7. März 2015 16:40:07 UTC+1 schrieb Mark Walkom:
>
> ES needs a single lat+lon field to read. It or KB won't combine things
>

-- 
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/633b740d-1f9d-43ed-acdd-670e30829503%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Operator "and" in highlighting

2015-03-17 Thread Nikolas Everett
On Tue, Mar 17, 2015 at 8:56 AM, Vlad Zaitsev  wrote:

But it seems that highlighter ignore operator: “and” and highlight any term
> from queries.
>
>
Its much more than that.  For the most part highlighters reduce the query
to a list of terms blindly.  Some do phrases.  They don't really have that
nuanced a view of the query itself.

Its because highlighting is totally decoupled from the actual search
portion of the job - its more like a recheck.  And Lucene isn't built to
cleanly plug the highlighters into the queries.  So they have tons of
instanceof style hacks to get the job done.  Its not super pleasant.

Nik

-- 
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/CAPmjWd0t%3DHwt-mMpTSbw6B9vLBwDk8%3DsZS88F3g%2BfXATgC_SGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: PayloadTermQuery in ElasticSearch

2015-03-17 Thread Nikolas Everett
I imagine the right way to do this is with a plugin but I'm not 100% sure.

On Tue, Mar 17, 2015 at 11:47 AM, Devaraja Swami 
wrote:

> I plan to store floats in the payload and boost the score
> (multiplicatively) based on the average value of the payloads over the
> occurrences of the matching term in the document. ie., exactly as in
> AveragePayloadFunction in Lucene.
>
> On Tue, Mar 17, 2015 at 2:16 AM, joergpra...@gmail.com <
> joergpra...@gmail.com> wrote:
>
>> The concrete implementation depends on what you store in the payload
>> (e.g. scores)
>>
>> Jörg
>>
>> On Tue, Mar 17, 2015 at 7:01 AM, Devaraja Swami 
>> wrote:
>>
>>> I need to use PayloadTermQuery from Lucene.
>>> Does anyone know how I can use this in ElasticSearch?
>>> I am using ES 1.4.4, with the Java API.
>>> In Lucene, I could use this by directly instantiating PayloadTermQuery,
>>> but there are no APIs in ES QueryBuilders for this.
>>> I don't need a query parser, because I can build the query directly
>>> using the Java API (don't need a JSON representation of the query),
>>> so I only need to be able to construct, in Java, a query builder
>>> encapsulating a PayloadTermQuery.
>>>
>>> Thanks in advance!
>>>
>>> -devarajaswami
>>>
>>>  --
>>> 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/8fc84082-6fc7-42aa-9caf-8ab527bc8a0b%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> 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/CAKdsXoFwk_Ve_OK9J%2BfsEzGwbtOnaL7%2BeqT%3DR61hCoX8Mzi-fQ%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CABMSir6hF%3DuM1jp0jgoBq_v30YNVB-8JLF7PLyvFjyXbdqtLvg%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAPmjWd2%2B-YFPsRVB0QywSuMFEVXL-UgQyxJRGBjGn4Lw0KWT4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why does creating a repository fail?

2015-03-17 Thread David Reagan
@Mark Walkom, So, I'm looking into iscsi. From what I have learned so far,
you actually format the LUN with whatever file system you want. So,
wouldn't the gid/uid issue show up there as well, if I formatted to ext3 or
ext4? Since Ubuntu would treat it like a normal partition and use typical
linux file perms on it.

--David Reagan

On Mon, Mar 16, 2015 at 5:37 PM, David Reagan  wrote:

> If I were manually creating the elasticsearch user, that'd be easy. But
> I'm relying on apt to do the job for me. So, yeah...
>
> Hmm... I suppose I could manually create an elasticsearch2 user, then
> modify the defaults files to use it when running ES. Still seems clunky...
>
> --David Reagan
>
> On Mon, Mar 16, 2015 at 5:20 PM, Andrew Selden  wrote:
>
>> I’m not that familiar with iSCSI so I hesitate to say for sure, but
>> anytime you are cross-mounting filesystems on Linux you have to take
>> uid/gid consistency into account.
>>
>> - Andrew
>>
>> On Mar 16, 2015, at 4:46 PM, David Reagan  wrote:
>>
>> Would an iSCSI mount have the same issue? I believe our SAN supports
>> both.
>>
>> --David Reagan
>>
>> On Mon, Mar 16, 2015 at 4:40 PM, Andrew Selden  wrote:
>>
>>> Hi David,
>>>
>>> This is a common problem with NFS. Unfortunately the protocol assumes
>>> identical uid/gid mappings across all machines. It’s just one of those
>>> annoying sys-admin tasks that one has to take into account when using NFS.
>>> To get your permissions back to less permissive settings you will have to
>>> edit the /etc/passwd and /etc/group files to keep them in sync.
>>>
>>> See http://www.tldp.org/HOWTO/NFS-HOWTO/troubleshooting.html#SYMPTOM4
>>> for more context.
>>>
>>> - Andrew
>>>
>>>
>>> On Mar 16, 2015, at 4:04 PM, David Reagan  wrote:
>>>
>>> First, it is a file permissions issue. I did get snapshots to run when I
>>> chmoded to 777. As you can see from the ls output, /mounts/prod_backup is
>>> 777. Prior to that it was 775 or 755. So, I could revise my question to
>>> "How can I get snapshots working without using insecure file permissions?"
>>>
>>> root@log-elasticsearch-01:~# mount
>>> /dev/mapper/ws--template--01-root on / type ext4 (rw,errors=remount-ro)
>>> proc on /proc type proc (rw,noexec,nosuid,nodev)
>>> sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
>>> none on /sys/fs/fuse/connections type fusectl (rw)
>>> none on /sys/kernel/debug type debugfs (rw)
>>> none on /sys/kernel/security type securityfs (rw)
>>> udev on /dev type devtmpfs (rw,mode=0755)
>>> devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
>>> tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
>>> none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
>>> none on /run/shm type tmpfs (rw,nosuid,nodev)
>>> /dev/sda1 on /boot type ext2 (rw)
>>> rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)
>>> nfsip:/vol/Logs/prod_backup on /mounts/prod_backup type nfs
>>> (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
>>> nfsip:/vol/Logs/log-elasticsearch-01 on /mounts/log-elasticsearch-01
>>> type nfs (rw,nfsvers=3,hard,intr,tcp,actimeo=3,addr=nfsip)
>>>
>>> root@log-elasticsearch-01:~# ls -ld /mounts
>>> drwxr-xr-x 6 root root 4096 Oct  1 13:43 /mounts
>>>
>>> root@log-elasticsearch-01:~# ls -ld /mounts/prod_backup/
>>> drwxrwxrwx 4 elasticsearch elasticsearch 4096 Mar 16 13:41
>>> /mounts/prod_backup/
>>>
>>> --David Reagan
>>>
>>> On Mon, Mar 16, 2015 at 3:47 PM, Mark Walkom 
>>> wrote:
>>>
 Can you post the output from *mount* and *ls -ld /mounts
 /mounts/prod_backup*?

 On 16 March 2015 at 13:33, David Reagan  wrote:

> Why does this happen?
>
>
> curl -XPUT 'http://localhost:9200/_snapshot/my_backup?pretty=true' -d
>> '{
>> > "type": "fs",
>> > "settings": {
>> > "location": "/mounts/prod_backup/my_backup",
>> > "compress": true
>> > }
>> > }'
>> {
>>   "error" :
>> "RemoteTransportException[[log-elasticsearch-02][inet[/10.x.x.83:9300]][cluster:admin/repository/put]];
>> nested: RepositoryVerificationException[[my_backup]
>> [vxUQwUTCQwOaLyCy0eMK8A,
>> 'RemoteTransportException[[log-elasticsearch-04][inet[/10.x.x.80:9300]][internal:admin/repository/verify]];
>> nested: RepositoryVerificationException[[my_backup] store location
>> [/mounts/prod_backup/my_backup] is not accessible on the node
>> [[log-elasticsearch-04][vxUQwUTCQwOaLyCy0eMK8A][log-elasticsearch-04][inet[/10.x.x.80:9300;
>> nested:
>> FileNotFoundException[/mounts/prod_backup/my_backup/tests-yZ57gviiQUGS55tr_ULhhg-vxUQwUTCQwOaLyCy0eMK8A
>> (Permission denied)]; '], [GMTt6Y-3Qle1Fm3SGl-LTQ,
>> 'RemoteTransportException[[log-estools-01][inet[/10.x.x.8:9300]][internal:admin/repository/verify]];
>> nested: RepositoryVerificationException[[my_backup] store location
>> [/mounts/prod_backup/my_backup] is not accessible on the node
>> [[log-estools-01][GMTt6Y-3Qle1Fm3SGl-LTQ][log-estools-01][inet[/10.x.x.8:

Re: PayloadTermQuery in ElasticSearch

2015-03-17 Thread Devaraja Swami
I plan to store floats in the payload and boost the score
(multiplicatively) based on the average value of the payloads over the
occurrences of the matching term in the document. ie., exactly as in
AveragePayloadFunction in Lucene.

On Tue, Mar 17, 2015 at 2:16 AM, joergpra...@gmail.com <
joergpra...@gmail.com> wrote:

> The concrete implementation depends on what you store in the payload (e.g.
> scores)
>
> Jörg
>
> On Tue, Mar 17, 2015 at 7:01 AM, Devaraja Swami 
> wrote:
>
>> I need to use PayloadTermQuery from Lucene.
>> Does anyone know how I can use this in ElasticSearch?
>> I am using ES 1.4.4, with the Java API.
>> In Lucene, I could use this by directly instantiating PayloadTermQuery,
>> but there are no APIs in ES QueryBuilders for this.
>> I don't need a query parser, because I can build the query directly using
>> the Java API (don't need a JSON representation of the query),
>> so I only need to be able to construct, in Java, a query builder
>> encapsulating a PayloadTermQuery.
>>
>> Thanks in advance!
>>
>> -devarajaswami
>>
>>  --
>> 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/8fc84082-6fc7-42aa-9caf-8ab527bc8a0b%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> 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/CAKdsXoFwk_Ve_OK9J%2BfsEzGwbtOnaL7%2BeqT%3DR61hCoX8Mzi-fQ%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CABMSir6hF%3DuM1jp0jgoBq_v30YNVB-8JLF7PLyvFjyXbdqtLvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Kibana 4.0.1 / ES 1.4.4 - time field name

2015-03-17 Thread Micah Yoder
I had a field called _timestamp, which I had to add in the meta-fields list 
in the advanced settings. Maybe similar?

On Tuesday, March 17, 2015 at 10:10:51 AM UTC-5, Moshe Recanati wrote:
>
> Hi
> I would like to use Kibana. I'm able to load my index however it didn't 
> find time-field name.
> I a saw it search for '@timestamp'.
> I'm using Java and ObjectMapper to write my data into ES.
> I would like to know which field I need to define in order to have this 
> time-field.
>
> Thank you,
> Moshe
>

-- 
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/ddf76692-8454-4f09-b682-ecd8b49cf932%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Elasticsearch - node client does not connect to cluster

2015-03-17 Thread Александр Свиридов

I have one physical server and I work only on it (no other servers).
At this server I have running elastic 1.4.2 - I use this version as this is the 
last version elastic osgi bundle is ready for. Also at this server I have 
glassfish 4.1 as java-ee server.
I run elastic node client inside my java-ee application. And I do it this way:
Node node = nodeBuilder().local(true).clusterName("elasticsearch").node();
Client client = node.client();
GetResponse getResponse = 
client.prepareGet("my.index-0.2.2","post","1").execute().actionGet();
Map source = getResponse.getSource();
System.out.println("--");
System.out.println("Index: "+ getResponse.getIndex());
System.out.println("Type: "+ getResponse.getType());
System.out.println("Id: "+ getResponse.getId());
System.out.println("Version: "+ getResponse.getVersion());
System.out.println(source);

In log I see the following:
>[2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.discovery] [tid: _ThreadID=30 
>_ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 800] 
>[[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]
>[2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.cluster.service] [tid: _ThreadID=128 
>_ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
>[timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
>[Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][ webserver1.com ][local[1]]{local=true}}, 
>removed {[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][ webserver1.com 
>][local[1]]{local=true},}, reason: local-disco-initial_connect(master)]]
>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
>[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address 
>{inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]
>[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
>[org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
>[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]
and I get this exeption: ...
Caused by: org.elasticsearch.indices.IndexMissingException:[my.index-0.2.2] 
missing
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
at 
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
at 
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
at 
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)

So it can't find the index - my.index-0.2.2. However this index exists! 
Besides, when I do  curl -XGET ' http://localhost:9200/_cluster/state?pretty=1 
' I see there only one node and this  is not SCKIrGHQTaC5eEYmYfZ0Iw. I suppose 
that the node I create using java API creates new cluster and dosn't connect to 
my existing cluster - that's why it says - it's master. Or I don't understand 
something I have problem with code. Besides I've checked tha name of cluster 
it's  elasticsearch . So, how can I connect to my existing elasticsearch 
cluster?

-- 
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/1426605929.302531214%40f430.i.mail.ru.
For more options, visit https://groups.google.com/d/optout.


how to make kibana installed in windows see an elasticsearch instance installed in a centos vm(hartonworks sandbox) ?

2015-03-17 Thread BEN SALEM Omar
I've installed hortonworks sandbow 2.0 and then did install on it 
elasticsearch 1.4.0.
Now I want to install Kibana BUT here is the issue : 

the sandbox come as a terminal, and thus when I run ES, this is what 
happens : 



With that, I can't do anything else when the ES is running, because crtl+c 
will stop it ! 

I found my self obliged to install Kibana in my windows machine and want to 
make it see my ES instance.
I've changed the kibana.yml (added the es instance),added the vmware 
machine ip in the system32../hosts , putted down the firewalls but 
something is misssing since Kibana is not up ! 

Any help how to do?

-- 
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/3506d8fc-b05e-4145-9540-9bab5c384f88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Kibana 4.0.1 / ES 1.4.4 - time field name

2015-03-17 Thread Moshe Recanati
Hi
I would like to use Kibana. I'm able to load my index however it didn't
find time-field name.
I a saw it search for '@timestamp'.
I'm using Java and ObjectMapper to write my data into ES.
I would like to know which field I need to define in order to have this
time-field.

Thank you,
Moshe

-- 
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/CA%2BhKCHMVU4o1_k42gtLMgnG9gkzrXxbQqsCKFO_REPaRLeyrGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Multiply aggregation value by a number within the query.

2015-03-17 Thread Tobi Wo


{"took":106,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":339795,"max_score":0.0,"hits":[]},"aggregations":{"date_histogram:doc.timeframe":{"buckets":[{"key_as_string":"2015-02-27T07:00:00.000Z","key":142502040,"doc_count":864,"cardinality:doc.key":{"value":216}},{"key_as_string":"2015-02-27T08:00:00.000Z","key":142502400,"doc_count":1550,"cardinality:doc.key":{"value":322}}]}
}}


Hello, 


my result looks like the one above.

The query aggregates all keys by the hour. The value is the count of equal keys 
by the hour.


Since the keys only reflect 50% of the observations, I want to multiply each 
value by the factor 2.


So 

key = 142502040 with value = 216 

would be

key = 142502040 with value = 432


How can I achieve this?

I haven't found anything. I think scripting could be an option.

But how to reuse the aggregation in the same query?


Thanks for an answer.


-- 
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/d6b602f2-c3ea-40eb-9968-1991bc888618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pull only fields with given value

2015-03-17 Thread Adrian
I have a JSON like this for a document

_source: {
timestamp: 213234234,
links: [ {
  mention: "audi",
  entity: {rank:3, name:"some name"}
  }, {
  mention: "ford",
  entity: {rank:0, name:"some other name"},
  }
]
  }
}

I'm interested in retrieving only the mention and rank fields where 
rank==0. 
I am able to specify which fields I want using "fields" like this 
"fields":["timestamp","links.mention","links.entity.rank"] and I can even 
filter (query {filtered { query { term { links.entity.rank = 0  ) so 
that it returns only documents that have rank=0

Such a query returns all fields I mention and all the objects in the links 
array.

_source: {
timestamp: [213234234],
links.mention: [  "audi", "ford" ],
links.entity.rank: [ 3, 0 ]
  }
}

I don't want to have 3 in links.entity.rank. Is there a way to re filter 
the result of a query?

-- 
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/e9cdf199-f8f0-4fcc-8642-ef7a1f4eab58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using shingle

2015-03-17 Thread Petr Janský
Noone? :-(

Petr

Dne pátek 20. února 2015 15:29:15 UTC+1 Petr Janský napsal(a):
>
> Hi there,
>
> I've tried to use shingle for getting bigrams and trigrams
>
> curl -X POST 'localhost:9200/idnes/' -d '{
>   "settings" : {
> "analysis" : {
>   "filter": {
> "czech_stop": {
>   "type":   "stop",
>   "stopwords":  "_czech_",
>   "ignore_case": "true",
>   "remove_trailing": "false"
> },
> "czech_stop_ngram": {
>   "type":   "stop",
>   "stopwords" : ["a", "i", "k", "o", "s", "u", "v", "z", "do", 
> "co", "by", "do", "je", "mu", "mi", "mě", "mně", "mne", "na", "ne", "ní, 
> "si", "se", "ta", "to", "té", "ti", "ty", "už", "ve", "za", "že", "aby", 
> "ani", "ale", "byl", "jak", "jen", "jde", "kdo", "kdy", "kde", "něm", 
> "nich",  "něj", "než", "pro", "tak", "ten", "tam", "tady", "těch", "jsou", 
> "jsem", "není", "nyní", "nimi", "jako", "jaká", "jaké", "jaká", "právě", 
> "který", "která", "které", "jeho", "její", "nebo", "jako", "toho", "kdyby", 
> "takový", "taková", "takové", "_czech_" ],
>   "ignore_case": "true",
>   "remove_trailing": "false"
> },
> "czech_keywords": {
>   "type":   "keyword_marker",
>   "keywords":   ["že"] 
> },
> "czech_stemmer": {
>   "type":   "stemmer",
>   "language":   "czech"
> },
> "shingle2_filter": {
> "type": "shingle",
> "min_shingle_size": 2, 
> "max_shingle_size": 2, 
> "output_unigrams":  false   
> },
> "shingle3_filter": {
> "type": "shingle",
> "min_shingle_size": 3, 
> "max_shingle_size": 3, 
> *"output_unigrams":  false   *
> }
>   },
>   "analyzer": {
> 
> "shingle2s_analyzer": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": ["standard", "lowercase", "czech_stop_ngram", 
> "shingle2_filter"]
> },
> "shingle3s_analyzer": {
> "type": "custom",
> "tokenizer": "standard",
> "filter": ["czech_stop_ngram", "shingle3_filter" ]
> }
>   }
> }
>  },
>
>   "mappings" : {
> "article" : {
> "_id" : {
> "path" : "reference"
> },
>
> "properties" : {
> .
> "content2"   : { "type":"string", "analyzer": "shingle2_analyzer"},
> "content3"   : { "type":"string", "analyzer": "shingle3_analyzer"},
> "content4"   : { "type":"string", "analyzer": 
> "shingle2s_analyzer"},
> "content5"   : { "type":"string", "analyzer": 
> "shingle3s_analyzer"},
> ..
>
> If I try my analysers using by calling:
>
> curl -X GET 
> 'localhost:9200/idnes/_analyze?analyzer=shingle3s_analyzer&pretty' -d 'a e 
> i o u s k z na ke ze nad pod za před Norská strana zatím dostatečně 
> nevyhodnotila, jak citlivou otázkou je pro Česko případ synů Evy 
> Michalákové. Tak popisuje současnou situaci premiér Bohuslav Sobotka. Ten 
> již dostal odpověď na dopis od premiérky Norska Erny Solbergové. S obecnými 
> odpověďmi není spokojen a zvažuje do Norska další psaní.' | grep "token"
>
> It works fine. In results there are only trigrams
>"tokens" : [ {
> "token" : "_ e _",
> "token" : "e _ _",
> "token" : "_ _ Norská",
> "token" : "_ Norská _",
> "token" : "Norská _ zatím",
> "token" : "_ zatím dostatečně",
> "token" : "zatím dostatečně nevyhodnotila",
> "token" : "dostatečně nevyhodnotila _",
> "token" : "nevyhodnotila _ citlivou",
> "token" : "_ citlivou otázkou",
> "token" : "citlivou otázkou _",
> "token" : "otázkou _ _",
> 
>
> But there is an issue if I use it on indexed data
> POST idnes/_search?pretty=true 
> {
> "query": {
> "match": {
>"content_type": "Article"
> }
> }, 
> "facets" : {
> "tag" : {
> "terms" : {
> "fields" : ["content5"],
> "size" : 20
> }
> }
> }
> }
>
> In the response there are also unigrams.
>"facets": {
>   "tag": {
>  "_type": "terms",
>  "missing": 452,
>  "total": 926077,
>  "other": 762645,
>  "terms": [
> {
>"term": "a",
>"count": 18150
> },
> {
>"term": "to",
>"count": 17131
> },
> {
>"term": "je",
>"count": 14090
> },
> {
>"term": "se",
>"count": 13621
> },
> {
>"term": "na",
>"count": 12285
> },
> ..
> {
>"term": "korun _ _",
>"count": 551
> },
> {

Re: Operators NEARx, BEFOR, AFTER, FIRSTx, LASTx

2015-03-17 Thread Petr Janský
Noone? :-(

Petr

Dne středa 18. února 2015 12:35:15 UTC+1 Petr Janský napsal(a):
>
> Hi Lukas,
>
> thank you for your answer. I checked the "Proximity Match" - 
> "match_phrase" and it's what I looking for. I'm only not able to find a way 
> how to create queries like:
>
>1. Obama BEFORE Iraq - the first word(not term) is before the second 
>in a field text
>2. "President Obama" AFTER Iraq - the phrase "President Obama" is 
>after Iraq in a field text
>
> In other words, the match_phrase doesn't have in_order parameter like 
> span_near and for span_near I have to use terms - have to run analyzer for 
> words befor.
>
> Do you have any idea how to implement these queries?
>
> Thanks
> Petr
>
> Dne pondělí 19. ledna 2015 10:23:21 UTC+1 Lukáš Vlček napsal(a):
>>
>> Hi Petr,
>>
>> let me try to address some of your questions:
>>
>> ad 1) I am not sure I understand what you mean. If you want to use span 
>> type of query then simply use it instead of query string query. Especially, 
>> if you pass user input into the query then it is recommended NOT to use 
>> query string query and you should consider using different query type (like 
>> span query in your case).
>>
>> ad 2) Not sure I fully understand but I can see match for some of those 
>> requested features in span queries. Like "slop". I would recommend you to 
>> read through chapters of "Proximity Matching" [1] to see how you can use 
>> "slop".
>>
>> ad 3) The input that goes into span queries can go through text analysis 
>> process (as long as I am not mistaken). The fact that there are term 
>> queries behind the scene does not mean you can not process your analysis 
>> first.
>>
>> May be if you can share some of your configs/documents/queries we can 
>> help you more.
>>
>> [1] 
>> http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/proximity-matching.html
>>
>> Regards,
>> Lukas
>>
>> On Mon, Jan 19, 2015 at 10:02 AM, Petr Janský  wrote:
>>
>>> Noone? :-(
>>>
>>> Petr
>>>
>>> Dne úterý 13. ledna 2015 15:37:18 UTC+1 Petr Janský napsal(a):

 Hi there,

 I'm looking for a way how to access span_near and span_first 
 functionality to users via search box in gui that uses query string query.

1. Is there any easy way how to do it?
2. Will ElasticSeach folks implement operators like NEARx, BEFOR, 
AFTER, FIRSTx, LASTx to be able search by (using query string):
   - specific max word distance between key words
   - order of key words
   - word position of key word in field from start and end of field 
   text
3. Span queries enable to use only terms, is there a way how to use 
words that will be analysed by lang. analyser - stemming etc.?


 Thanks
 Petr

>>>  -- 
>>> 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 elasticsearc...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/f90a0eba-1b61-4a23-a2af-ec6a0c5e461f%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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/b49027e5-949d-4e35-8907-80dec5137efe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Native script caching

2015-03-17 Thread Sergey Novikov
Hi Adrien,

it works fine: docFieldStrings("_index") and docFieldStrings("_uid")

Thanks for your help.


On Monday, March 16, 2015 at 9:41:46 PM UTC+1, Adrien Grand wrote:
>
> I haven't tried, but getting the value of the _index field should work.
>
> On Mon, Mar 16, 2015 at 12:42 PM, Sergey Novikov  > wrote:
>
>> Hi Adrien,
>>
>> Thank you for the answer.
>>
>> The output of computation depends on document data, and script 
>> parameters. It works already ok, but with caching it seems to be several 
>> times faster.
>>
>> Do you know if it's possible to get the index name from within the 
>> script? I understand I can pass it with the script parameters, but is there 
>> a better solution? Maybe it's already available to the script?
>>
>> On Monday, March 16, 2015 at 7:20:49 PM UTC+1, Adrien Grand wrote:
>>>
>>> indexlookup().getDocId() will not work since these ids change when there 
>>> is a merge. Using a document property is a better idea if the output of 
>>> your computation solely depends on this value. The default configuration 
>>> does not let you have access to _id, but you have _uid however. Beware that 
>>> you might want to also take the index name into account if your cluster is 
>>> serving several indices... But before adding caching, I think it would help 
>>> to figure out if it would be possible to not need caching, eg. by modeling 
>>> data differently?
>>>
>>> On Mon, Mar 16, 2015 at 5:32 PM, Sergey Novikov  wrote:
>>>
 Hi,

 I'm trying to cache script results using 

 cache = CacheBuilder.newBuilder()
> .maximumSize(CACHE_MAX_SIZE)
> .recordStats()
> .build();


 then in the script I have

 @Override
> public Integer run() {
> try {
> return cache.get(getCacheKey(), callable);
> } catch (ExecutionException e) {
> throw new ScriptException(e.getMessage(), e);
> }
> }


 and the callable is:

 new Callable() {
> @Override
> public Integer call() throws Exception {
> return getCalculatedResult();
> }
> };



 Could you please help me to create a proper cache key? I want to keep 
 unique results for each document/index. As I understand, cache is shared 
 between multiple indices, so I need to put it in the cache key.

 Questions:
 1. What should I use to identify the document? Can I use 
 indexLookup().getDocId()? Or I should use 
 docFieldLongs("id").getValue() (I have this field in documents)? Can I 
 access "_id" property?
 2. Can I get the index/type during script execution?

  -- 
 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 elasticsearc...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/elasticsearch/474ad09b-3800-4bd0-a50a-97bfd6d9086e%
 40googlegroups.com 
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> 
>>>  
>>  -- 
>> 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 elasticsearc...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/ae47922a-b970-4089-a46e-d9c6d70d3399%40googlegroups.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> 
>  

-- 
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/a460df1b-d0f1-468a-8bfc-26a07a417577%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Field comparision

2015-03-17 Thread Pavan Kumar
Hi all, 

Is there any way to achieve field comparison. 

If I index a type 
{ 
manager : , 
teamMember : 
} 

how to write a query when a manager is also a teamMember ?

-- 
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/92ac7c28-3810-4b94-820c-0005c086f176%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Operator "and" in highlighting

2015-03-17 Thread Vlad Zaitsev
I noticed some strange behavior of highlighter. It works in a different way 
to search.
See example.

request:
{
"highlight": {
"pre_tags": [
"[b]"
],
"post_tags": [
"[/b]"
],
"fields": {
"message": {}
}
},
"query": {
"constant_score": {
"query": {
"bool": {
"should": [
{
"multi_match": {
"query": "meat",
"analyzer": "standard",
"operator": "and",
"fields": [
"message"
]
}
},
{
"multi_match": {
"query": "fresh cucumbers",
"analyzer": "standard",
"operator": "and",
"fields": [
"message"
]
}
}
]
}
}
}
}
}



Response:
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "test",
"_type": "test",
"_id": "1",
"_score": 1,
"_source": {
"message": "meat, flacky cucumbers"
},
"highlight": {
"message": [
"[b]meat[/b], flacky [b]cucumbers[/b]"
]
}
}
]
}
}

"meat, flacky cucumbers" would not be found by "query": "fresh cucumbers", 
"analyzer": "standard", "operator": "and"
But it seems that highlighter ignore operator: “and” and highlight any term 
from queries.

-- 
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/eee2fd27-a852-4eb3-915d-5a4196e7aafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Shard copying performance

2015-03-17 Thread Michael Salmon
We recently removed index.shard.check_on_startup:fix from our settings and 
haven't had this problem since. The guide says "Should shard consistency be 
checked upon opening" but it appears to also affect replication. I'm not 
going to say that that is wrong although it isn't what I want but I think 
that the guide should be more explicit as to when the checking is done.

On Tuesday, 29 April 2014 15:50:05 UTC+2, Michael Salmon wrote:
>
> I am having trouble replicating a shard and I cannot see any possible 
> reason for it. After 15 minutes I get a timeout in phase 2.
>
> The shard isn't that large about 60,000K, 5GB and 22 segments and the 
> translog directories are empty.
> The computers in question are lightly loaded as is the network between 
> them.
> Copying all the files in the shard from all 4 disks between the two 
> computers with rsync takes about 40 seconds.
> I can't run checkIndex on the source machine as it can't handle shards 
> that are spread over multiple disks but it runs quite happily on the files 
> I copied with rsync although it took a bit over 12 minutes to run the check.
> I have ES 1.1.0 installed.
> I changed some settings but none of them seem to make much difference:
>
>"transient": {
>   "logger": {
>  "level": "TRACE"
>   },
>   "indices": {
>  "store": {
> "throttle": {
>"type": "none"
> }
>  },
>  "recovery": {
> "translog_size": "256MB",
> "concurrent_streams": "16",
> "translog_ops": "1",
> "max_bytes_per_sec": "250MB"
>  }
>   }
>}
>
> Does anyone have any tips on how I should proceed?
>
>

-- 
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/bde6fb91-7b3c-42d7-8e31-7fdb7bdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Query on applying filters to specific panels in Kibana

2015-03-17 Thread narendra reddy


Hi Team I am new to log stash and Elastic search.
 
In my log stash, I get lot of logs, few examples are celery-logs, nginx-logs, 
and management-logs
 
I have created Queries like category==celery-logs, category==nginx-logs and 
category==mgmt-logs
 
Created three panels attaching each specific query to all three, under every 
category there are multiple log levels like info, error, waring..etc
 
How can I create a search pattern which is individual to each panel?
 
I have tried creating filters, however filters are applicable to entire 
dashboard, please suggest me on how to create specific filters confined to 
panels.


Thanks and Regards,
Narendra.

-- 
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/7c158f40-58e6-4696-8850-b906e52f1e0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: doc_values in index template for new generated indexes

2015-03-17 Thread Itamar Syn-Hershko
http://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html#_enabling_doc_values

--

Itamar Syn-Hershko
http://code972.com | @synhershko 
Freelance Developer & Consultant
Lucene.NET committer and PMC member

On Tue, Mar 17, 2015 at 5:35 AM,  wrote:

> Hello,
>
> We have an elasticsearch setup where we are using the default values, so
> no doc_values. How can I add doc_values: true to the index template so that
> the new daily based generated indexes using this feature.
>
> Thank you in advanced!
>
> Cheers
> Chris
>
> --
> 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/81c8614a-4946-49ac-9e98-9af787445b92%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHTr4ZuKEgR0uhttUBVoA2YQ4Cgu8BbX%3DYqZuJsuFzmUJY8Cfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Can we use two wildterm in a wildcard query ?

2015-03-17 Thread Piyush Mishra
Hi EveryOne,

I want to run below query but I am getting no results. Please let me know 
if it feasible.

{
   "query": {
   "bool": {
   "must": [
   {
   "nested": {
   "path": "tokens",
   "query": {
   "bool": {
   "must": [
   {
   "wildcard": {
   "tokens.name": "*value"
   }
   },
   {
   "wildcard": {
   "tokens.name": "value*value"
   }
   }
   ]
   }
   }
   }
   }
   ]
   }
   },
   "sort": [
   {
   "score": {
   "order": "desc"
   }
   }
   ]
}

-- 
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/fd33039a-da11-4b04-831e-d1217d1737a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Elasticsearch - node client doesn't connect to cluster

2015-03-17 Thread Pavel
 

I have one physical server and I work only on it (no other servers).

At this server I have running elastic 1.4.2 - I use this version as this is 
the last version elastic osgi bundle is ready for. Also at this server I 
have glassfish 4.1 as java-ee server.

I run elastic node client inside my java-ee application. And I do it this 
way:

> Node node = 
> nodeBuilder().local(true).clusterName("elasticsearch").node();Client client = 
> node.client();GetResponse getResponse = client.prepareGet("my.index-0.2.2", 
> "post", "1").execute().actionGet();Map source = 
> getResponse.getSource();System.out.println("--");System.out.println("Index:
>  " + getResponse.getIndex());System.out.println("Type: " + 
> getResponse.getType());System.out.println("Id: " + 
> getResponse.getId());System.out.println("Version: " + 
> getResponse.getVersion());System.out.println(source);
>
> In log I see the following:

[2015-03-17T12:57:44.447+0400] [glassfish 4.1] [INFO] [] 
[org.elasticsearch.discovery] [tid: _ThreadID=30 
_ThreadName=http-listener-1(1)] [timeMillis: 1426582664447] [levelValue: 
800] [[ [Pistol] elasticsearch/SCKIrGHQTaC5eEYmYfZ0Iw]]

[2015-03-17T12:57:44.449+0400] [glassfish 4.1] [INFO] [] 
[org.elasticsearch.cluster.service] [tid: _ThreadID=128 
_ThreadName=elasticsearch[Pistol][clusterService#updateTask][T#1]] 
[timeMillis: 1426582664449] [levelValue: 800] [[ [Pistol] master {new 
[Pistol][SCKIrGHQTaC5eEYmYfZ0Iw][webserver1.com][local[1]]{local=true}}, 
removed 
{[Pistol][uwaWFb6KTy2Sdoc8TNwdSQ][webserver1.com][local[1]]{local=true},}, 
reason: local-disco-initial_connect(master)]]

[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
[org.elasticsearch.http] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] bound_address 
{inet[/0:0:0:0:0:0:0:0:9202]}, publish_address {inet[/SERVER IP:9202]}]]

[2015-03-17T12:57:44.502+0400] [glassfish 4.1] [INFO] [] 
[org.elasticsearch.node] [tid: _ThreadID=30 _ThreadName=http-listener-1(1)] 
[timeMillis: 1426582664502] [levelValue: 800] [[ [Pistol] started]]

and I the this exeption: ...

Caused by: org.elasticsearch.indices.IndexMissingException: 
[my.index-0.2.2] missing
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:768)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteIndices(MetaData.java:691)
at 
org.elasticsearch.cluster.metadata.MetaData.concreteSingleIndex(MetaData.java:748)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:139)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction$AsyncSingleAction.(TransportShardSingleOperationAction.java:116)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:89)
at 
org.elasticsearch.action.support.single.shard.TransportShardSingleOperationAction.doExecute(TransportShardSingleOperationAction.java:55)
at 
org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:75)
at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
at 
org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
at 
org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
at 
org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)

So it can't find the index - my.index-0.2.2. However this index exists! 
Besides, when I do curl -XGET 
'http://localhost:9200/_cluster/state?pretty=1' I see there only one node 
and this *is not* SCKIrGHQTaC5eEYmYfZ0Iw. I suppose that the node I create 
using java API creates new cluster and dosn't connect to my existing 
cluster - that's why it says - it's master. Or I don't understand something 
I have problem with code. Besides I've checked tha name of cluster it's 
elasticsearch. So, how can I connect to my existing elasticsearch cluster?

-- 
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/7b60cade-8597-4f94-b5bd-b9af9bc84da8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Kibana 4 does not see _timestamp field

2015-03-17 Thread Micah Yoder
For the record, I had to add the _timestamp field into the meta-fields in 
the Kibana advanced configuration settings ... 

-- 
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/4b8bb9a0-8924-4265-8c31-ee70bc508612%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: PayloadTermQuery in ElasticSearch

2015-03-17 Thread joergpra...@gmail.com
The concrete implementation depends on what you store in the payload (e.g.
scores)

Jörg

On Tue, Mar 17, 2015 at 7:01 AM, Devaraja Swami 
wrote:

> I need to use PayloadTermQuery from Lucene.
> Does anyone know how I can use this in ElasticSearch?
> I am using ES 1.4.4, with the Java API.
> In Lucene, I could use this by directly instantiating PayloadTermQuery,
> but there are no APIs in ES QueryBuilders for this.
> I don't need a query parser, because I can build the query directly using
> the Java API (don't need a JSON representation of the query),
> so I only need to be able to construct, in Java, a query builder
> encapsulating a PayloadTermQuery.
>
> Thanks in advance!
>
> -devarajaswami
>
>  --
> 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/8fc84082-6fc7-42aa-9caf-8ab527bc8a0b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAKdsXoFwk_Ve_OK9J%2BfsEzGwbtOnaL7%2BeqT%3DR61hCoX8Mzi-fQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


ES performance tunning

2015-03-17 Thread Hoon Cho

I was searching for ES performance by google and I find some documents.
They says modify ES config is good for ES performance.
So, I edit my ES config like below.

*/etc/elasticsearch/elasticsearch.yml*
index.number_of_replica: 0
index.number_of_shards: 3
index.translog.flush_threshold_ops: 5
index.refresh_interval: -1
indices.memory.index_buffer_size: 50%
index.store.type: mmapfs
bootstrap.mlockall: true

*/etc/default/elasticsearch*
ES_HEAP_SIZE: 4g (my machine has 8g RAM)
MAX_LOCKED_MEMORY=unlimited


After configure above restart ES and LS.

*# /etc/init.d/elasticsearch restart && sudo restart logstash*


And make sure ES setting is correctly using curl command.

*# curl 'localhost:9200/logstash-iis-test04/_settings?pretty'*
{
  "logstash-iis-test04" : {
"settings" : {
  "index" : {
"creation_date" : "1426555104697",
"uuid" : "0PuOIGj-RnKS9cMKXbsryQ",
"number_of_replicas" : "0",
"number_of_shards" : "3",
"refresh_interval" : "5s",
"version" : {
  "created" : "1010199"
}
  }
}
  }
}

​As you see, index.number_of_replicas and index.number_of_shards values is 
correct
but , index.refresh_interval is not correct (I set this value is -1)
and another setting is not shown, where can I find another settings?

I want to see settings like index.translog.flush_threshold_ops, 
index.refresh_interval, indices.memory.index_buffer_size, index.store.type, 
bootstrap.mlockall..
and want to know this settings is correctly applied.

Maybe you know why this result is shown, please advice to me.

Regards



-- 
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/b7f46e6b-d212-4d0d-b577-86e0056438ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Elasticserach-PHP error

2015-03-17 Thread Arul murugan Ramalingam
I was trying to workout the example from the below link

Search Engine with PHP & Elasticsearch - YouTube 


I cannot index the document (add.php example).

only When I remove the code for the Indexing the html form appears.

index([
'index' => 'articles',
'type' => 'article',
'body' => [
'title' => $title,
'body' => $body,
'keywords' => $keywords
]
]);

if($indexed) {
print_r($indexed)
}
}
}
?>




Add in ES
 

 


 Title





Body




Keywords










Thanks in Advance

-- 
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/71680616-7733-4244-a78e-6342013d2564%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.