Re: COUCHBASE + ELASTIC Parent/child mapping

2014-09-15 Thread Itamar Syn-Hershko
Seems like it will in the next version (looking at the couchbase elastic transport plugin commits) -- Itamar Syn-Hershko http://code972.com | @synhershko https://twitter.com/synhershko Freelance Developer Consultant Author of RavenDB in Action http://manning.com/synhershko/ On Tue, Sep 9, 2014

Re: Question on top hits aggregation

2014-09-15 Thread Martijn v Groningen
Hi, In that case you would need to wrap a terms agg in a nested aggregation (with the desired path) and a top_hits inside that terms aggregation. Unfortunately the top_hits aggregation doesn't yet work inside a nested aggregation. However work is being done that will add this support:

Write a plugin to query and aggregate results from multiple shards

2014-09-15 Thread 'Sandeep Ramesh Khanzode' via elasticsearch
Hi, I am looking through the sources, and I am not sure whether this is possible. What I am looking to is the possibility to manipulate the SearchRequest object when it reaches the SearchShards level. Since I need to update the object with some value that is shard specific. For this, I was

How to query with JSON when use Java API in ElasticSearch?

2014-09-15 Thread 张新星
Hi all, I'm using ElasticSearch as a search service in Spring Web project. Now I'm using Transport Client to communicate with ES. I'm wondering if there exists a method which can construct a QueryBuilder from a JSON DSL. for example, convert this bool query DSL JSON { query : {

Re: Write a plugin to query and aggregate results from multiple shards

2014-09-15 Thread joergpra...@gmail.com
See the TransportSearchAction, in the doExecute() method, the SearchRequest is dispatched to several transport actions of the search types. Assuming you write your own custom action: the shard level request is ShardSearchRequest. It is easier to add information to SearchRequest, pass it down, and

Trouble with search preference=_local

2014-09-15 Thread Kurt Hutchison
I have ES 1.0.2 and Lucene 4.6. I was hoping preference=_local would query on the current node, but it does not. The same node comes up at the top of the list for all shards regardless of which node I search from, it is not the primary node, neither is it the local node. I am testing this

Re: Cluster allocation awareness - opposite

2014-09-15 Thread spezam
Hi Mark, precise, there's no replication happening between the nodes in the DC, they are just aware of each others. The gateway is a no-data node that is used by Kibana to query all the other nodes in the cluster and return aggregated queries. Yes, I would like to add a new node (node2) in DC1

Re: How to query with JSON when use Java API in ElasticSearch?

2014-09-15 Thread Andrej Rosenheinrich
Hi, there are QueryBuilder that can parse JSON, e.g. WrapperQueryBuilder http://javadoc.kyubu.de/elasticsearch/HEAD/org/elasticsearch/index/query/WrapperQueryBuilder.html wrapperQuery(java.lang.String source). This should do the job. Greets, Andrej PS: Still wondering why javadocs

Re: Purge the deleted documents on disk

2014-09-15 Thread Michael McCandless
By default Lucene/ES will only merge away the segment if it has enough deletes, where enough defaults to 10% of the segment. The setting is index.merge.policy.expunge_deletes_allowed ... so you can change that if you want to. However I would strongly advise not worrying about this: merging is a

How to connect elasticsearch instance of docker VMs from two different machine?

2014-09-15 Thread Anand kumar
Hi all, I'm trying to connect two ES instances using docker VM and both as master nodes, but the instances belong to two different hosts from the same network. My docker commands are as below: host1 : $ docker run -t -i --name=master-node-01 -p 9200:9200 -p 9300:9300 host2 : $ docker

Re: How to connect elasticsearch instance of docker VMs from two different machine?

2014-09-15 Thread Mark Walkom
Are they on the same network? Can you telnet to each of the hosts? It looks like the two nodes don't have access to each other, hence the no route to host error. Regards, Mark Walkom Infrastructure Engineer Campaign Monitor email: ma...@campaignmonitor.com web: www.campaignmonitor.com On 15

