Re: Need Clarification on Shards Replication

2014-01-02 Thread Alexander Reelsen
Hey,

replication is done per document (as opposed to relocation). So the
document is indexed on the primary first, and if it was successful there,
the document is indexed on all replicas of a shard in parallel. If that
index operation on the replica(s) has returned, the index requests is
returned to the client.

The throttling of merges (which is a heavy I/O and CPU intensive background
process) ensures, you have enough I/O performance available for index and
search operations.

Hope this helps...


--Alex


On Thu, Jan 2, 2014 at 6:43 AM, Anantha Govindarajan 
ananthagovindara...@gmail.com wrote:

 I have one es master and data-node and indexing documents to that (1 shard
 + 1 Replica), after indexing few documents (say 1 million and still
 indexing docs), adding one more data node to the cluster , now the shards
 started replicating to new node. How this replication happens ?  In the
 mean i am still indexing new documents to that index.

1. Whether datanode1 will send index segments to datanode2 ?
2. Whether datanode1 will send documents one by one (as IndexRequests)
to datanode2 instead of copying segments ?
3. Whether datanode1 will send whole index to datanode2 ?


 How will *indices.store.throttle.type: merge
  indices.store.throttle.max_bytes_per_sec: 50mb* these settings react
 with respect to the above test scenario ?



 Anantha Govindarajan.

 --
 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/326cfecc-b59c-4e4c-b5e9-e369e841a02e%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_EZ_bb1hsVpLyW7Pt0UWM47GRU2iuQt_mJPV0xoO5iSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need Clarification on Shards Replication

2014-01-02 Thread Anantha Govindarajan
Hi Alex 

Thanks for replying. If i understand correctly normal indexing flow is,


   - Document is indexed in primary shard machine , then replica shard 
   machine then return the index response  to client - in case of 
   ReplicationType.SYNC.
   - Document is indexed in primary shard machine , then sent it to replica 
   machine(s) if available, and wont wait for response - in case of 
   ReplicationType.ASYNC.

But my question is not normal indexing flow. I have already indexed 1 
million documents in primary shard alone , at that moment no node is 
available for replica.

after some time adding a machine to cluster , at this point new indexing 
documents follows normal indexing flow (am i right ? Not sure !). But my 
question is how existing 1 million documents in primary shard is replicated 
to new machine ? 

-- 
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/dd473bdb-8603-44b2-a59c-0a8f3033ad0d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Corrupt index creation when elasticsearch is killed just after index is created

2014-01-02 Thread joergpra...@gmail.com
All ES API calls are by default asynchronous and eventually consistent
(quorum).

For document indexing, you can use the refresh API call to make them
visible for search.

For index creation operation, you can add the parameter replication=sync
and consistency=all to your API call to ensure that ES will wait for all
replica shards and all nodes to complete successfully before returning.

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


Re: Need Clarification on Shards Replication

2014-01-02 Thread David Pilato
It's relocation. Segments are copied over the wire. New updates/insert/delete 
operations which happen in the meantime are replayed from the transaction log 
on the new shard. 

HTH

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

Le 2 janv. 2014 à 10:39, Anantha Govindarajan ananthagovindara...@gmail.com a 
écrit :

 Hi Alex 
 
 Thanks for replying. If i understand correctly normal indexing flow is,
 
 Document is indexed in primary shard machine , then replica shard machine 
 then return the index response  to client - in case of ReplicationType.SYNC.
 Document is indexed in primary shard machine , then sent it to replica 
 machine(s) if available, and wont wait for response - in case of 
 ReplicationType.ASYNC.
 But my question is not normal indexing flow. I have already indexed 1 million 
 documents in primary shard alone , at that moment no node is available for 
 replica.
 
 after some time adding a machine to cluster , at this point new indexing 
 documents follows normal indexing flow (am i right ? Not sure !). But my 
 question is how existing 1 million documents in primary shard is replicated 
 to new machine ? 
 -- 
 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/dd473bdb-8603-44b2-a59c-0a8f3033ad0d%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/2DA64523-60B8-4A18-86C7-4A737FADD6B1%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need Clarification on Shards Replication

2014-01-02 Thread Anantha Govindarajan
Hi David , 

Thanks for your reply . 

Until existing(not newly created) segments are fully copied to the new 
machine , no indexing operation will happen on replica shard right ? rather 
it notes down those new indexing documents in transaction log alone ?((Correct 
me if i am wrong))

Once all segments are copied it replays the transaction logs . if so no new 
documents visible for search , till segments copying process over. is it 
right ? 

*indices.store.throttle.type: merge 
 indices.store.throttle.max_bytes_per_sec: 50mb *these properties related 
to only lucene segment merges alone am i right ?


Ananth

-- 
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/051a21a8-ba9f-4401-84ce-fce31a28b5fc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Getting specific Fields

2014-01-02 Thread paul
My DATA
---
{
   rankingList:[
  {
 value:9,
 key:Academic
  },
  {
 value:6,
 key:Flexibility
  }
   ]
}

{
   rankingList:[
  {
 value:12,
 key:Academic
  },
  {
 value:6,
 key:Flexibility
  }
   ]
}

My Mapping
---
{
   mappings:{
  TestNested:{
 properties:{
rankingList:{
   type:nested
}
 }
  }
   }
}

My QUERY
-
{
  query: {
nested: {
  path: rankingList,
  query: {
bool: {
  must: [
{
  match: {
rankingList.key: {
  query: Academic
}
  }
},
{
  range: {
rankingList.value: {
  gt: 5
}
  }
}
  ]
} 
  }
}
  }
}

I want to get only the key value that is related to Academic within the 
array is it possible. right now query works fine but returns all the array 
elements.

