Partial results when querying an alias

2013-12-21 Thread Yarin Miran


In an effort to create multi-tenant architecture for my project. I've 
created an elasticsearch cluster with an index 'tenant'

"tenant" : { "some_type" : { "_routing" : { "required" : true, "path" : 
"tenantId" }

The tenant index has 2 shards, no replicas.

I've also created aliases - 

"tenant" : {
"aliases" : {
  "tenant_1" : {
"index_routing" : "1",
"search_routing" : "1"
  },
  "tenant_2" : {
"index_routing" : "2",
"search_routing" : "2"
  },
  "tenant_3" : {
"index_routing" : "3",
"search_routing" : "3"
  },
  "tenant_4" : {
"index_routing" : "4",
"search_routing" : "4" 

  }

During testing we noticed that querying tenant_2 yielded 80 records while 
there were far more records with tenantId=2 in the index 'tenant' - about 
300 records.

And here's the strangest part - when I created a new alias 'tenant_test' 
correlating to the alias 'tenant_2' querying it worked perfectly and so 
does querying the problematic 'tenant_2'

I've tried to reproduce the problem but without any success. 

We're really concerned about this, while we really want to use aliases in 
production to increase our scaling capabilities.
Anyone has any clues about what can cause this ? 

Thanks in advance,
Yarin.
 

-- 
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/842209b5-0a1e-42ac-a7dc-b08db200110e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


specifying the search analyzer for a multi_match query

2013-12-21 Thread Igal @ getRailo.org

hi,

I've defined a custom analyzer that does stemming (kstem) and synonym 
expansion, called "synonym_analyzer".


I've set it as the default analyzer for the index, i.e.
settings.analysis.analyzer.default.type: "synonym_analyzer"

I've also set it explicitly as the analyzer for the "title" and 
"description" fields, which are the fields that I am searching on.


now I'm running a multi_match query on the "title" and "description" 
fields, like so:


GET /_search
{
"query": {
"multi_match"  : {
 "query"   : "red widgets"
,"fields"  : [ "title^3", "description" ]
,"operator": "and"
}
}
}

I expect the search results for "red widget" and "red widgets" to be 
identical, since the "synonym_analyzer" does stemming, but instead I get 
slightly different results (2 more results on the singular term vs. the 
plural term).


testing the analyzer with

GET /myindex/_analyzer?text=Widgets returns "widgets"

while

GET /myindex/_analyzer?text=Widgets&analyzer=synonym_analyzer returns 
"widget"


so it looks like the default analyzer is not the synonym_analyzer as I 
expect it to be.  what am I doing wrong?  or how can I specify the 
analyzer to use in the query so that the search terms are stemmed?


TIA,


Igal

--
Igal Sapir
Railo Core Developer
http://getRailo.org/

--
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/52B68541.9010401%40getrailo.org.
For more options, visit https://groups.google.com/groups/opt_out.


Re: spring-elasticsearch

2013-12-21 Thread avinash paul
Thank you will try it out
On 20 Dec 2013 17:31, "David Pilato"  wrote:

> I think 0.3.0 will work.
>
> --
> *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
> @dadoonet  | 
> @elasticsearchfr
>
>
> Le 20 décembre 2013 at 12:34:21, paul 
> (avinashpau...@gmail.com)
> a écrit:
>
> Hi ,
>
> Right now i am using the below versions of spring elastic-search. If i
> want to upgrade to latest elasticsearch 0.90.8 what version of "spring" and
> "spring-elasticsearch" should i use
>
>  
> fr.pilato.spring
>  spring-elasticsearch
> 0.2.0
> 
> 
> org.elasticsearch
> elasticsearch
> 0.90.0
> 
>  
> org.springframework
> spring-core
> 3.0.7.RELEASE
> 
>
> Regards
> paul
>  --
> 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/a3f28e5f-4e8f-4750-9f2c-ae1c52c05707%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  --
> 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/gFlaU221sEU/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/etPan.52b431a4.47398c89.111%40MacBook-Air-de-David.local
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAO066G1LUxd2Ede%3DDeBqgzg83dtaryWwA-40n3D6Nsw3ZgYLDA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Possible to make ES Node Name same as Hostname?

2013-12-21 Thread Karol Gwaj
elasticsearch config file supports environment variables (and java system 
properties) substitution 

for example (elasticsearch.yml):
*node.name: ${name}*

*${name}* will be replaced with environment variable (export 
name=) or system property (ES_JAVA_OPTS="-Dname=")



On Saturday, December 21, 2013 11:51:33 PM UTC, Tony Su wrote:
>
> System:
> Java  openJDK 1.7
> elasticsearch 0.90.7
>  
>  
> Following some old instructions, I modified
> /etc/sysconfig/elasticsearch
> ES_JAVA_OPTS="-Des.node.name=$(name -n cut -d'.' -f1)"
>  
> But, that crashes the elasticsearch service on start.
> I've tried the entry both with and without the double-quotes.
>  
> Commenting out the entry restores the elasticsearch functionality so it 
> starts up without error again.
>  
> At the moment, it looks like Elasticsearch might be using only a randomly 
> generated string to identify Elasticsearch nodes in a cluster.
> Elasticsearch-head appears to be assigning random "friendly names" to each 
> node, but for consistency from session it would be far preferable for the 
> Elasticsearch Node Name to be the same as the Hostname of the machine.
>  
> Am hoping this is not a problem with openJDK and would have to install 
> Oracle Java instead (would be somewhat surprising if this would be a cause).
>  
> Thx,
> TS
>

-- 
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/557510ac-573f-46fd-867a-af555dad03c5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Number of Master eligible nodes

2013-12-21 Thread Search User
Thanks Jorg. But can you please explain why it doesn't make sense? I 
started with one and increased the data nodes. With more data nodes, I 
started seeing better indexing throughput and my queries seem to be running 
fast. I don't have numbers to give you but I can definitely run the 
experiment and post.

Thanks

On Tuesday, December 17, 2013 8:31:47 PM UTC-5, Jörg Prante wrote:
>
> Start with 1 ES node per server. It makes not much sense to have 6 nodes 
> per server, even on "very powerful" servers.
>
> Jörg
>
> 

-- 
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/ea7933b8-1d01-4e71-8a71-c916d27e2c61%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Possible to make ES Node Name same as Hostname?

2013-12-21 Thread Tony Su
System:
Java  openJDK 1.7
elasticsearch 0.90.7
 
 
Following some old instructions, I modified
/etc/sysconfig/elasticsearch
ES_JAVA_OPTS="-Des.node.name=$(name -n cut -d'.' -f1)"
 
But, that crashes the elasticsearch service on start.
I've tried the entry both with and without the double-quotes.
 
Commenting out the entry restores the elasticsearch functionality so it 
starts up without error again.
 
At the moment, it looks like Elasticsearch might be using only a randomly 
generated string to identify Elasticsearch nodes in a cluster.
Elasticsearch-head appears to be assigning random "friendly names" to each 
node, but for consistency from session it would be far preferable for the 
Elasticsearch Node Name to be the same as the Hostname of the machine.
 
Am hoping this is not a problem with openJDK and would have to install 
Oracle Java instead (would be somewhat surprising if this would be a cause).
 
Thx,
TS

-- 
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/b1d601c0-95c7-475c-9c40-1814aa316843%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Ubuntu, Unable to reach host

2013-12-21 Thread Jack Park
Interesting stuff. I'll simply report what I did for the record.
I did install the latest Oracle jdk, but, I think I didn't fully do
the install; it's not like windoz where you just install it and set
the system paths, etc. There's more with Ubuntu, which I did not do.
But, when I purged OpenJDK, it unmasked an Oracle java 6, so I left
that.

The network issue resolved, finally, to some really hairy details of
setting up eth0 on that box, which is sitting on a local gigabit
network.  I finally got that running, then opened up ES ports in the
Windoz firewall, and am happy to report it's running fine now.

Many thanks
Jack

On Sat, Dec 21, 2013 at 1:45 PM, Mark Walkom  wrote:
> Can you telnet from either host to the other on 9200/9300?
>
> Also, that's a super old JDK, if you have to use OpenJDK then upgrade, but
> you should ideally be on Oracle's 7 release 25.
>
> Regards,
> Mark Walkom
>
> Infrastructure Engineer
> Campaign Monitor
> email: ma...@campaignmonitor.com
> web: www.campaignmonitor.com
>
>
> On 22 December 2013 08:09, Jack Park  wrote:
>>
>> I just now installed the latest ES distro on an Ubuntu box with OpenJDK
>> 6b27.
>>
>> It's failing to reach host -- that's an error that googles well, but
>> with nothing that I've seen to help.
>>
>> The box is sitting at 10.1.10.179 and is pingable on its local network
>> from a host windoz box (firewall off). It can ping out. But, ES
>> refuses to boot.
>>
>> Using ifconfig and route, I've managed to see the host to 10.1.10.1,
>> which is the default gateway on the windoz box running this network.
>>
>> I'd appreciate some hints at what I might be missing.
>>
>> BTW: the same build on another windoz box is running faultlessly.
>>
>> Thanks
>> Jack
>>
>> --
>> 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/CAH6s0fzW%3DLETjoNqSLxsDEihQ%2BT_xeC6hYHdE-n%3Dot-DpR_jkQ%40mail.gmail.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAEM624YGw%3DdqsyD8JE0ojavB3rV3LKSLiyoP1vgT7GqR-K2gsg%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzZT297F2AoANROYFB9MQiiCiObPy1pDZ-utciRx5N2ig%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help with a Query DSL

2013-12-21 Thread Bijuv V
Got the problem - typos ! startime instead of starttime 

Sense extension really helps in such things! 

Op zaterdag 21 december 2013 13:45:13 UTC+1 schreef Bijuv V:
>
> Hi Sina
>
> i tried your approach and something seems wrong - 
>
>
> PUT availswitharray
>
> PUT availswitharray/avail/_mapping
> {
>  "avail" :
> {
> "properties" :
> {
> "locationid": {type:"long"},
> "roomid" : {"type" : "long"},
>"starttime" : {"type":"date", "format": "hour_minute"}
>   
>
> }
> }
> }
>
>
> POST availswitharray/avail/1
> {
> locationid:"1",
> roomid:"10",
> starttime:[ "08:45","09:00"]
> }
>
>
>
> POST availswitharray/avail/3
> {
> locationid:"2",
> roomid:"100",
>  startime:[ "08:45"]
> }   
>
>
> POST availswitharray/avail/4
> {
> locationid:"2",
> roomid:"101",
> startime:[ "09:00" ]
> } 
>
> POST availswitharray/avail/5
> {
> locationid:"3",
> roomid:"200",
> starttime:[ "09:30" ]
> 
> }
>
>
>
> POST availswitharray/avail/_search?pretty=true
> {
>  "filter": 
>{
>   "bool": {
>   "must":
>   [
>  {
>  "term": 
>  {
> "starttime": {"value": "09:00" }
>  } 
>  }
>
>   ]}
>
> }
> }
>
> The search should return avail/4 and avail/1 but it returns only avail/1. 
>
>
> Op zaterdag 21 december 2013 12:06:45 UTC+1 schreef Sina Tamanna:
>>
>> It is a bit tricky to do such query, because the way the data is indexed. 
>> I can't see an obvious solution but perhaps someone else knows better. 
>> Though what I can suggest is that you change the structure of your index, 
>> if that is a possibility. 
>>
>> Index you data by location_id and room_id and keep all the available 
>> time slots in a single document as follows:
>>
>> POST slots/slot/1
>> {
>> "location_id":1,
>> "room_id": 10,
>> "start_time": [ "08:45", "09:00"]
>> }
>>
>> Now you could do a bool query with must on start_time:
>>
>> {
>>"query": {
>>   "bool": {"must": [
>>  {"term": {
>> "start_time": {
>>"value": "08:45"
>> }
>>  }},
>>  {"term": {
>> "start_time": {
>>"value": "09:00"
>> }
>>  }}
>>   ]}
>>}
>> }
>>
>> I also suggest that you disable the analyzer on the start_time field. 
>> Hope that helped!
>>
>> On Friday, December 20, 2013 9:16:08 PM UTC+1, Bijuv V wrote:
>>>
>>>
>>> I have the data in the following format in Elastic Search  (from sense) 
>>>
>>> POST slots/slot/1
>>> {
>>> locationid:"1",
>>> roomid:"10",
>>> starttime: "08:45"
>>> }
>>>
>>> POST slots/slot/2
>>> {
>>> locationid:"1",
>>> roomid:"10",
>>> starttime: "09:00" 
>>> }   
>>>
>>>
>>> POST slots/slot/3
>>> {
>>> locationid:"2",
>>> roomid:"100",
>>> starttime: "08:45"
>>> }   
>>>
>>>
>>> POST slots/slot/4
>>> {
>>> locationid:"2",
>>> roomid:"101",
>>> starttime: "09:00"
>>> } 
>>>
>>> POST slots/slot/5
>>> {
>>> locationid:"3",
>>> roomid:"200",
>>> starttime: "09:30"
>>> }
>>>
>>> In short , the data is in the following format. 
>>>
>>> A Location has multiple rooms and each room has multiple slots of 15 
>>> minutes. So slot 1 for Room10  starts at 8:45 and ends at 09:00, Slot 2 for 
>>> same room starts at 09:00 and ends at 09:15
>>>
>>> Locationid   RoomId  Starttime
>>> 1 10 08:45
>>> 1 10  09:00
>>> 2 100   08:45
>>> 2 101   09:00
>>> 3  200  09:30 
>>>
>>> Im trying to write a query/filter which will give me all locations where 
>>> a room is available with two or three slots. 
>>>
>>> For e.g Find a location that has 08:45 slot and 09:00 slot 
>>> (configurable) 
>>>  Answer should be location 1 only
>>> Should Not be location 2 as room 100 has 08:45 slot but not the 09:00 
>>> slot. Room 101 has 09:00 slot but doesnt have the 08:45 slot
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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/6af25a1d-dbd5-464f-8447-d7b53c82bf3d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


how to ensure that rivers are equally distributed across nodes in the cluster

2013-12-21 Thread Karol Gwaj
Hi,

is there any build-in way to ensure that rivers are equally distributed 
across nodes in the elasticsearch cluster ?
(i have like 100 rivers pulling data from different sources and i will like 
to avoid situation when they all run on this same node (i want to 
distribute the load across cluster))

as i understand river will try run on the node on which it was created,
is it possible (from inside plugin) to force creation of the river on 
another node (the Client object obtained from inside plugin only talks to 
current (local) node) ?

thx for any help,


-- 
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/0facc47e-39b3-4b10-a7eb-faf847516693%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: geo_point mapping with two fields

2013-12-21 Thread Karol Gwaj
to work with the mapping above your indexed document will have to look 
something like that:
{
"id" : 1234,
*"location" : *
*{*
*"lat" : 53.1,*
*"lon" : -6.1*
*}*
}

if for some reason your document have to have flat structure, then you can 
try computed fields plugin: 
https://github.com/SkillPages/elasticsearch-computed-fields


Cheers,


On Saturday, December 21, 2013 4:14:38 PM UTC, Moh wrote:
>
> Hi, 
>
>
> I'm writing a river from MySQL to ElasticSearch with JDBC River.
>
> I'm facing the problem which is to map two fields from a table (lat : 
> double, lon : double) to one elasticseach property geo_point.
>
>
> I trying this but it does not work.
>
>   "properties": {
> "_id": {
> "type": "long",
> "store": "yes"
> },
> "location": { 
> "type": "geo_point", 
> "lat_lon": true,
> "fields": {
> "lon": {
> "type": "double",
> "store": "yes"
> },
> "lat": {
> "type": "double",
> "store": "yes"
> }
> }
> }
> }
>
>
>
> How can I solve this problem.
>
> Thanks
>
>

-- 
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/29c451fb-6da1-44f8-8115-efebf2e9e55a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Ubuntu, Unable to reach host

2013-12-21 Thread Mark Walkom
Can you telnet from either host to the other on 9200/9300?

Also, that's a super old JDK, if you have to use OpenJDK then upgrade, but
you should ideally be on Oracle's 7 release 25.

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com
web: www.campaignmonitor.com


On 22 December 2013 08:09, Jack Park  wrote:

> I just now installed the latest ES distro on an Ubuntu box with OpenJDK
> 6b27.
>
> It's failing to reach host -- that's an error that googles well, but
> with nothing that I've seen to help.
>
> The box is sitting at 10.1.10.179 and is pingable on its local network
> from a host windoz box (firewall off). It can ping out. But, ES
> refuses to boot.
>
> Using ifconfig and route, I've managed to see the host to 10.1.10.1,
> which is the default gateway on the windoz box running this network.
>
> I'd appreciate some hints at what I might be missing.
>
> BTW: the same build on another windoz box is running faultlessly.
>
> Thanks
> Jack
>
> --
> 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/CAH6s0fzW%3DLETjoNqSLxsDEihQ%2BT_xeC6hYHdE-n%3Dot-DpR_jkQ%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAEM624YGw%3DdqsyD8JE0ojavB3rV3LKSLiyoP1vgT7GqR-K2gsg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Ubuntu, Unable to reach host

2013-12-21 Thread Jack Park
I just now installed the latest ES distro on an Ubuntu box with OpenJDK 6b27.

It's failing to reach host -- that's an error that googles well, but
with nothing that I've seen to help.

The box is sitting at 10.1.10.179 and is pingable on its local network
from a host windoz box (firewall off). It can ping out. But, ES
refuses to boot.

Using ifconfig and route, I've managed to see the host to 10.1.10.1,
which is the default gateway on the windoz box running this network.

I'd appreciate some hints at what I might be missing.

BTW: the same build on another windoz box is running faultlessly.

Thanks
Jack

-- 
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/CAH6s0fzW%3DLETjoNqSLxsDEihQ%2BT_xeC6hYHdE-n%3Dot-DpR_jkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Query Panel No Longer Works

2013-12-21 Thread Chris Lawless
I'm new to Kibana, I'm running as a front end to logstash and getting to 
grips with configuring panels etc. I finally got my panel looking how I 
wanted it with a Query defined, stacjed histogram etc so I changed its name 
and saved it so I could maintain my original too.

Since then I can no longer access the Query area, it shows up but if I try 
to toggle it nothing displays, as such in the different panels they all 
behave as though the query is there but I have no way to see it or edit it 
the content.

Is there a way to reset thinks back to standard if I cannot restore the 
query? I assume this is all saved in the ES database which I don't really 
understand how to manipulate and would rather not rebuild as I've just 
processed 30Gb of logs in to it!

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/064705ff-d2e4-4976-ba0f-d576ad2af462%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Can I specify filters, facets and highlights with MLT?

2013-12-21 Thread project2501
Hi, 
  Trying to get MLT to behave like a normal search, but getting some errors.

Does MLT support filters (I see in the docs it does), facets and highlights 
the same way normal search does?

thanks.

-- 
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/0cb30275-784a-47f9-a13f-f0488db29f53%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple datadir vs RAID0

2013-12-21 Thread joergpra...@gmail.com
RAID0: hardware, with sliced drives (all drives are the same) give optimal
speed

multiple data dirs: software, can not be reverted, config overhead if disk
sizes and speeds are unbalanced

Many controllers support JBOD (concatenating different sized drives into
one drive). I'd even prefere JBOD over multiple data dirs.

Jörg

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


Re: autocomplete mapping error

2013-12-21 Thread Joshua Corb
So it seems not to be on the server side but on the client side. It doesn't
seem to connect to a server, and brings some sort of local instance up.
Within the searchContext-elasticsearch.xml



http://www.springframework.org/schema/beans"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
xmlns:elasticsearch="
http://www.springframework.org/schema/data/elasticsearch";
xmlns:repository="http://www.springframework.org/schema/data/repository";
xsi:schemaLocation="
http://www.springframework.org/schema/data/elasticsearch
http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/data/repository
http://www.springframework.org/schema/data/repository/spring-repository.xsd
">


 














How can I make this section read from a specific file to load the mappings?
I've also tried passing the settings path through the jvm settings.




On Thu, Dec 19, 2013 at 4:46 PM, Lee Hinman wrote:

> On Thursday, December 19, 2013 4:40:21 PM UTC-7, Joshua Corb wrote:
>>
>> I have a feeling the issue is the application has a embedded version of
>> elastic search. Is there a default path that elastic search will look for a
>> configuration? Or a java variable I can add that will force it to look in a
>> specific path?
>>
>>
> You can configure it with the `-Des.path.conf` jvm configuration variable.
> You can also retrieve the currently configured settings with the following:
>
> curl 'localhost:9200/_nodes/settings?pretty'
>
> which will look something like this (this example includes how your
> analyzers will look):
>
> {
>   "ok" : true,
>   "cluster_name" : "vouchd-search",
>   "nodes" : {
> "nKB19zwmSY-a56JGPWqj9Q" : {
>   "name" : "Midas",
>   "transport_address" : "inet[/10.175.76.85:9300]",
>   "hostname" : "Xanadu.local",
>   "version" : "0.90.7",
>   "http_address" : "inet[/10.175.76.85:9200]",
>   "settings" : {
> "path.home" : "/Users/hinmanm/esi/elasticsearch-0.90.7",
> "foreground" : "yes",
> "index.analysis.analyzer.autocomplete.type" : "custom",
> "index.analysis.analyzer.autocomplete.filter.0" : "lowercase",
> "index.analysis.analyzer.autocomplete_search.tokenizer" : 
> "whitespace",
> "index.analysis.analyzer.autocomplete_search.type" : "custom",
> "cluster.name" : "vouchd-search",
> "index.analysis.analyzer.autocomplete_search.filter.0" : "lowercase",
> "index.analysis.filter.auto_edge_ngram.max_gram" : "15",
> "index.analysis.filter.auto_edge_ngram.min_gram" : "2",
> "index.analysis.filter.auto_edge_ngram.type" : "edgeNGram",
> "index.analysis.analyzer.autocomplete.tokenizer" : "whitespace",
> "name" : "Midas",
> "path.logs" : "/Users/hinmanm/esi/elasticsearch-0.90.7/logs"
>   }
> }
>   }
> }
>
>
>  --
> 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/8oB1lM8sUHg/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/104edaa2-3c93-4021-a6ae-8b616ec6a516%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAG%2BZfhDK1deN3ZQc7iGk9E4nYqFaDmKNc-7YGmhve8mBF7y-XQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


geo_point mapping with two fields

2013-12-21 Thread Moh
Hi, 


I'm writing a river from MySQL to ElasticSearch with JDBC River.

I'm facing the problem which is to map two fields from a table (lat : 
double, lon : double) to one elasticseach property geo_point.


I trying this but it does not work.

  "properties": {
"_id": {
"type": "long",
"store": "yes"
},
"location": { 
"type": "geo_point", 
"lat_lon": true,
"fields": {
"lon": {
"type": "double",
"store": "yes"
},
"lat": {
"type": "double",
"store": "yes"
}
}
}
}



How can I solve this problem.

Thanks

-- 
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/10f81de3-b539-4a2c-8d2f-ae7af5e3acb6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Bulk UPD Not Listening?

2013-12-21 Thread Jay Flowers
That did the trick! Thank you.


On Sat, Dec 21, 2013 at 6:19 AM, Alexander Reelsen  wrote:

> Hey
>
> try with new lines after the action and the document (and also have one at
> the end).
>
>
> --Alex
>
>
> On Fri, Dec 20, 2013 at 7:47 PM, Jay Flowers wrote:
>
>> I can input data over http with this curl command:
>>
>> curl -XPOST 'http://localhost:9200/test/type1/' -d '{"name":
>> "metric_name", "value": 4, "timestamp": 1365624293, "tags": { "service":
>> "some_service", "some_tag": "some_value" }}'
>>
>> I am unsure what the nc command would look like.  I saw that nc has some
>> issues so I have also be using a Ruby script:
>>
>> require 'socket'
>>
>>  u2 = UDPSocket.new
>> u2.connect("localhost", 9700)
>> u2.send('''{ "index" : { "_index" : "test", "_type" : "type1" } }{"name":
>> "metric_name", "value": 2, "timestamp": 1365624308, "tags": { "service":
>> "some_service", "some_tag": "some_value" }}''', 0)
>>
>> I see nothing in the logs for the UDP attempts
>>
>>
>>
>>
>> On Fri, Dec 20, 2013 at 1:00 PM, Jay Flowers wrote:
>>
>>> Okay I got it enabled.  Now I can't seem to get any data inserted over
>>> udp.  Is there some other entry for logging to show failed udp attempts?
>>>
>>>
>>> On Fri, Dec 20, 2013 at 11:03 AM, Alexander Reelsen 
>>> wrote:
>>>
 Hey

 set "bulk.udp" log level to debug in logging.yml and restart.. you
 should see the current configuration being printed out.

 you could also start bin/elasticsearch -Des.bulk.udp.enabled=true and
 see if it works.


 --Alex


 On Fri, Dec 20, 2013 at 3:24 PM, Jay Flowers wrote:

> I have added the following
> to /usr/local/elasticsearch-0.90.5/config/elasticsearch.yml
>
> bulk.udp.enabled: true
>
> I do not see anything in the logs that relates to udp or ports
> 9700-9800
>
> What else can I do to debug this?
>
>
>
> On Fri, Dec 20, 2013 at 6:26 AM, Alexander Reelsen 
> wrote:
>
>> Hey,
>>
>> it is disabled by default, see
>> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk-udp.html
>>
>> did you enable it and it still is not listening? You should see
>> something like this in your log file if you enabled it:
>> [INFO ][bulk.udp ] [Starstreak] address
>> /0:0:0:0:0:0:0:0:9700
>>
>>
>> --Alex
>>
>>
>> On Fri, Dec 20, 2013 at 3:50 AM, Jay Flowers 
>> wrote:
>>
>>> Is there anything I need to do to get the UDP Bulk listener up and
>>> running?  I do not see any data after sending in the instance nor do I 
>>> see
>>> the port 9700 being used in a netstat -lu command.
>>>
>>> --
>>> 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/ffb8bfc6-4478-4fe9-b8ae-e8046f652d67%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to elasticsearch+unsubscr...@googlegroups.com.
>>  To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_yhtgihgH%2BoCXYiAYk_DvqgYudT2t8hgtU3Ex_DbKXuQ%40mail.gmail.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Jay Flowers
> --
> http://jayflowers.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/CALxqcNTMKW94vGT0WS57-gCKoYe9W7mwvbXmpK1Hvju0aeHZvg%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

  --
 You received this message because you are subscribed to the Google
 Groups "elasticsearch" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to elasticsearch+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8n9Wj%2Bqvn9WCgM1xnvEe8qLU3rT%2BmhFUGoX3Y-me05gg%40mail.gmail.com
 .

 For more optio

Re: Did ES ever consider replacing current query DSL with an external DSL?

2013-12-21 Thread joergpra...@gmail.com
Opensearch is a bit silent, but not defunct, there is a low activity
mailing list

https://groups.google.com/forum/#!forum/opensearch

My impression is there is not much more Opensearch can be developed into,
as a "de facto" very lightweight standard.

Example

http://chroniclingamerica.loc.gov/search/pages/results/?proxtext=ducks&format=json

That is a special endpoint search that understands a simplified query
parameter. The query parameter can be anything, for example an SQL-like
syntax like xin zhang suggested.

The effect would be the integration of ES into 3rd party products that
offer simplified search.

Opensearch is known from browser search forms like Firefox search plugins.
This would of course not replace ES official clients, but some PoCs were
easier ("let's get some ES results in our product and show it in the
browser").

OpenSearch integration into Wikis, Blogs
http://www.opensearch.org/Community/OpenSearch_software

OpenSearch Geo
http://www.weichand.de/2010/10/27/opensearch-geo-die-einfache-raeumliche-suche/

All in all, what the plugin would have to do is a bit of processing
simplified queries and reformatting ES JSON result, preferably as Atom
feeds, both XML and JSON. So a reverse HTTP proxy could just pass
parameters and results.

Jörg


On Sat, Dec 21, 2013 at 10:06 AM, Lukáš Vlček  wrote:

> Jörg,
> is opensearch active? The last time I checked it it seemed pretty much
> dead.
> Lukáš
>
>

-- 
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/CAKdsXoFM1HQ5_5PtGRrSazBzGns-ZEX-rwtPqrNXUL2RgYJngw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Adding EC2 settings to elasticsearch.yml stops listening to port 9200

2013-12-21 Thread Karel Minařík


> I got the same behaviour when /var/lib/elasticsearch/elasticsearch was a 
> dangling symlink (...) so I thought it might be storage related...? 
>

Hmm, still, Elasticsearch should complain in the logs when the data dir is 
not accessible. Might be related to S3 gateway...
 

> Is there something else I could use instead when I run out of 
> space on the instance itself?  Because I fill up the disk on the 
> instance pretty quickly.


Very good option on EC2  are EBS volumes, notably the IOPS (optimized or 
high I/O) ones. You can easily create snapshots, unmount the volume and 
mount it at different instance, etc.

(Some people also use ephemeral disks (which are *huge* for reasonably 
large instances), and simply use lots of replicas to guard against data 
loss...)

Karel

P. S.

The http://www.elasticsearch.org/tutorials/elasticsearch-on-ec2/ tutorial, 
though quite old, is well worth thorough reading for understanding all the 
mechanics on EC2. There's another 
tutorial, 
http://www.elasticsearch.org/tutorials/deploying-elasticsearch-with-chef-solo/, 
which automates many of the steps with Chef.

-- 
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/c33370fe-7ec4-4a2a-941a-b77cd8a3203c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help with a Query DSL

2013-12-21 Thread Bijuv V
Hi Sina

i tried your approach and something seems wrong - 


PUT availswitharray

PUT availswitharray/avail/_mapping
{
 "avail" :
{
"properties" :
{
"locationid": {type:"long"},
"roomid" : {"type" : "long"},
   "starttime" : {"type":"date", "format": "hour_minute"}
  
   
}
}
}


POST availswitharray/avail/1
{
locationid:"1",
roomid:"10",
starttime:[ "08:45","09:00"]
}



POST availswitharray/avail/3
{
locationid:"2",
roomid:"100",
 startime:[ "08:45"]
}   


POST availswitharray/avail/4
{
locationid:"2",
roomid:"101",
startime:[ "09:00" ]
} 

POST availswitharray/avail/5
{
locationid:"3",
roomid:"200",
starttime:[ "09:30" ]

}



POST availswitharray/avail/_search?pretty=true
{
 "filter": 
   {
  "bool": {
  "must":
  [
 {
 "term": 
 {
"starttime": {"value": "09:00" }
 } 
 }
   
  ]}
   
}
}

The search should return avail/4 and avail/1 but it returns only avail/1. 


Op zaterdag 21 december 2013 12:06:45 UTC+1 schreef Sina Tamanna:
>
> It is a bit tricky to do such query, because the way the data is indexed. 
> I can't see an obvious solution but perhaps someone else knows better. 
> Though what I can suggest is that you change the structure of your index, 
> if that is a possibility. 
>
> Index you data by location_id and room_id and keep all the available time 
> slots in a single document as follows:
>
> POST slots/slot/1
> {
> "location_id":1,
> "room_id": 10,
> "start_time": [ "08:45", "09:00"]
> }
>
> Now you could do a bool query with must on start_time:
>
> {
>"query": {
>   "bool": {"must": [
>  {"term": {
> "start_time": {
>"value": "08:45"
> }
>  }},
>  {"term": {
> "start_time": {
>"value": "09:00"
> }
>  }}
>   ]}
>}
> }
>
> I also suggest that you disable the analyzer on the start_time field. 
> Hope that helped!
>
> On Friday, December 20, 2013 9:16:08 PM UTC+1, Bijuv V wrote:
>>
>>
>> I have the data in the following format in Elastic Search  (from sense) 
>>
>> POST slots/slot/1
>> {
>> locationid:"1",
>> roomid:"10",
>> starttime: "08:45"
>> }
>>
>> POST slots/slot/2
>> {
>> locationid:"1",
>> roomid:"10",
>> starttime: "09:00" 
>> }   
>>
>>
>> POST slots/slot/3
>> {
>> locationid:"2",
>> roomid:"100",
>> starttime: "08:45"
>> }   
>>
>>
>> POST slots/slot/4
>> {
>> locationid:"2",
>> roomid:"101",
>> starttime: "09:00"
>> } 
>>
>> POST slots/slot/5
>> {
>> locationid:"3",
>> roomid:"200",
>> starttime: "09:30"
>> }
>>
>> In short , the data is in the following format. 
>>
>> A Location has multiple rooms and each room has multiple slots of 15 
>> minutes. So slot 1 for Room10  starts at 8:45 and ends at 09:00, Slot 2 for 
>> same room starts at 09:00 and ends at 09:15
>>
>> Locationid   RoomId  Starttime
>> 1 10 08:45
>> 1 10  09:00
>> 2 100   08:45
>> 2 101   09:00
>> 3  200  09:30 
>>
>> Im trying to write a query/filter which will give me all locations where 
>> a room is available with two or three slots. 
>>
>> For e.g Find a location that has 08:45 slot and 09:00 slot (configurable) 
>>  Answer should be location 1 only
>> Should Not be location 2 as room 100 has 08:45 slot but not the 09:00 
>> slot. Room 101 has 09:00 slot but doesnt have the 08:45 slot
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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/6cacc77b-4dd2-4878-b30d-16a91c27342c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help with a Query DSL

2013-12-21 Thread Bijuv V

My attempt to the answer

POST slots/slot/_search?pretty=true&search_type=count
{
"facets": {
   "locationswithslots": {
  "terms": {
 "field": "locationid",
"script" : "term + \"_\" + _source.roomid",
 "size": 10
  },
  
   "facet_filter":
   { 
"terms": 
{
   "starttime": 
   [
  "08:45",
  "09:00"
   ]
}
   

   }
   }
}
}

This gives the answer as below 

{
"took": 12,
"timed_out": false,
"_shards": {
  "total": 5,
  "successful": 5,
  "failed": 0
},
"hits": {
  "total": 5,
  "max_score": 0,
  "hits": []
 },
 "facets": {
  "locationswithslots": {
 "_type": "terms",
 "missing": 0,
 "total": 4,
 "other": 0,
 "terms": [
{
   "term": "1_10",
   "count": 2
},
{
   "term": "2_101",
   "count": 1
},
{
   "term": "2_100",
   "count": 1
}
 ]
   }
}
}

Now I need to figure out a way to filter the facets that return count 2 as 
I passed in 2 slots in the filter. 



Op zaterdag 21 december 2013 12:06:45 UTC+1 schreef Sina Tamanna:
>
> It is a bit tricky to do such query, because the way the data is indexed. 
> I can't see an obvious solution but perhaps someone else knows better. 
> Though what I can suggest is that you change the structure of your index, 
> if that is a possibility. 
>
> Index you data by location_id and room_id and keep all the available time 
> slots in a single document as follows:
>
> POST slots/slot/1
> {
> "location_id":1,
> "room_id": 10,
> "start_time": [ "08:45", "09:00"]
> }
>
> Now you could do a bool query with must on start_time:
>
> {
>"query": {
>   "bool": {"must": [
>  {"term": {
> "start_time": {
>"value": "08:45"
> }
>  }},
>  {"term": {
> "start_time": {
>"value": "09:00"
> }
>  }}
>   ]}
>}
> }
>
> I also suggest that you disable the analyzer on the start_time field. 
> Hope that helped!
>
> On Friday, December 20, 2013 9:16:08 PM UTC+1, Bijuv V wrote:
>>
>>
>> I have the data in the following format in Elastic Search  (from sense) 
>>
>> POST slots/slot/1
>> {
>> locationid:"1",
>> roomid:"10",
>> starttime: "08:45"
>> }
>>
>> POST slots/slot/2
>> {
>> locationid:"1",
>> roomid:"10",
>> starttime: "09:00" 
>> }   
>>
>>
>> POST slots/slot/3
>> {
>> locationid:"2",
>> roomid:"100",
>> starttime: "08:45"
>> }   
>>
>>
>> POST slots/slot/4
>> {
>> locationid:"2",
>> roomid:"101",
>> starttime: "09:00"
>> } 
>>
>> POST slots/slot/5
>> {
>> locationid:"3",
>> roomid:"200",
>> starttime: "09:30"
>> }
>>
>> In short , the data is in the following format. 
>>
>> A Location has multiple rooms and each room has multiple slots of 15 
>> minutes. So slot 1 for Room10  starts at 8:45 and ends at 09:00, Slot 2 for 
>> same room starts at 09:00 and ends at 09:15
>>
>> Locationid   RoomId  Starttime
>> 1 10 08:45
>> 1 10  09:00
>> 2 100   08:45
>> 2 101   09:00
>> 3  200  09:30 
>>
>> Im trying to write a query/filter which will give me all locations where 
>> a room is available with two or three slots. 
>>
>> For e.g Find a location that has 08:45 slot and 09:00 slot (configurable) 
>>  Answer should be location 1 only
>> Should Not be location 2 as room 100 has 08:45 slot but not the 09:00 
>> slot. Room 101 has 09:00 slot but doesnt have the 08:45 slot
>>
>>
>>
>>
>>
>>
>>
>>

-- 
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/b7b71b17-64b9-4094-b5bf-1b1d5ea7c82e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Bulk UPD Not Listening?

2013-12-21 Thread Alexander Reelsen
Hey

try with new lines after the action and the document (and also have one at
the end).


--Alex


On Fri, Dec 20, 2013 at 7:47 PM, Jay Flowers  wrote:

> I can input data over http with this curl command:
>
> curl -XPOST 'http://localhost:9200/test/type1/' -d '{"name":
> "metric_name", "value": 4, "timestamp": 1365624293, "tags": { "service":
> "some_service", "some_tag": "some_value" }}'
>
> I am unsure what the nc command would look like.  I saw that nc has some
> issues so I have also be using a Ruby script:
>
> require 'socket'
>
> u2 = UDPSocket.new
> u2.connect("localhost", 9700)
> u2.send('''{ "index" : { "_index" : "test", "_type" : "type1" } }{"name":
> "metric_name", "value": 2, "timestamp": 1365624308, "tags": { "service":
> "some_service", "some_tag": "some_value" }}''', 0)
>
> I see nothing in the logs for the UDP attempts
>
>
>
>
> On Fri, Dec 20, 2013 at 1:00 PM, Jay Flowers wrote:
>
>> Okay I got it enabled.  Now I can't seem to get any data inserted over
>> udp.  Is there some other entry for logging to show failed udp attempts?
>>
>>
>> On Fri, Dec 20, 2013 at 11:03 AM, Alexander Reelsen wrote:
>>
>>> Hey
>>>
>>> set "bulk.udp" log level to debug in logging.yml and restart.. you
>>> should see the current configuration being printed out.
>>>
>>> you could also start bin/elasticsearch -Des.bulk.udp.enabled=true and
>>> see if it works.
>>>
>>>
>>> --Alex
>>>
>>>
>>> On Fri, Dec 20, 2013 at 3:24 PM, Jay Flowers wrote:
>>>
 I have added the following
 to /usr/local/elasticsearch-0.90.5/config/elasticsearch.yml

 bulk.udp.enabled: true

 I do not see anything in the logs that relates to udp or ports 9700-9800

 What else can I do to debug this?



 On Fri, Dec 20, 2013 at 6:26 AM, Alexander Reelsen 
 wrote:

> Hey,
>
> it is disabled by default, see
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk-udp.html
>
> did you enable it and it still is not listening? You should see
> something like this in your log file if you enabled it:
> [INFO ][bulk.udp ] [Starstreak] address
> /0:0:0:0:0:0:0:0:9700
>
>
> --Alex
>
>
> On Fri, Dec 20, 2013 at 3:50 AM, Jay Flowers wrote:
>
>> Is there anything I need to do to get the UDP Bulk listener up and
>> running?  I do not see any data after sending in the instance nor do I 
>> see
>> the port 9700 being used in a netstat -lu command.
>>
>> --
>> 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/ffb8bfc6-4478-4fe9-b8ae-e8046f652d67%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to elasticsearch+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAGCwEM_yhtgihgH%2BoCXYiAYk_DvqgYudT2t8hgtU3Ex_DbKXuQ%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



 --
 Jay Flowers
 --
 http://jayflowers.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/CALxqcNTMKW94vGT0WS57-gCKoYe9W7mwvbXmpK1Hvju0aeHZvg%40mail.gmail.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.

>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "elasticsearch" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to elasticsearch+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8n9Wj%2Bqvn9WCgM1xnvEe8qLU3rT%2BmhFUGoX3Y-me05gg%40mail.gmail.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> --
>> Jay Flowers
>> --
>> http://jayflowers.com
>> -
>>

Re: Help with a Query DSL

2013-12-21 Thread Sina Tamanna
It is a bit tricky to do such query, because the way the data is indexed. I 
can't see an obvious solution but perhaps someone else knows better. Though 
what I can suggest is that you change the structure of your index, if that 
is a possibility. 

Index you data by location_id and room_id and keep all the available time 
slots in a single document as follows:

POST slots/slot/1
{
"location_id":1,
"room_id": 10,
"start_time": [ "08:45", "09:00"]
}

Now you could do a bool query with must on start_time:

{
   "query": {
  "bool": {"must": [
 {"term": {
"start_time": {
   "value": "08:45"
}
 }},
 {"term": {
"start_time": {
   "value": "09:00"
}
 }}
  ]}
   }
}

I also suggest that you disable the analyzer on the start_time field. Hope 
that helped!

On Friday, December 20, 2013 9:16:08 PM UTC+1, Bijuv V wrote:
>
>
> I have the data in the following format in Elastic Search  (from sense) 
>
> POST slots/slot/1
> {
> locationid:"1",
> roomid:"10",
> starttime: "08:45"
> }
>
> POST slots/slot/2
> {
> locationid:"1",
> roomid:"10",
> starttime: "09:00" 
> }   
>
>
> POST slots/slot/3
> {
> locationid:"2",
> roomid:"100",
> starttime: "08:45"
> }   
>
>
> POST slots/slot/4
> {
> locationid:"2",
> roomid:"101",
> starttime: "09:00"
> } 
>
> POST slots/slot/5
> {
> locationid:"3",
> roomid:"200",
> starttime: "09:30"
> }
>
> In short , the data is in the following format. 
>
> A Location has multiple rooms and each room has multiple slots of 15 
> minutes. So slot 1 for Room10  starts at 8:45 and ends at 09:00, Slot 2 for 
> same room starts at 09:00 and ends at 09:15
>
> Locationid   RoomId  Starttime
> 1 10 08:45
> 1 10  09:00
> 2 100   08:45
> 2 101   09:00
> 3  200  09:30 
>
> Im trying to write a query/filter which will give me all locations where a 
> room is available with two or three slots. 
>
> For e.g Find a location that has 08:45 slot and 09:00 slot (configurable) 
>  Answer should be location 1 only
> Should Not be location 2 as room 100 has 08:45 slot but not the 09:00 
> slot. Room 101 has 09:00 slot but doesnt have the 08:45 slot
>
>
>
>
>
>
>
>

-- 
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/22999361-3263-49a0-b60f-3b22320b72d0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Adding EC2 settings to elasticsearch.yml stops listening to port 9200

2013-12-21 Thread Steinar Bang
> Ross Simpson :

> How long did you wait after starting with AWS settings before checking the 
> lsof output? 

A minute or two or three, or maybe five.  In any case much longer than
the normal ES startup time on the EC2 instance.

> I've found that startup time on AWS can be quite slow, due to the fact
> that ES is describing all your instances and looking for other ES
> instances to cluster with.  If you have a lot of instances, this could
> take quite a while.

Ok, thanks!  I will try giving it a bit longer time and see what happens.

> I'd suggest enabling the logging as described here:  
>  http://www.elasticsearch.org/tutorials/elasticsearch-on-ec2/
> Then watch the logs as the node comes up.  There may be some clues there as 
> to what's going on.

Thanks for the heads up!  Looking at the verbosity logging was my next
angle of approach, becuse what I found in the logs wasn't very
informative.  It looked like a successful startup (except nothing was
listening on port 9200).

-- 
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/87eh56mtm7.fsf%40dod.no.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Adding EC2 settings to elasticsearch.yml stops listening to port 9200

2013-12-21 Thread Steinar Bang
> Karel Minařík :

> The EC2 plugin doesn't mess with networking settings, so the behaviour 
> you're describing is weird.

I got the same behaviour when /var/lib/elasticsearch/elasticsearch was a
dangling symlink to /mnt/var/lib/elasticsearch/elasticsearch (from an
experiment done in a previous run of the EC2 instance with indexing to
/dev/xvdb ), so I thought it might be storage related...?

> After ES starts, can you connect to it via `curl localhost:9200`?

Well, I did
 telnet localhost 9200
instead.

But no success there.

> Also, don't use the now deprecated S3 gateway, apart maybe from strictly 
> testing purposes -- it's unsupported and unpredictable.

Ah, Ok.  Is there something else I could use instead when I run out of
space on the instance itself?  Because I fill up the disk on the
instance pretty quickly.

I did an experiment indexing to the non-persistent /dev/xvdb "disk", and
that worked fine wrt. to storage size and feeding rate.  But this isn't
something that can be used with EC2 instances that are stopped and
started on demand.

> As suggested by Ross, maybe it takes time to ping all the instances in your 
> AWS account -- do you set the `discovery.ec2.groups` settings to filter the 
> list?

Right! I will try giving it more time.

Thanks!

-- 
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/87iouimtt0.fsf%40dod.no.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Multiple datadir vs RAID0

2013-12-21 Thread Mark Walkom
Multiple data dirs seems pointless, what were you hoping to achieve with
that?

I'd go RAID0, let ES handle the redundancy at a higher level (with
replicas).