[JAVA API] Retrieve all indexes

2014-09-15 Thread Luan Garrido
Hi all, First of all I took a look and did not find the answer for my question. Can anyone teach me how can I find all indexes from a cluster using the JAVA API? Thanks -- You received this message because you are subscribed to the Google Groups elasticsearch group. To unsubscribe from this

Re: cluster can't recover after upgrade from 1.1.1 to 1.3.2 due to MaxBytesLengthExceededException

2014-09-15 Thread omar
Thank you Jilles, this really helped. I have actually changed the mapping of that field to NO_INDEX to avoid this problem all together. But it is nice to know there is a valid solution out there. -- You received this message because you are subscribed to the Google Groups elasticsearch

Re: How to connect elasticsearch instance of docker VMs from two different machine?

2014-09-15 Thread Anand kumar
Hi Mark, Thanks for your reply. Yeah, both the hosts belonged to same network. I cant able to use telnet, instead I tried ssh. On Monday, 15 September 2014 16:36:53 UTC+5:30, Mark Walkom wrote: Are they on the same network? Can you telnet to each of the hosts? It looks like the two

Re: How to connect elasticsearch instance of docker VMs from two different machine?

2014-09-15 Thread Anand kumar
Thank you Mark for your precious time. On Monday, 15 September 2014 17:08:48 UTC+5:30, Mark Walkom wrote: Your problem is a docker networking issue, not an ES one. I'm not familiar with docker so can't help much more sorry. Regards, Mark Walkom Infrastructure Engineer Campaign Monitor

Re: How to connect elasticsearch instance of docker VMs from two different machine?

2014-09-15 Thread Mark Walkom
Your problem is a docker networking issue, not an ES one. I'm not familiar with docker so can't help much more sorry. Regards, Mark Walkom Infrastructure Engineer Campaign Monitor email: ma...@campaignmonitor.com web: www.campaignmonitor.com On 15 September 2014 21:34, Anand kumar

Re: [JAVA API] Retrieve all indexes

2014-09-15 Thread vineeth mohan
Hello Luan , There are many ways to do it - Client client = new TransportClient() .addTransportAddress(new InetSocketTransportAddress(host1, 9300)); GetSettingsRequest req = new GetSettingsRequest();; GetSettingsResponse response =

Returning exact matches with ElasticSearch 'Lite'

2014-09-15 Thread Neil Middleton
I'm trying to use ES's search lite http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/search-lite.html to query a dataset which contains a key foo. An example of this is: .../_search?q=+foo:bar\-baz Now, my understanding is is that the addition of + to the foo attribute

When does a deleted index get removed from disk?

2014-09-15 Thread Neil Andrassy
Hi, We recently created a lot of (date suffixed) indexes (about 3,000) on our development cluster (1.3.2). Subsequently we deleted many of these indexes. The cluster ran, predominantly green, for several days, certainly more than a week after that with no sign of the indexes. After that we

Re: Aggregation framework, Java API

2014-09-15 Thread Emanuel Buzek
Ivan, thanks a lot for the reply, I switched to FilteredQuery (using matchAll when no query is submitted) and that simplified my code a lot. It also makes more sense than using post filters and filtered aggregations... best, emanuel Dne úterý, 9. září 2014 18:46:25 UTC+2 Ivan Brusic napsal(a):

Sorting search results