- 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/6f5c2cd1-a92e-4c8c-8bd3-ca8193033080%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


How to query custom rest handler in elastic search using Java api

2014-01-02 Thread Shishir Kumar
Hi,
I have implemented a simple custom rest handler class for elastic search. 
If I need to call it using curl it works just fine.
curl -XGET '10.114.24.132:9200/_mastering/nodes?pretty'

However, I want to call this using the elastic search Java api (with an 
embedded client node). Could you please help me with this? I am new to 
elastic search and not able to figure this out.

P.S. I had followed the instructions given in the link 
http://elasticsearchserverbook.com/creating-custom-elasticsearch-rest-action/ 
for setting up the custom handler.

-- 
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/6a352a4d-3ac6-4970-95de-80d56e4d7dec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Non Alphanumeric character searching

2014-01-02 Thread deep saxena
Hey
Thanx for the reply. I am not able to install the inquisitor, can you 
please  show us the path on this

On Thursday, 2 January 2014 01:43:30 UTC+5:30, Alexander Reelsen wrote:

 Hey,

 most likely those special chars have been removed before your data has 
 been stored in the inverted index - and thus cannot be searched for. This 
 highly depends on the mapping for a field. You can play around with the 
 analyze API to find out, how a string is tokenized and stored. See 
 http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-analyze.html

 Or use the awesome inquisitor plugin, which offers a nice GUI around that 
 functionality, see https://github.com/polyfractal/elasticsearch-inquisitor


 --Alex


 On Mon, Dec 30, 2013 at 3:05 PM, deep saxena sandy1...@gmail.comjavascript:
  wrote:

 #%##%#%#$%#%#$%#$ my data contain this string.

 I am firing this query, but not able to search the data. any clues why it 
 is not searching? if I put abc in between #%##%#%#abc$%#%#$%#$ and fire the 
 same query which this query string it find out the result for me.

 {
   from : 0,
   size : 3,
   query : {
 filtered : {
   query : {
 bool : {
   should : {
 query_string : {
   query : \#%##%#%#$%#%#$%#$\,
   default_field : DATA
 }
   }
 }
   },
   filter : {
 range : {
   timestamp : {
 from : 0,
 to : 1388412035468,
 include_lower : true,
 include_upper : true
   }
 }
   }
 }
   }
 }

 -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/elasticsearch/b13816bb-e08b-4627-a517-dce0f90ca581%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/dfe29397-662a-45b8-b1de-dcb3ca4c0a43%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


ElasticSearch Index Wrong Date

2014-01-02 Thread Eric Luellen
Hello,

I recently setup my elasticsearch instance and everything has been working 
fine. However, when I looked at Kibana today I saw that the logs stopped 
showing up as soon as 2014 hit. When looking at my data on the cluster, I 
see this:

ls -altr data/my-cluster/nodes/0/indices/
total 44
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 20 09:39 kibana-int
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 25 14:00 
logstash-2013.12.26
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 26 14:00 
logstash-2013.12.27
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 27 14:00 
logstash-2013.12.28
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 28 14:00 
logstash-2013.12.29
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 29 14:00 
logstash-2013.12.30
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 30 14:00 
logstash-2013.12.31
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 31 14:00 
logstash-2013.01.01
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Dec 31 14:00 
logstash-2014.01.01
drwxr-xr-x  8 elasticsearch elasticsearch 4096 Jan  1 14:00 
logstash-2013.01.02

As you can see, there is one 2014 file and 2 2013 files for the new year 
that shouldn't be there. For some reason, elasticsearch thinks it's 2013 
still and creating folders with the wrong date. I confirmed that all of my 
servers have the correct time on them. How can I fix this on 
elasticsearch's end?

Thanks,
Eric

-- 
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/4d2ed1eb-e7b4-4c51-8b14-15e065d05592%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need help retrieving field from ES

2014-01-02 Thread Nick Toseland
Can anyone help me please?

Many thanks