Regards,
Mark Walkom

Infrastructure Engineer
Campaign Monitor
email: ma...@campaignmonitor.com
web: www.campaignmonitor.com


On 21 December 2013 20:20, briche arnaud  wrote:

> Hi all,
>
> I'm planning on deploying an ES cluster soon; machines will be equipped
> with 4 x 240GB SSD drives, and I wonder what's the pros and cons of having
> multiple data dirs vs having a setup with the 4 drives in RAID0 ?
>
>  --
> 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/fd73a72a-5c60-4382-85b2-56824d3a1dd4%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAEM624aNjnpPcvDoHnGKprXf-X3iOf5ttaH_9C6smYUWT62SXA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Multiple datadir vs RAID0

2013-12-21 Thread briche arnaud
Hi all,

I'm planning on deploying an ES cluster soon; machines will be equipped 
with 4 x 240GB SSD drives, and I wonder what's the pros and cons of having 
multiple data dirs vs having a setup with the 4 drives in RAID0 ?

-- 
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/fd73a72a-5c60-4382-85b2-56824d3a1dd4%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Did ES ever consider replacing current query DSL with an external DSL?

2013-12-21 Thread Lukáš Vlček
Jörg,
is opensearch active? The last time I checked it it seemed pretty much dead.
Lukáš
Dne 20.12.2013 13:32 "joergpra...@gmail.com" 
napsal(a):