2014-09-15 Thread matej . zerovnik
Hello! I'm trying to create a query, that would return the last(sorted by timestamp) 10 hits. I'm using logstash to parse and index my log files... I tried 2 different queries: { query : { filtered : { query: {match : {user : abc}}, query: {match :

'NoNodeAvailable' exception JMeter 10K requests

2014-09-15 Thread Vidosh Sahu
Hi All, I am trying to do some es perf analysis. I have an AWS machine [quad core + 16 gigs]. I have started the ES with 8 gigs. version 1.21 The ES server is a single cluster multi node setup. There are 9 nodes as of now. 5M nodes - There are 3 nodes having 5M records each with 1/2/4 shard

Re: Seeking opinions on cluster platforms

2014-09-15 Thread Jack Park
Mark and Jörg Many thanks for these comments. In a large sense, they confirm my intuitions. Cheers, Jack On Fri, Sep 12, 2014 at 4:00 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: Not sure what is extreme. The design of ES may be a surprise for those who are not familiar with

Naive question about multiple clients

2014-09-15 Thread Jack Park
A really simple question is this: can more than one client be talking to an ES cluster at the same time? I ask because I notice that there is a lock file in a shard directory. Thanks! -- You received this message because you are subscribed to the Google Groups elasticsearch group. To

Re: Returning exact matches with ElasticSearch 'Lite'

2014-09-15 Thread joergpra...@gmail.com
Use URI escaping (percent encoding). It is perfectly described on the page http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/search-lite.html Jörg On Mon, Sep 15, 2014 at 2:03 PM, Neil Middleton n...@heroku.com wrote: I'm trying to use ES's search lite

Re: Naive question about multiple clients

2014-09-15 Thread David Pilato
Yes. You can have many client talking to es cluster at the same time. Wondering if you are talking about Node Client here. Which is is basically a node running inside the cluster and which can provide access to Client features. If you use Java Transport Client, I don't think any file is

Re: [JAVA API] Retrieve all indexes

2014-09-15 Thread Luan Garrido
Thank you for your healp Vineeth Em segunda-feira, 15 de setembro de 2014 08h22min40s UTC-3, Luan Garrido escreveu: Hi all, First of all I took a look and did not find the answer for my question. Can anyone teach me how can I find all indexes from a cluster using the JAVA API? Thanks

Re: Naive question about multiple clients

2014-09-15 Thread Jack Park
Thanks! I have the system running under nodejs, but want to start a java client against the same cluster (right now, nodejs is talking to it over http: the java client wants to talk to it by way of embedded, though still over the localhost socket. On Mon, Sep 15, 2014 at 7:22 AM, David Pilato

Re: Returning exact matches with ElasticSearch 'Lite'

2014-09-15 Thread Neil Middleton
Percent encoding the string appears to make no difference.  Passing in +foo:bar\-baz” or %2Bfoo%3Abar-baz” yields exactly the same resultset. Is this potentially to do with the analysis of the strings in question?  For instance - I assume by not analysing the `foo` field the propensity to

Re: Naive question about multiple clients

2014-09-15 Thread David Pilato
Why not using the JavaScript client? -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 15 sept. 2014 à 16:39, Jack Park jackp...@topicquests.org a écrit : Thanks! I have the system running under nodejs, but want to start a java client against the same cluster (right

Re: Returning exact matches with ElasticSearch 'Lite'

2014-09-15 Thread joergpra...@gmail.com
Yes, you can select a tokenizer for controlling how to split words. If you index bar-baz, you index two words, bar and baz, because standard analyzer delimits tokens according to Unicode text segmentation rules in http://unicode.org/reports/tr29/ So the easiest method to use standard tokenizer

How to do case insensitive search on terms?

2014-09-15 Thread John Smith
Using ES 1.3.2 The current application I'm building only uses term queries for exact matches. Example query query: { term: { logType: abc } The field logType is pulled from external DB as all caps so for instance ABC If i send the query query: { term: { logType:

Re: Naive question about multiple clients

2014-09-15 Thread Jack Park
Hi David, I am not certain how to interpret your question. Here is the precise scenario: The node client is driving this website: http://www.topicquests.org:3000/ which is a very early-stage experiment in developing online collective intelligence tools, the theory behind which is sketched in

Revisiting query parse (no field after start_object) errors

2014-09-15 Thread Jack Park
This query: { from: 0, size: 30, query: { term: { sbOf: TypeType } } } is giving me fits. I recently migrated from 0.90 to 1.2.2 and went through this with my node.js client, got many ideas in this forum and solved the problem. The query above works

Re: How to do case insensitive search on terms?

2014-09-15 Thread Nikolas Everett
Or if you want case insensitive search use a match query http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html . On Mon, Sep 15, 2014 at 11:47 AM, joergpra...@gmail.com joergpra...@gmail.com wrote: I assume you use the standard analyzer which uses by

Re: How to do case insensitive search on terms?

2014-09-15 Thread joergpra...@gmail.com
Ugh. Read my post exactly the other way round. = standard analyzer is *not* using token filter lowercase = you can build a custom analyzer *with* token filter 'lowercase for *case-insensitive* search. Jörg On Mon, Sep 15, 2014 at 5:47 PM, joergpra...@gmail.com joergpra...@gmail.com wrote: I

Filtered Query not working with Elasticsearch 1.3.0

2014-09-15 Thread Roopendra Vishwakarma
Filtered query not working with Elasticsearch 1.3.0. I upgrade elasticsearch 0.90.5 to 1.3.0. I am using elasticsearch Query DSL; { query: { match_all: {}, filtered: { filter: { bool: { must: [

Re: How to do case insensitive search on terms?

2014-09-15 Thread John Smith
Thanks! Yes I want case insensitive search and yes I'm using default analyzer. Just as you guys answered I tried this... { query: { query_string: { fields: [logType], query: ABC } } } and it worked. Since I'm searching for exact matches (not wildards or anything like

Filtered Query not working with Elasticsearch 1.3.0

2014-09-15 Thread Roopendra Vishwakarma
Filtered query not working with *Elasticsearch 1.3.0*. I upgrade elasticsearch *0.90.5* to *1.3.0*. I am using elasticsearch below Query DSL. In *Elasticsearch 0.90.5* below query DSL is working fine. But in *Elasticsearch 1.3.0* getting error *ElasticsearchParseException[Expected field name

Re: How to do case insensitive search on terms?

2014-09-15 Thread Nikolas Everett
Use a match instead of a query_string - query_string has funky syntax that can activate fuzzy matching and search on other fields and stuff - probably not what you want. Otherwise it shouldn't have any real impact on performance. On Mon, Sep 15, 2014 at 12:04 PM, John Smith

How to get current date in script.

2014-09-15 Thread Abhishek Gupta
Hi, I want to write a script to calculate the number of days from current date on a date field. I can use a script like: script_fields: { test: { script: doc['date'].date.year * doc['date'].date.dayOfYear - *current date* } } How to get the current date? No date related function

Re: How to do case insensitive search on terms?

2014-09-15 Thread John Smith
Thanks match works also. On Monday, 15 September 2014 12:09:43 UTC-4, Nikolas Everett wrote: Use a match instead of a query_string - query_string has funky syntax that can activate fuzzy matching and search on other fields and stuff - probably not what you want. Otherwise it shouldn't have

Re: How to do case insensitive search on terms?

2014-09-15 Thread joergpra...@gmail.com
I assume you use the standard analyzer which uses by default a token filter lowercase. Just use a custom analyzer, without lowercase token filter, and you will get case-sensitive search. Jörg On Mon, Sep 15, 2014 at 5:44 PM, John Smith java.dev@gmail.com wrote: Using ES 1.3.2 The

Re: How to get current date in script.

2014-09-15 Thread vineeth mohan
Hello Abhishek , Something similar to this should work - { script_fields: { test: { script: doc['date'].value - new Date().getTime() * 1000 } } } Thanks Vineeth On Mon, Sep 15, 2014 at 9:41 PM, Abhishek Gupta abhi.bansa...@gmail.com wrote: Hi, I want to write a

Re: Filtered Query not working with Elasticsearch 1.3.0

2014-09-15 Thread David Pilato
Did you read this? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/breaking-changes-1.0.html#breaking-changes-1.0 -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 15 sept. 2014 à 18:08, Roopendra Vishwakarma roopendra...@gmail.com a écrit :

likes and favourite item search and storage

2014-09-15 Thread Michael
Hi, I'm looking for the best practise for recording 'likes' of an item. If I have a document { 'name' : 'Dave', 'age' : 40, 'album' : 'foo' } If people decide to 'like' 'Daves' album 'foo'. Where is the best place to store these 'likes'? in the document? { 'name' : 'Dave', 'age' :

Suggestion needed on Indexing Performance

2014-09-15 Thread Anantha Govindarajan
Hi, Here is our ES ( elasticsearch-1.2.1 ) cluster details - 20 Data Nodes (physical machines 2TB normal disk,32GB RAM,8 cpu cores). Both Xms Xmx 14GB. Xmn 7GB - 2 Master Nodes (virtual machines 16GB RAM) - Cluster Size ~17 TB (out of 20 * 2 = 40TB) - Number of records ~70

Re: [ANN] New IMAP and POP3 email river for Elasticsearch - elasticsearch-river-imap

2014-09-15 Thread Marc Laporte
Hi! Thanks for this. I want to use Zarafa with Elasticsearch on ClearOS, in the context of Tiki Suite. Tiki Suite is a selection of Free / Libre / Open Source Software (FLOSS) server, web, mobile and desktop apps with a concerted focus on greater interoperability, security and adaptability,

Elastic Search Design question.

2014-09-15 Thread taimoorkhan1
Hi, I am trying to figure out how to best model my data in elasticsearch for the following scenario. Scenario: Imagine a chat service which can have a number of participants (in tens of thousands). Messages are not pushed out to members but rather members can query for new messages based on

Filtered not working with has_parent in elasticsearch 1.3.0

2014-09-15 Thread Roopendra Vishwakarma
In elasticsearch 1.3.0 *filtered* not working with *has_parent*. In *elasticsearch 0.90.5* its working fine. I am using below query. In this query I need add filtered inside *has_parent-query-filtered-bool-must*. But my basic query is not working. { query: { has_parent:

Re: Revisiting query parse (no field after start_object) errors

2014-09-15 Thread Jack Park
Updating my query. I ran the same test just using this query: { term : { sbOf : TypeType } } with absolutely no failure. But, if I put from and size in front of it, with or without query, there is a failure. So, this query does run, though from and size are meaningless { term: {

Received response for a request that has timed out Error

2014-09-15 Thread shriyansh jain
Hi, I am getting the following error in the elasticsearch log file. I have a cluster of 2 elasticsearch nodes, and have a setup of ELK stack with redis as a buffer. Everything was running fine but suddenly, logstash is not able to parse logs (not showing any error messages) and elasticsearch

Re: [JAVA API] Retrieve all indexes

2014-09-15 Thread Luan Garrido
Vineeth, can you tell me how can I get the types of this index? I tried: GetMappingsResponse response = this.client.admin().indices().prepareGetMappings(index).execute().actionGet(); for(ObjectCursorString st : response.mappings().keys()){ System.out.println(st.value); } But it returned me the

Aggregations: Year over Year, Week over Week

2014-09-15 Thread nascosto
Assuming I have a date field on a document, I know using the date_histogram aggregation I can get a document count by day, month, year, etc. What I want to do is get the average document count for January, February, March, etc. over several given years. The same goes for Monday, Tuesday,

Highly variable query performance with ES 1.3.2 (filter + aggregations)

2014-09-15 Thread Craig Wittenberg
Hello, Our team recently upgraded from ES 1.1.2 to 1.3.2 and are happy with the improvements ... except for one perplexing situation. We are running on Azure worker roles with Oracle Java 1.8u11 and using the G1 gc. It is possible this is due to G1, but please consider all of the data

[Ann] Log4j2 Elasticsearch HTTP appender 1.0.0

2014-09-15 Thread joergpra...@gmail.com
Hi, I just released a small, dependency-free Java logging tool, an appender for Log4j2, using the Java JDK HTTP client to connect to the _bulk endpoint. https://github.com/jprante/log4j2-elasticsearch-http All comments and feedback is welcome! Best, Jörg -- You received this message because

Is there any way to prevent ES from disclosing exception details in REST response?

2014-09-15 Thread AlexR
We expose ES _search endpoint directly to consumers. When our REST API get scanned for security vulnerabilities it complains on ES returning exception details. For example a malformed query will be included in the response along with exception. While it is more or a less harmless the tool

Re: Highly variable query performance with ES 1.3.2 (filter + aggregations)

2014-09-15 Thread joergpra...@gmail.com
You said you restarted a node, and since then, the effect has gone, is that true? Such high spikes like 40sec response might indicate problems in the hardware (disk failure, network latency or timeout, DNS), is this possible? Jörg On Mon, Sep 15, 2014 at 11:51 PM, Craig Wittenberg

Re: Is there any way to prevent ES from disclosing exception details in REST response?

2014-09-15 Thread joergpra...@gmail.com
You can put a revers proxy like nginx between ES cluster and the rest of the world and filter away all HTTP status 500 responses. Jörg On Mon, Sep 15, 2014 at 11:57 PM, AlexR roytm...@gmail.com wrote: We expose ES _search endpoint directly to consumers. When our REST API get scanned for

Re: Is there any way to prevent ES from disclosing exception details in REST response?

2014-09-15 Thread Alex Roytman
Thanks Jorg, Unfortunately it is not an option - we are not at liberty to touch anything beyond our app servers. We are using transport-wares servlet for ES and I could easily tweak AbstractServletRestChannel to handle Rest Channel response with codes 400,500 but I would like to avoid modifying

Re: Is there any way to prevent ES from disclosing exception details in REST response?

2014-09-15 Thread joergpra...@gmail.com
Then why don't you simply add a servlet filter that filters unwanted responses away? Jörg On Tue, Sep 16, 2014 at 12:21 AM, Alex Roytman roytm...@gmail.com wrote: Thanks Jorg, Unfortunately it is not an option - we are not at liberty to touch anything beyond our app servers. We are using

Re: Is there any way to prevent ES from disclosing exception details in REST response?

2014-09-15 Thread Alex Roytman
I guess I could but it would mean passing a response wrapper to capture output stream and then copy it to real request or discard it in case of an error. That would be a second copy of response - the first one being done in the NodeServlet - will hurt performance for large responses :-( On Mon,

[Version 1.3.2] Root type mapping not empty after parsing! Remaining fields:

2014-09-15 Thread Jack Park
I got this on 1.2.2 and found on the web that it was a bug. So, I upgraded to 1.3.2 and got the same bug. There was a note here that suggested adding mappings: to the top of the mappings doc. Didn't help on 1.2.2

Is it possible to annotate each result in a result set?

2014-09-15 Thread James Addison
I have two types stored in an index: locations and activities. An activity has a 'relation' to a location - ie. an activity takes place at a location. Is it possible to get a location search result set that includes the count of activities at each location? Sort of like annotating each item

Re: Highly variable query performance with ES 1.3.2 (filter + aggregations)

2014-09-15 Thread Craig Wittenberg
Hardware problems in Azure? Hmm. I suppose so :) In this case I restarted just ES (i.e., shutdown ES using http://localhost:9200/_cluster/nodes/_local/_shutdown and then ran elasticsearch.bat again) and thus didn't reboot the VM or anything so dramatic. All of the ES node files remained in

Re: Highly variable query performance with ES 1.3.2 (filter + aggregations)

2014-09-15 Thread Peter van der Weerd
Is it possible that the JVM is doing large GC's ? Peter Op dinsdag 16 september 2014 02:24:42 UTC+2 schreef Craig Wittenberg: Hardware problems in Azure? Hmm. I suppose so :) In this case I restarted just ES (i.e., shutdown ES using http://localhost:9200/_cluster/nodes/_local/_shutdown

Re: Highly variable query performance with ES 1.3.2 (filter + aggregations)

2014-09-15 Thread Craig Wittenberg
Hi Peter, No, old or long gcs are not showing up here. I use bigdesk among other tools and also inspect the logs. Bigdesk shows a very regular sawtooth pattern and nearly always young gcs of less than 1s. The logs show the same, of course. It is very rare that we ever get a gc of the old