On Monday, 23 December 2013 20:40:17 UTC, Nick Toseland wrote:

 Hi All

 I am new to ElasticSearch, please forgive my stupidity.

 I cant seem to get the keepalive field out of ES.

 {
   _index : lj-2013122320,
   _type : varnish,
   _id : Y1M18ZItTDaap_rOAS5YOA,
   _score : 1.0
 }

 I can get other field out of it cdn:

 {
   _index : 2013122320,
   _type : log,
   _id : 2neLlVNKQCmXq6etTE6Kcw,
   _score : 1.0,
   fields : {
 cdn : -
   }
 }

 The mapping is there:

 {log:{_timestamp:{enabled:true,store:true},properties:
 {keepalive:{type:integer

 Any help is much appreciated.

 Thanks in advance

 Nick



-- 
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/be2f3251-283c-4f7b-b5f6-09e807f7fe84%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: elastic and language stem (polish)

2014-01-02 Thread Ivan Brusic
Analyzers are associated with fields, so in your mapping you can specify
which analyzer to use. When you query a field, elasticsearch will know
which analyzer to use (although it can be overridden). For example:

title: {type: string, analyzer: polish}

If you are using the plugin, there is no need to create your own analyzer,
except if you want to override the default analyzer.
index.analysis.analyzer.default

I do not use Ruby, so I do not understand the context of the above example.

Cheers,

Ivan







On Wed, Jan 1, 2014 at 8:26 PM, Rafath Khan rafat...@gmail.com wrote:

  Hello everybody

 I'm struggling with polish stem, I've indexed my documents with polish
 stemm

 @@elastic.index index: index, type: type, id: data[:id],
 body: {
 settings: {index: {
 analysis: {analyzer: {default: {type: 'snowball', 
 language: 'Polish'}}},
 filter: {my_stemmer: {type: 'stemmer', name: 
 'polish'}}
 }},
 type_id: data[:type_id], descr: data[:descr].strip,
search: #{data[:type_id]} #{data[:descr]} 
 #{data[:descr].to_ascii}}


 and now I don't know how to use polish analyzer to make query, can anybody
 provide an example?

 I've tried this example:
 http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-analyzers.html
 but I dont understand which index I should use?

 Im using ruby elasticsearch_api gem like this:

 @@elastic.search index: index, type: type, body: {query: {match: {search:query
 }}}

 so where this:

 index :
   analysis :
 analyzer :
   standard :
 alias: [alias1, alias2]
 type : standard
 stopwords : [test1, test2, test3]


 should I put?

 I'm using this stemmer:
 https://github.com/elasticsearch/elasticsearch-analysis-stempel

 Thanks for reply,
 best regards and happy new year! :)

  --
 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/c5201c97-d06b-4780-a7a5-b82fa0611cdb%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/CALY%3DcQC89St%2BH-3cwcHHuzzg4pKMgOjPYqcp46qorNW-s8F1YA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problems with excesive GC

2014-01-02 Thread joergpra...@gmail.com
What ES version is that?

What type of queries do you perform?

What filter cache did you configure?

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/CAKdsXoFD6s9tau6sb6Dg-qB9jPqWONFv-R343SxN0uzUBv%3DHKw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Getting specific Fields

2014-01-02 Thread Ivan Brusic
Not yet supported:
https://github.com/elasticsearch/elasticsearch/issues/3022

Cheers,

Ivan


On Thu, Jan 2, 2014 at 4:27 AM, paul avinashpau...@gmail.com wrote:

 My DATA
 ---
 {
rankingList:[
   {
  value:9,
  key:Academic
   },
   {
  value:6,
  key:Flexibility
   }
]
 }

 {
rankingList:[
   {
  value:12,
  key:Academic
   },
   {
  value:6,
  key:Flexibility
   }
]
 }

 My Mapping
 ---
 {
mappings:{
   TestNested:{
  properties:{
 rankingList:{
type:nested
 }
  }
   }
}
 }

 My QUERY
 -
 {
   query: {
 nested: {
   path: rankingList,
   query: {
 bool: {
   must: [
 {
   match: {
 rankingList.key: {
   query: Academic
 }
   }
 },
 {
   range: {
 rankingList.value: {
   gt: 5
 }
   }
 }
   ]
 }
   }
 }
   }
 }

 I want to get only the key value that is related to Academic within the
 array is it possible. right now query works fine but returns all the array
 elements.

 - 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/6f5c2cd1-a92e-4c8c-8bd3-ca8193033080%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/CALY%3DcQDqTQy6iVe_%3DgSQowUE-Gh5Ug%2Bn2b_Jn2CsDeRN3GwGKA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need help retrieving field from ES

2014-01-02 Thread David Pilato
I think you will get more help if you follow what is explained here: 
http://www.elasticsearch.org/help/

Hard to help without more information.

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

Le 2 janv. 2014 à 18:44, Nick Toseland nick.tosel...@gmail.com a écrit :

 Can anyone help me please?
 
 Many thanks
 
 
 On Monday, 23 December 2013 20:40:17 UTC, Nick Toseland wrote:
 
 Hi All
 
 I am new to ElasticSearch, please forgive my stupidity.
 
 I cant seem to get the keepalive field out of ES.
 
 {
   _index : lj-2013122320,
   _type : varnish,
   _id : Y1M18ZItTDaap_rOAS5YOA,
   _score : 1.0
 }
 
 I can get other field out of it cdn:
 
 {
   _index : 2013122320,
   _type : log,
   _id : 2neLlVNKQCmXq6etTE6Kcw,
   _score : 1.0,
   fields : {
 cdn : -
   }
 }
 
 The mapping is there:
 
 {log:{_timestamp:{enabled:true,store:true},properties:{keepalive:{type:integer
 
 Any help is much appreciated.
 
 Thanks in advance
 
 Nick
 
 -- 
 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/be2f3251-283c-4f7b-b5f6-09e807f7fe84%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/B21110F6-14E0-4301-AD38-0113086FC471%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Deb repos are offline?

2014-01-02 Thread Stas Oskin
All fine now, thanks.


On Thu, Jan 2, 2014 at 9:58 PM, Demetri Mouratis dmour...@gmail.com wrote:

 apt doesn't seem to like the way the key is setup.

 root@syslog2:/etc/apt/sources.list.d# wget -O -
 http://packages.elasticsearch.org/GPG-KEY-elasticsearch | apt-key add -

 --2014-01-02 19:50:21--
 http://packages.elasticsearch.org/GPG-KEY-elasticsearch

 Resolving packages.elasticsearch.org (packages.elasticsearch.org)...
 176.32.102.81

 Connecting to packages.elasticsearch.org 
 (packages.elasticsearch.org)|176.32.102.81|:80...
 connected.

 HTTP request sent, awaiting response... 200 OK

 Length: 1768 (1.7K) [binary/octet-stream]

 Saving to: `STDOUT'


 100%[]
 1,768   --.-K/s   in 0s


 2014-01-02 19:50:21 (233 MB/s) - written to stdout [1768/1768]
  # apt-get update

 .
 .
 .

 *W: GPG error: http://packages.elasticsearch.org
 http://packages.elasticsearch.org stable Release: The following
 signatures were invalid: BADSIG D27D666CD88E42B4 Elasticsearch
 (Elasticsearch Signing Key) dev_...@elasticsearch.org
 dev_...@elasticsearch.org*


 root@syslog2:~# apt-get install logstash

 Reading package lists... Done

 Building dependency tree

 Reading state information... Done

 The following NEW packages will be installed:

   logstash

 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

 Need to get 76.8 MB of archives.

 After this operation, 82.7 MB of additional disk space will be used.

 *WARNING: The following packages cannot be authenticated!*

   logstash

 *Install these packages without verification [y/N]?*

 --
 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/jy8bSrNRkFg/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/ed33877f-78af-447a-8b72-6cd0cae25163%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/CA%2BNQ%2BDmDs7xYmA4jcYTQMmussOFszFUTOMkLectrMLNnndvYuw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need help retrieving field from ES

2014-01-02 Thread Nick Toseland
Thanks for the pointers David.

I am using the elastic search under Perl, to retrieve data based on facets, 
however the keepalive field is not returned. I guess this is because it is 
not in the _source. However I can’t seem to get that field to appear.

We create new indexes every hour, the last 24hours form an alias.

I have created a gist with the search and the mapping from the index; here 
https://gist.github.com/nickt/8226220

Thanks again

Nick


On Thursday, 2 January 2014 19:32:22 UTC, David Pilato wrote:

 I think you will get more help if you follow what is explained here: 
 http://www.elasticsearch.org/help/

 Hard to help without more information.

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

 Le 2 janv. 2014 à 18:44, Nick Toseland nick.t...@gmail.com javascript: 
 a écrit :

 Can anyone help me please?

 Many thanks


 On Monday, 23 December 2013 20:40:17 UTC, Nick Toseland wrote:

 Hi All

 I am new to ElasticSearch, please forgive my stupidity.

 I cant seem to get the keepalive field out of ES.

 {
   _index : lj-2013122320,
   _type : varnish,
   _id : Y1M18ZItTDaap_rOAS5YOA,
   _score : 1.0
 }

 I can get other field out of it cdn:

 {
   _index : 2013122320,
   _type : log,
   _id : 2neLlVNKQCmXq6etTE6Kcw,
   _score : 1.0,
   fields : {
 cdn : -
   }
 }

 The mapping is there:

 {log:{_timestamp:{enabled:true,store:true},properties:
 {keepalive:{type:integer

 Any help is much appreciated.

 Thanks in advance

 Nick

  -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/elasticsearch/be2f3251-283c-4f7b-b5f6-09e807f7fe84%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/617940e3-1196-4bc5-b9df-dc97886e7001%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need help retrieving field from ES

2014-01-02 Thread Ivan Brusic
Judging by the one sample document, the keepalive field is not there. You
can use the missing filter to see if any documents do have that field. For
example:

curl -XPOST localhost:9200/2014010119/_count/ -d '
{
   filtered: {
  query: {
 match_all: {}
  },
  filter: {
 not: {
filter: {
   missing: {
  field: keepalive
   }
}
 }
  }
   }
}
'

-- 
Ivan


On Thu, Jan 2, 2014 at 12:35 PM, Nick Toseland nick.tosel...@gmail.comwrote:

 Thanks for the pointers David.

 I am using the elastic search under Perl, to retrieve data based on
 facets, however the keepalive field is not returned. I guess this is
 because it is not in the _source. However I can’t seem to get that field to
 appear.

 We create new indexes every hour, the last 24hours form an alias.

 I have created a gist with the search and the mapping from the index; here
 https://gist.github.com/nickt/8226220

 Thanks again

 Nick



 On Thursday, 2 January 2014 19:32:22 UTC, David Pilato wrote:

 I think you will get more help if you follow what is explained here:
 http://www.elasticsearch.org/help/

 Hard to help without more information.

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

 Le 2 janv. 2014 à 18:44, Nick Toseland nick.t...@gmail.com a écrit :

 Can anyone help me please?

 Many thanks


 On Monday, 23 December 2013 20:40:17 UTC, Nick Toseland wrote:

 Hi All

 I am new to ElasticSearch, please forgive my stupidity.

 I cant seem to get the keepalive field out of ES.

 {
   _index : lj-2013122320,
   _type : varnish,
   _id : Y1M18ZItTDaap_rOAS5YOA,
   _score : 1.0
 }

 I can get other field out of it cdn:

 {
   _index : 2013122320,
   _type : log,
   _id : 2neLlVNKQCmXq6etTE6Kcw,
   _score : 1.0,
   fields : {
 cdn : -
   }
 }

 The mapping is there:

 {log:{_timestamp:{enabled:true,store:true},properties:
 {keepalive:{type:integer

 Any help is much appreciated.

 Thanks in advance

 Nick

  --
 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/be2f3251-283c-4f7b-b5f6-09e807f7fe84%
 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/617940e3-1196-4bc5-b9df-dc97886e7001%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/CALY%3DcQDMK%2BUuKW5XbRQMoT0XG_VixhU%2BJAnFrcem_dCvL4%3D5Cw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Order by name doesn't work as expected

2014-01-02 Thread Nikolay Chankov
Thank you, it's working.



On Thursday, January 2, 2014 4:20:17 PM UTC, Nikolay Chankov wrote:

 Hi guys,

 for some reason, the order by name, _score is not working as I would 
 expect.
 I've prepared a simple example to explain what I mean.
 There are 2 records: john doe and jane doe. if there is no email in the 
 index their score is the same, and the order is correct, jane goes before 
 john, but if john's record has email which contain doe (the search phrase), 
 john _score is higher and the order is wrong.
 I've noticed that in the results the sort node is [ doe, 0.6328839 
 ], [ doe, 0.48819983 ] rather than [ john doe, 0.6328839 ], [ jane 
 doe, 0.48819983 ]. if the order is name:desc the search is  [ jane, 
 0.6328839 ], [ john, 0.48819983 ]

 This happen when I use query:{...}. If the query is missing the results 
 get the same weight and it is working as expected.

 do I need to make special sort somehow in order to get the desired order, 
 or it's a bug?

 Thanks in advance.

 Here is the script how to see this behavior. I am using 0.90.5 if it does 
 matter (tested 0.90.8 with the same effect). BTW, if the name is without a 
 space e.g. johndoe, janedoe the order is correct.

 curl -XDELETE 'http://localhost:9200/test_search'
 curl -XPUT 'http://localhost:9200/test_search/' -d '
 {
 mappings : {
 record : {
 properties : {
 object : { 
 type : string 
 },
 id : { 
 type : integer 
 },
 name : { 
 type : string, 
 boost : 6 
 },
 email : { 
 type : string, 
 boost : 5 
 }
 }
 }
 }

 }
 '
 curl -XPUT 'http://localhost:9200/test_search/record/1' -d '{
 object : User,
 id : 1,
 name : john doe,
 email : d...@doe.com
 }'
 curl -XPUT 'http://localhost:9200/test_search/record/2' -d '{
 object : User,
 id : 2,
 name : jane doe,
 email : j...@d.com
 }'

 curl -XGET 'http://localhost:9200/test_search/_search?pretty=true' -d 
 '{query:{filtered:{query:{queryString:{query:doe,sort:[{name:asc},_score]}'



-- 
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/ae51e048-42d0-4ad6-a5f3-710063521959%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Problems with excesive GC

2014-01-02 Thread joergpra...@gmail.com
Filtered query sounds fine.

You should definitely look into your filters and try more efficient ones.

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/CAKdsXoEaFZRaXzQ8CjAqMrMhUjXGcWhGtB96YUZUMiD%3D-Zt%2BNg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[hadoop] Push _id to ES via PIG ESStorage

2014-01-02 Thread Dumitru Pascu
Hi,

Is it possible to push the _id field via ESStorage / PIG towards the ES 
cluster?

Thanks,
Dumitru

-- 
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/4bbd1115-390a-4fcd-91c5-4836499754e1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Need help retrieving field from ES

2014-01-02 Thread Ivan Brusic
Lucene (and therefore elasticsearch) is schemaless, so every document in
the same index does not need to have the same structure. Just because the
mapping contains the keepalive does not mean the document does. You can
enforce that every field in the document must exist in the mapping [1], but
not the inverse AFAIK.

Something in your indexing process is not adding the keepalive field. You
should double check that process first. Debug what is sent to elasticsearch
during indexing.

[1]
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-dynamic-mapping.html

Cheers,

Ivan


On Thu, Jan 2, 2014 at 1:28 PM, Nick Toseland nick.tosel...@gmail.comwrote:

 Ivan,

 That command confirms that no docs have the keepalive.

 My next silly question, is how do i get the field to appear? The mapping
 is there, are the options correct?
 Will the field appear when ES is loaded with data?

 Excuse my stupid questions, but I thought the field would be created if an
 index was created that had a mapping for keepalive.

 Thanks

 Nick



 On Thursday, 2 January 2014 20:45:46 UTC, Ivan Brusic wrote:

 Judging by the one sample document, the keepalive field is not there. You
 can use the missing filter to see if any documents do have that field. For
 example:

 curl -XPOST localhost:9200/2014010119/_count/ -d '
 {
filtered: {
   query: {
  match_all: {}
   },
   filter: {
  not: {
 filter: {
missing: {
   field: keepalive
}
 }
  }
   }
}
 }
 '

 --
 Ivan


 On Thu, Jan 2, 2014 at 12:35 PM, Nick Toseland nick.t...@gmail.comwrote:

 Thanks for the pointers David.

 I am using the elastic search under Perl, to retrieve data based on
 facets, however the keepalive field is not returned. I guess this is
 because it is not in the _source. However I can’t seem to get that field to
 appear.

 We create new indexes every hour, the last 24hours form an alias.

 I have created a gist with the search and the mapping from the index;
 here https://gist.github.com/nickt/8226220

 Thanks again

 Nick



 On Thursday, 2 January 2014 19:32:22 UTC, David Pilato wrote:

 I think you will get more help if you follow what is explained here:
 http://www.elasticsearch.org/help/

 Hard to help without more information.

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

 Le 2 janv. 2014 à 18:44, Nick Toseland nick.t...@gmail.com a écrit :

 Can anyone help me please?

 Many thanks


 On Monday, 23 December 2013 20:40:17 UTC, Nick Toseland wrote:

 Hi All

 I am new to ElasticSearch, please forgive my stupidity.

 I cant seem to get the keepalive field out of ES.

 {
   _index : lj-2013122320,
   _type : varnish,
   _id : Y1M18ZItTDaap_rOAS5YOA,
   _score : 1.0
 }

 I can get other field out of it cdn:

 {
   _index : 2013122320,
   _type : log,
   _id : 2neLlVNKQCmXq6etTE6Kcw,
   _score : 1.0,
   fields : {
 cdn : -
   }
 }

 The mapping is there:

 {log:{_timestamp:{enabled:true,store:true},properties:
 {keepalive:{type:integer

 Any help is much appreciated.

 Thanks in advance

 Nick

  --
 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/ms
 gid/elasticsearch/be2f3251-283c-4f7b-b5f6-09e807f7fe84%40goo
 glegroups.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 elasticsearc...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/elasticsearch/617940e3-1196-4bc5-b9df-dc97886e7001%
 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/24223a0b-7cb6-4a2b-8240-e633f6b80266%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/CALY%3DcQDWeinrMcY3%3Djm04xbqkyOZKx2zmSHduCb2GgKFQ2rpMQ%40mail.gmail.com.
For more options, visit 

facets on nested objects, plus facet_filter

2014-01-02 Thread Nathan Moon
Hi, I am using nested objects for indexing “ratings” on an object, where a 
rating contains two properties: the owner and the rating.  I want to be able to 
filter and facet on “my ratings”.  So to filter, for example, on objects I have 
rated a “10, I am using a filter like 

{ 
“nested” : { 
“path” : “ratings”,
“filter” : {
“and” : [{
“term” { “ratings.rating” : 10 },
“term” { “ratings.owner” : “my_id” }
}]
}
}
}

I also want to facet on “my rating”, which in a basic form I’m doing like this:

“facets” : {
“my_ratings” : {
“nested” : “ratings”,
“terms” : {
“field” : “ratings.rating”,
“size” : 10
},
“facet_filter” : {
“term” : { “ratings.owner” : “my_id” }
}
}
}

That seems to be working fine. The problem is when I have other filters in the 
mix.  If I am also filtering my query by other fields, I need to include those 
filters in my facet, so that I’m getting back facet counts that match the 
results with the other filters applied.  My problem is that I don’t know how to 
combine nested and non-nested filters in facet_filter.  If I just throw them in 
together, my counts all go to zero:

“facets” : {
“my_ratings” : {
“nested” : “ratings”,
“terms” : {
“field” : “ratings.rating”,
“size” : 10
},
“facet_filter” : {
“and” : [{
“term” : { “ratings.owner” : “my_id” }
},{
“term” : { “a_different_field” : “blah” }
}]
}
}
}

Here is a gist to demonstrate: 

https://gist.github.com/nathanmoon/8228507

It runs two queries, the first is the basic nested facet (returns what I would 
expect), and the last query is what I want to get working, but is returning no 
counts.

Thanks for any help!

Nathan

-- 
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/A3B6ECDB-9CB5-4532-A2F9-8EAA66B9EFD0%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: facets on nested objects, plus facet_filter

2014-01-02 Thread Ivan Brusic
AFAIK, you cannot filter on parent fields when faceting on nested documents.

Cheers,

Ivan


On Thu, Jan 2, 2014 at 2:46 PM, Nathan Moon nathannos...@gmail.com wrote:

 Hi, I am using nested objects for indexing “ratings” on an object, where a
 rating contains two properties: the owner and the rating.  I want to be
 able to filter and facet on “my ratings”.  So to filter, for example, on
 objects I have rated a “10, I am using a filter like

 {
 “nested” : {
 “path” : “ratings”,
 “filter” : {
 “and” : [{
 “term” { “ratings.rating” : 10 },
 “term” { “ratings.owner” : “my_id” }
 }]
 }
 }
 }

 I also want to facet on “my rating”, which in a basic form I’m doing like
 this:

 “facets” : {
 “my_ratings” : {
 “nested” : “ratings”,
 “terms” : {
 “field” : “ratings.rating”,
 “size” : 10
 },
 “facet_filter” : {
 “term” : { “ratings.owner” : “my_id” }
 }
 }
 }

 That seems to be working fine. The problem is when I have other filters in
 the mix.  If I am also filtering my query by other fields, I need to
 include those filters in my facet, so that I’m getting back facet counts
 that match the results with the other filters applied.  My problem is that
 I don’t know how to combine nested and non-nested filters in facet_filter.
  If I just throw them in together, my counts all go to zero:

 “facets” : {
 “my_ratings” : {
 “nested” : “ratings”,
 “terms” : {
 “field” : “ratings.rating”,
 “size” : 10
 },
 “facet_filter” : {
 “and” : [{
 “term” : { “ratings.owner” : “my_id” }
 },{
 “term” : { “a_different_field” : “blah” }
 }]
 }
 }
 }

 Here is a gist to demonstrate:

 https://gist.github.com/nathanmoon/8228507

 It runs two queries, the first is the basic nested facet (returns what I
 would expect), and the last query is what I want to get working, but is
 returning no counts.

 Thanks for any help!

 Nathan

 --
 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/A3B6ECDB-9CB5-4532-A2F9-8EAA66B9EFD0%40gmail.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/CALY%3DcQCX_Sdna_A9LAOWtrGT4wHg1OFa2bJW_je-iDWEXgqRCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


CPU LOAD GETTING HIGH (0.90.3)

2014-01-02 Thread Gregory S
Hi all,

I am trying to find out what could be causing system load to be over 6.5 on 
a 6 cores server. This is not yet critically alarming but this does not 
look great. Before throwing more CPU at the problem I would like to 
troubleshoot and figure out what is the best solution here.
I have gist a hot thread dumps and some more info. Please find the links 
bellow. Thank you for helping out.

*Elasticsearch JVM stats*

https://gist.github.com/Gster1/9459f2e78893609bf713
*Elasticsearch Hot_threads dump* *and systems info*
https://gist.github.com/Gster1/23a1be1089a8d1f6fde1

Greg

-- 
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/57fa2147-1daf-485c-985a-0fb8f2746273%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: RabbitMQ river plugin

2014-01-02 Thread David Pilato
Which Elasticsearch version are you using?
How did you create the river?
Could you gist the full log file?

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


Le 2 janv. 2014 à 23:45, David Koblas kob...@gmail.com a écrit :

Was trying to get the 
https://github.com/elasticsearch/elasticsearch-river-rabbitmq plugin working 
with our system.

However, I wonder if it does work since it's not been updated to the current 
version.  The only log message I have is:

[2014-01-02 22:21:13,243][INFO ][plugins  ] [i-97eff8b8] loaded 
[river-rabbitmq, cloud-aws], sites [paramedic]

Configuration is pretty much stock from the github page.  Is there any other 
debugging I could look for or is this just not working?
-- 
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/3bff56d5-e74e-4d12-b193-5f259fa12717%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/896B2F20-79BC-4CD4-AAA3-67F4DE9DC87D%40pilato.fr.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Returning substring in a GET request

2014-01-02 Thread Nikolas Everett
On Thu, Jan 2, 2014 at 9:36 PM, Adolfo Rodriguez pellyado...@yahoo.eswrote:

Hi, I have some quite large documents (about 30k) and I want to get
only an *excerpt
 of each document*, for example, 250 characters. It really does not matter
 if they are the first 250 characters or a chunk in the middle. I would
 prefer not doing it a client side to avoid these large documents moving in
 the network. This thread looks very related.

 Is there any progress on this (use a GET request) from March?

 Can this be done with a preparedSearch or any other mechanism?

 Looks something quite trivial to not have an easy response.


Highlighting can return an excerpt from the beginning of the document if it
doesn't find a match in the document.  You can't do that with an HTTP GET.
You still have to POST the search with the right highlihting configuration.

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/CAPmjWd288v0%2BDNe0UJwqntnbUOJG%2Bjfgsq%2B2hpogWrUKY_ZSbw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Returning substring in a GET request

2014-01-02 Thread Adolfo Rodriguez
This seems a very recent 
additionhttps://github.com/elasticsearch/elasticsearch/commit/14a709f563a264c4371392e31c7bee9d26758056
 to 
ES and the config param finally called no_match_size. It looks like that 
the way to define this is in a Highlighter Field as follows:

HighlightBuilder.Field field = new HighlightBuilder.Field(text)
.fragmentSize(21)
 .numOfFragments(1)
 .highlighterType(plain)
 .*noMatchSize(20);*

and, in the SearchRequestBuilder assign this field as follows:
...
.addHighlightedField(*field*)
...

Unfortunately my ES 0_90_5, HighlightBuilder still does not contain this 
method noMatchSize 
https://github.com/elasticsearch/elasticsearch/blob/14a709f563a264c4371392e31c7bee9d26758056/src/main/java/org/elasticsearch/search/highlight/HighlightBuilder.java#L455so
 
it looks that I have to upgrade my ES to latest release. 

To be confirmed

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/3709de3c-1acf-4f4e-b71b-dbedd789e865%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Term filter not working for select strings?

2014-01-02 Thread kakaner
Hi!

I recently discovered select term filters weren't working on my dataset, 
and narrowed it down to an example involving two letter strings.

This is reproducible on 0.90.2/5/7 both locally and on remote hosts with 
the following commands:

curl -XPUT 'http://localhost:9200/index1/type1/1' -d '{code:zh, 
name:China}'
curl -XPUT 'http://localhost:9200/index1/type1/2' -d '{code:in, 
name:India}'

curl 'http://localhost:9200/index1/type1/_search' -d 
'{query:{term:{code:zh}}}' // returns Doc 1
*curl 'http://localhost:9200/index1/type1/_search' -d 
'{query:{term:{code:in}}}' // returns nothing*

curl 'http://localhost:9200/index1/type1/_search' -d 
'{query:{term:{name:china}}}' // returns Doc 1
curl 'http://localhost:9200/index1/type1/_search' -d 
'{query:{term:{name:india}}}' // returns Doc 2

No mappings or analyzers were used. Is there something obvious I'm missing 
here? Thanks!
~Karen




-- 
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/92cf01a9-9942-4f7e-8fd0-f39e9ed8805b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Returning substring in a GET request

2014-01-02 Thread Adolfo Rodriguez
Functionality is available from 
1.0.0.beta1http://www.elasticsearch.org/downloads/1-0-0-beta1/
:

   - New highlighter based on lucene postings highlighter 
#3704http://github.com/elasticsearch/elasticsearch/issues/issue/3704
   , #4042 http://github.com/elasticsearch/elasticsearch/issues/issue/4042
 #4103http://github.com/elasticsearch/elasticsearch/issues/issue/4103

and alternatively can be configured with .setHighlighterNoMatchSize(20) on 
the SearchRequestBuilder.

-- 
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/40d1179b-b5d7-4676-b006-16dea7a7faf1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


I have a question (docs count, deleted value,)

2014-01-02 Thread jane white
My elasticsearch version 0.90.8 and, 2 nodes(clustring).

I have a question.
I used http://localhost:9200/_nodes/stats/indices?pretty=true;

 cluster_name : janecluster,
  nodes : {
jWjT2xNtQwOdn17oV9KhVg : {
  timestamp : 1388722961082,
  name : node_es01,
  transport_address : inet[/?.?.?.?:9300],
  hostname : localhost.localdomain,
  attributes : {
master : true
  },
  indices : {
docs : {
  count : 5025,
  deleted : 14
},



I don't know 'deleted value'. this value always changed. when docs deleted, 
'deleted value' is incresed. but sometime 'deleted value' is decresed. 
example)

deleted value: 14   after a few secondsdeleted value: 10 

 I want to know delete value update time. and how to configure update time?
 

-- 
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/f1a72209-e0a0-4383-a6f7-c60c6ef72242%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Term filter not working for select strings?

2014-01-02 Thread Ivan Brusic
The default analyzer uses a stop word filter and in is considered a stop
word. If you are using term queries, then setting your field to
non_analyzed will probably be your best fix.

Cheers,

Ivan


On Thu, Jan 2, 2014 at 8:27 PM, kakaner kaka...@gmail.com wrote:

 Hi!

 I recently discovered select term filters weren't working on my dataset,
 and narrowed it down to an example involving two letter strings.

 This is reproducible on 0.90.2/5/7 both locally and on remote hosts with
 the following commands:

 curl -XPUT 'http://localhost:9200/index1/type1/1' -d '{code:zh,
 name:China}'
 curl -XPUT 'http://localhost:9200/index1/type1/2' -d '{code:in,
 name:India}'

 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{code:zh}}}' // returns Doc 1
 *curl 'http://localhost:9200/index1/type1/_search
 http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{code:in}}}' // returns nothing*

 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{name:china}}}' // returns Doc 1
 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{name:india}}}' // returns Doc 2

 No mappings or analyzers were used. Is there something obvious I'm missing
 here? Thanks!
 ~Karen




  --
 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/92cf01a9-9942-4f7e-8fd0-f39e9ed8805b%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/CALY%3DcQCxv2KxnwN1A5cwWFYa_P%3DdRmtLoHTsSi9PjWjVuR%3Dzdw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Term filter not working for select strings?

2014-01-02 Thread kakaner
Thanks Ivan!! That makes a ton of sense and can't believe I overlooked 
that. Happened to be one of our unmapped fields :)

On Friday, January 3, 2014 12:42:52 AM UTC-5, Ivan Brusic wrote:

 The default analyzer uses a stop word filter and in is considered a stop 
 word. If you are using term queries, then setting your field to 
 non_analyzed will probably be your best fix.

 Cheers,

 Ivan


 On Thu, Jan 2, 2014 at 8:27 PM, kakaner kak...@gmail.com javascript:wrote:

 Hi!

 I recently discovered select term filters weren't working on my dataset, 
 and narrowed it down to an example involving two letter strings.

 This is reproducible on 0.90.2/5/7 both locally and on remote hosts with 
 the following commands:

 curl -XPUT 'http://localhost:9200/index1/type1/1' -d '{code:zh, 
 name:China}'
 curl -XPUT 'http://localhost:9200/index1/type1/2' -d '{code:in, 
 name:India}'

 curl 'http://localhost:9200/index1/type1/_search' -d 
 '{query:{term:{code:zh}}}' // returns Doc 1
 *curl 'http://localhost:9200/index1/type1/_search 
 http://localhost:9200/index1/type1/_search' -d 
 '{query:{term:{code:in}}}' // returns nothing*

 curl 'http://localhost:9200/index1/type1/_search' -d 
 '{query:{term:{name:china}}}' // returns Doc 1
 curl 'http://localhost:9200/index1/type1/_search' -d 
 '{query:{term:{name:india}}}' // returns Doc 2

 No mappings or analyzers were used. Is there something obvious I'm 
 missing here? Thanks!
 ~Karen




  -- 
 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 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/elasticsearch/92cf01a9-9942-4f7e-8fd0-f39e9ed8805b%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/e7973b97-e891-4918-b76f-60c13817aae9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Returning substring in a GET request

2014-01-02 Thread Adolfo Rodriguez
Tested with 1.0.0.beta1 but does not seem to be working.

For the query below, the highlights are returned successfully when the 
record matches *key*. However, despite *setHighlighterNoMatchSize(250) *has 
been set, unmatching records does not return 250 characters from the start 
of the record as expected.

return getClient().prepareSearch()
.setQuery(QueryBuilders
.boolQuery()
 .should(QueryBuilders.matchQuery(column, *key*))
 )
.setFilter(FilterBuilders.idsFilter(vertex).ids(array))
.addHighlightedField(column, 250, 1)
* .setHighlighterNoMatchSize(250)*
.execute()
.actionGet();

Any idea?

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/5bd91dfd-5f96-4b63-aa86-6580b057e88b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Returning substring in a GET request

2014-01-02 Thread Adolfo Rodriguez
Tested in 0.90.9 (December 23, 2013) as seems newer than 1.0.0.beta1 (November 
6, 2013) and same issue: no highlighting results when key does not match, 
despite *setHighlighterNoMatchSize(250) *has been set*.*

-- 
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/3079f257-81a1-40a3-9d21-337d53aa6571%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Term filter not working for select strings?

2014-01-02 Thread Ivan Brusic
After all my years of development, I would be surprised if I did NOT make a
silly mistake!

-- 
Ivan


On Thu, Jan 2, 2014 at 10:08 PM, kakaner kaka...@gmail.com wrote:

 Thanks Ivan!! That makes a ton of sense and can't believe I overlooked
 that. Happened to be one of our unmapped fields :)


 On Friday, January 3, 2014 12:42:52 AM UTC-5, Ivan Brusic wrote:

 The default analyzer uses a stop word filter and in is considered a
 stop word. If you are using term queries, then setting your field to
 non_analyzed will probably be your best fix.

 Cheers,

 Ivan


 On Thu, Jan 2, 2014 at 8:27 PM, kakaner kak...@gmail.com wrote:

 Hi!

 I recently discovered select term filters weren't working on my dataset,
 and narrowed it down to an example involving two letter strings.

 This is reproducible on 0.90.2/5/7 both locally and on remote hosts with
 the following commands:

 curl -XPUT 'http://localhost:9200/index1/type1/1' -d '{code:zh,
 name:China}'
 curl -XPUT 'http://localhost:9200/index1/type1/2' -d '{code:in,
 name:India}'

 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{code:zh}}}' // returns Doc 1
 *curl 'http://localhost:9200/index1/type1/_search
 http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{code:in}}}' // returns nothing*

 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{name:china}}}' // returns Doc 1
 curl 'http://localhost:9200/index1/type1/_search' -d
 '{query:{term:{name:india}}}' // returns Doc 2

 No mappings or analyzers were used. Is there something obvious I'm
 missing here? Thanks!
 ~Karen




  --
 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/92cf01a9-9942-4f7e-8fd0-f39e9ed8805b%
 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/e7973b97-e891-4918-b76f-60c13817aae9%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/CALY%3DcQDMoQ9pB%2BCRDTscQWCLmZBh0H71kFFFvEO-Kof0BwDvEg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.