> Just some food for thought:
>
> In the DSL you give, there are some subtle issues which makes it hard for
> implementing a parser and correct query execution.
>
> For example, the word "New feature": is it just a phrase, or is it two
> terms? Is a span query for the two terms also valid?
>
> Another issue is well-formed input data typing. Is "ES" in the query an
> input of type "string"? And is "3.1" is double value or also a string type?
> Can types always be inferenced? What about date parsing, will date types be
> assigned automatically? Maybe by looking up the ES mapping (well, ES
> parsers do that already) ? Or, how to decide if "true" is the string "true"
> or the boolean constant? ES catches this but I mean the general case of an
> external DSL is dealing with JSON data type flaws. You are forced to
> re-implement the ES parser for all these nasty pitfalls.
>
> How to declare facets and filters in an external DSL? Or multi phrase and
> multi wildcard searching? It's not straightforward if there is simply no
> context information how to execute such things. How do you parse and
> translate wildcards mixed/nested with phrases such as "scien* 'week*
> magazin*'"? I was surprised how many folks are trained to use wildcards
> excessively. It is only possible to replace such "bad queries" with
> heuristics that can be executed on ES with high performance, with ranked
> results etc.
>
> I have written a CQL parser
> http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/os/part5-cql/searchRetrieve-v1.0-os-part5-cql.pdfto
>  generate ES DSL, but for Java API only. If anyone is interested in
> adding a CQL parser as a REST action, I could offer it as a plugin. It is
> of course not perfect, I'm not very satisfied with the result.
>
> My experience so far is, at least for CQL, because it is a weak typed
> query language (it does not have a notion of input data types) , that
> external query languages must really be able to match the power of
> Lucene/ES features, or you get into trouble implementing simplifications,
> fallbacks, and shortcuts all the way.
>
> So my favorite is still ES DSL, and for establishing simple searches,
> there are special featured query types that are designed for simplified
> free form input. E.g. ES DSL query type "query_string" understands the
> Lucene syntax, or the "match" query, and now we also have the
> "simple_query" https://github.com/elasticsearch/elasticsearch/pull/4402
>
> I'm interested in OpenSearch for ES http://www.opensearch.org/ so if
> anyone is working on this, it would be nice to know.
>
> Jörg
>
>
> On Thu, Dec 19, 2013 at 8:05 PM, xin zhang  wrote:
>>
>>
>> project = ES AND issuetype = "New Feature" AND fixVersion = 3.1 ORDER BY
>> created DESC, cf[10514] 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/CAKdsXoGhkOE038spXw1Tmm0zLv%3DS%3D8YAztaMZEYK-hVNwhMB5Q%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAO9cvUbqrVMq%3DoM5MS%3DwW2tJqFxC8FwC-d7R9CG4Hm1ihjfgtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.