'indices'에 해당되는 글 4건

  1. 2016.12.06 [Elasticsearch] _cat nodes/indices help
  2. 2015.03.18 [Elasticsearch] index vs. indice vs. indices ????
  3. 2013.04.17 [elasticsearch] Indices API - Optimize
  4. 2013.04.17 [elasticsearch] Indices API - Aliases

[Elasticsearch] _cat nodes/indices help

Elastic/Elasticsearch 2016. 12. 6. 12:18

그냥 볼일이 있어서 올려봅니다.

nodes 랑 indices 만.


[참고문서]

https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html

id                               | id,nodeId                          | unique node id                                                                                                   
pid                              | p                                  | process id                                                                                                       
host                             | h                                  | host name                                                                                                        
ip                               | i                                  | ip address                                                                                                       
port                             | po                                 | bound transport port                                                                                             
version                          | v                                  | es version                                                                                                       
build                            | b                                  | es build hash                                                                                                    
jdk                              | j                                  | jdk version                                                                                                      
disk.avail                       | d,disk,diskAvail                   | available disk space                                                                                             
heap.current                     | hc,heapCurrent                     | used heap                                                                                                        
heap.percent                     | hp,heapPercent                     | used heap ratio                                                                                                  
heap.max                         | hm,heapMax                         | max configured heap                                                                                              
ram.current                      | rc,ramCurrent                      | used machine memory                                                                                              
ram.percent                      | rp,ramPercent                      | used machine memory ratio                                                                                        
ram.max                          | rm,ramMax                          | total machine memory                                                                                             
file_desc.current                | fdc,fileDescriptorCurrent          | used file descriptors                                                                                            
file_desc.percent                | fdp,fileDescriptorPercent          | used file descriptor ratio                                                                                       
file_desc.max                    | fdm,fileDescriptorMax              | max file descriptors                                                                                             
cpu                              | cpu                                | recent cpu usage                                                                                                 
load                             | l                                  | most recent load avg                                                                                             
uptime                           | u                                  | node uptime                                                                                                      
node.role                        | r,role,dc,nodeRole                 | d:data node, c:client node                                                                                       
master                           | m                                  | m:master-eligible, *:current master                                                                              
name                             | n                                  | node name                                                                                                        
completion.size                  | cs,completionSize                  | size of completion                                                                                               
fielddata.memory_size            | fm,fielddataMemory                 | used fielddata cache                                                                                             
fielddata.evictions              | fe,fielddataEvictions              | fielddata evictions                                                                                              
query_cache.memory_size          | qcm,queryCacheMemory               | used query cache                                                                                                 
query_cache.evictions            | qce,queryCacheEvictions            | query cache evictions                                                                                            
request_cache.memory_size        | rcm,requestCacheMemory             | used request cache                                                                                               
request_cache.evictions          | rce,requestCacheEvictions          | request cache evictions                                                                                          
request_cache.hit_count          | rchc,requestCacheHitCount          | request cache hit counts                                                                                         
request_cache.miss_count         | rcmc,requestCacheMissCount         | request cache miss counts                                                                                        
flush.total                      | ft,flushTotal                      | number of flushes                                                                                                
flush.total_time                 | ftt,flushTotalTime                 | time spent in flush                                                                                              
get.current                      | gc,getCurrent                      | number of current get ops                                                                                        
get.time                         | gti,getTime                        | time spent in get                                                                                                
get.total                        | gto,getTotal                       | number of get ops                                                                                                
get.exists_time                  | geti,getExistsTime                 | time spent in successful gets                                                                                    
get.exists_total                 | geto,getExistsTotal                | number of successful gets                                                                                        
get.missing_time                 | gmti,getMissingTime                | time spent in failed gets                                                                                        
get.missing_total                | gmto,getMissingTotal               | number of failed gets                                                                                            
indexing.delete_current          | idc,indexingDeleteCurrent          | number of current deletions                                                                                      
indexing.delete_time             | idti,indexingDeleteTime            | time spent in deletions                                                                                          
indexing.delete_total            | idto,indexingDeleteTotal           | number of delete ops                                                                                             
indexing.index_current           | iic,indexingIndexCurrent           | number of current indexing ops                                                                                   
indexing.index_time              | iiti,indexingIndexTime             | time spent in indexing                                                                                           
indexing.index_total             | iito,indexingIndexTotal            | number of indexing ops                                                                                           
indexing.index_failed            | iif,indexingIndexFailed            | number of failed indexing ops                                                                                    
merges.current                   | mc,mergesCurrent                   | number of current merges                                                                                         
merges.current_docs              | mcd,mergesCurrentDocs              | number of current merging docs                                                                                   
merges.current_size              | mcs,mergesCurrentSize              | size of current merges                                                                                           
merges.total                     | mt,mergesTotal                     | number of completed merge ops                                                                                    
merges.total_docs                | mtd,mergesTotalDocs                | docs merged                                                                                                      
merges.total_size                | mts,mergesTotalSize                | size merged                                                                                                      
merges.total_time                | mtt,mergesTotalTime                | time spent in merges                                                                                             
percolate.current                | pc,percolateCurrent                | number of current percolations                                                                                   
percolate.memory_size            | pm,percolateMemory                 | memory used by percolations                                                                                      
percolate.queries                | pq,percolateQueries                | number of registered percolation queries                                                                         
percolate.time                   | pti,percolateTime                  | time spent percolating                                                                                           
percolate.total                  | pto,percolateTotal                 | total percolations                                                                                               
refresh.total                    | rto,refreshTotal                   | total refreshes                                                                                                  
refresh.time                     | rti,refreshTime                    | time spent in refreshes                                                                                          
script.compilations              | scrcc,scriptCompilations           | script compilations                                                                                              
script.cache_evictions           | scrce,scriptCacheEvictions         | script cache evictions                                                                                           
search.fetch_current             | sfc,searchFetchCurrent             | current fetch phase ops                                                                                          
search.fetch_time                | sfti,searchFetchTime               | time spent in fetch phase                                                                                        
search.fetch_total               | sfto,searchFetchTotal              | total fetch ops                                                                                                  
search.open_contexts             | so,searchOpenContexts              | open search contexts                                                                                             
search.query_current             | sqc,searchQueryCurrent             | current query phase ops                                                                                          
search.query_time                | sqti,searchQueryTime               | time spent in query phase                                                                                        
search.query_total               | sqto,searchQueryTotal              | total query phase ops                                                                                            
search.scroll_current            | scc,searchScrollCurrent            | open scroll contexts                                                                                             
search.scroll_time               | scti,searchScrollTime              | time scroll contexts held open                                                                                   
search.scroll_total              | scto,searchScrollTotal             | completed scroll contexts                                                                                        
segments.count                   | sc,segmentsCount                   | number of segments                                                                                               
segments.memory                  | sm,segmentsMemory                  | memory used by segments                                                                                          
segments.index_writer_memory     | siwm,segmentsIndexWriterMemory     | memory used by index writer                                                                                      
segments.index_writer_max_memory | siwmx,segmentsIndexWriterMaxMemory | maximum memory index writer may use before it must write buffered documents to a new segment                     
segments.version_map_memory      | svmm,segmentsVersionMapMemory      | memory used by version map                                                                                       
segments.fixed_bitset_memory     | sfbm,fixedBitsetMemory             | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields
suggest.current                  | suc,suggestCurrent                 | number of current suggest ops                                                                                    
suggest.time                     | suti,suggestTime                   | time spend in suggest                                                                                            
suggest.total                    | suto,suggestTotal                  | number of suggest ops    


[참고문서]

https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html

health                               | h                                  | current health status                                                                                            
status                               | s                                  | open/close status                                                                                                
index                                | i,idx                              | index name                                                                                                       
pri                                  | p,shards.primary,shardsPrimary     | number of primary shards                                                                                         
rep                                  | r,shards.replica,shardsReplica     | number of replica shards                                                                                         
docs.count                           | dc,docsCount                       | available docs                                                                                                   
docs.deleted                         | dd,docsDeleted                     | deleted docs                                                                                                     
creation.date                        | cd                                 | index creation date (millisecond value)                                                                          
creation.date.string                 | cds                                | index creation date (as string)                                                                                  
store.size                           | ss,storeSize                       | store size of primaries & replicas                                                                               
pri.store.size                       |                                    | store size of primaries                                                                                          
completion.size                      | cs,completionSize                  | size of completion                                                                                               
pri.completion.size                  |                                    | size of completion                                                                                               
fielddata.memory_size                | fm,fielddataMemory                 | used fielddata cache                                                                                             
pri.fielddata.memory_size            |                                    | used fielddata cache                                                                                             
fielddata.evictions                  | fe,fielddataEvictions              | fielddata evictions                                                                                              
pri.fielddata.evictions              |                                    | fielddata evictions                                                                                              
query_cache.memory_size              | qcm,queryCacheMemory               | used query cache                                                                                                 
pri.query_cache.memory_size          |                                    | used query cache                                                                                                 
query_cache.evictions                | qce,queryCacheEvictions            | query cache evictions                                                                                            
pri.query_cache.evictions            |                                    | query cache evictions                                                                                            
request_cache.memory_size            | rcm,requestCacheMemory             | used request cache                                                                                               
pri.request_cache.memory_size        |                                    | used request cache                                                                                               
request_cache.evictions              | rce,requestCacheEvictions          | request cache evictions                                                                                          
pri.request_cache.evictions          |                                    | request cache evictions                                                                                          
request_cache.hit_count              | rchc,requestCacheHitCount          | request cache hit count                                                                                          
pri.request_cache.hit_count          |                                    | request cache hit count                                                                                          
request_cache.miss_count             | rcmc,requestCacheMissCount         | request cache miss count                                                                                         
pri.request_cache.miss_count         |                                    | request cache miss count                                                                                         
flush.total                          | ft,flushTotal                      | number of flushes                                                                                                
pri.flush.total                      |                                    | number of flushes                                                                                                
flush.total_time                     | ftt,flushTotalTime                 | time spent in flush                                                                                              
pri.flush.total_time                 |                                    | time spent in flush                                                                                              
get.current                          | gc,getCurrent                      | number of current get ops                                                                                        
pri.get.current                      |                                    | number of current get ops                                                                                        
get.time                             | gti,getTime                        | time spent in get                                                                                                
pri.get.time                         |                                    | time spent in get                                                                                                
get.total                            | gto,getTotal                       | number of get ops                                                                                                
pri.get.total                        |                                    | number of get ops                                                                                                
get.exists_time                      | geti,getExistsTime                 | time spent in successful gets                                                                                    
pri.get.exists_time                  |                                    | time spent in successful gets                                                                                    
get.exists_total                     | geto,getExistsTotal                | number of successful gets                                                                                        
pri.get.exists_total                 |                                    | number of successful gets                                                                                        
get.missing_time                     | gmti,getMissingTime                | time spent in failed gets                                                                                        
pri.get.missing_time                 |                                    | time spent in failed gets                                                                                        
get.missing_total                    | gmto,getMissingTotal               | number of failed gets                                                                                            
pri.get.missing_total                |                                    | number of failed gets                                                                                            
indexing.delete_current              | idc,indexingDeleteCurrent          | number of current deletions                                                                                      
pri.indexing.delete_current          |                                    | number of current deletions                                                                                      
indexing.delete_time                 | idti,indexingDeleteTime            | time spent in deletions                                                                                          
pri.indexing.delete_time             |                                    | time spent in deletions                                                                                          
indexing.delete_total                | idto,indexingDeleteTotal           | number of delete ops                                                                                             
pri.indexing.delete_total            |                                    | number of delete ops                                                                                             
indexing.index_current               | iic,indexingIndexCurrent           | number of current indexing ops                                                                                   
pri.indexing.index_current           |                                    | number of current indexing ops                                                                                   
indexing.index_time                  | iiti,indexingIndexTime             | time spent in indexing                                                                                           
pri.indexing.index_time              |                                    | time spent in indexing                                                                                           
indexing.index_total                 | iito,indexingIndexTotal            | number of indexing ops                                                                                           
pri.indexing.index_total             |                                    | number of indexing ops                                                                                           
indexing.index_failed                | iif,indexingIndexFailed            | number of failed indexing ops                                                                                    
pri.indexing.index_failed            |                                    | number of failed indexing ops                                                                                    
merges.current                       | mc,mergesCurrent                   | number of current merges                                                                                         
pri.merges.current                   |                                    | number of current merges                                                                                         
merges.current_docs                  | mcd,mergesCurrentDocs              | number of current merging docs                                                                                   
pri.merges.current_docs              |                                    | number of current merging docs                                                                                   
merges.current_size                  | mcs,mergesCurrentSize              | size of current merges                                                                                           
pri.merges.current_size              |                                    | size of current merges                                                                                           
merges.total                         | mt,mergesTotal                     | number of completed merge ops                                                                                    
pri.merges.total                     |                                    | number of completed merge ops                                                                                    
merges.total_docs                    | mtd,mergesTotalDocs                | docs merged                                                                                                      
pri.merges.total_docs                |                                    | docs merged                                                                                                      
merges.total_size                    | mts,mergesTotalSize                | size merged                                                                                                      
pri.merges.total_size                |                                    | size merged                                                                                                      
merges.total_time                    | mtt,mergesTotalTime                | time spent in merges                                                                                             
pri.merges.total_time                |                                    | time spent in merges                                                                                             
percolate.current                    | pc,percolateCurrent                | number of current percolations                                                                                   
pri.percolate.current                |                                    | number of current percolations                                                                                   
percolate.memory_size                | pm,percolateMemory                 | memory used by percolations                                                                                      
pri.percolate.memory_size            |                                    | memory used by percolations                                                                                      
percolate.queries                    | pq,percolateQueries                | number of registered percolation queries                                                                         
pri.percolate.queries                |                                    | number of registered percolation queries                                                                         
percolate.time                       | pti,percolateTime                  | time spent percolating                                                                                           
pri.percolate.time                   |                                    | time spent percolating                                                                                           
percolate.total                      | pto,percolateTotal                 | total percolations                                                                                               
pri.percolate.total                  |                                    | total percolations                                                                                               
refresh.total                        | rto,refreshTotal                   | total refreshes                                                                                                  
pri.refresh.total                    |                                    | total refreshes                                                                                                  
refresh.time                         | rti,refreshTime                    | time spent in refreshes                                                                                          
pri.refresh.time                     |                                    | time spent in refreshes                                                                                          
search.fetch_current                 | sfc,searchFetchCurrent             | current fetch phase ops                                                                                          
pri.search.fetch_current             |                                    | current fetch phase ops                                                                                          
search.fetch_time                    | sfti,searchFetchTime               | time spent in fetch phase                                                                                        
pri.search.fetch_time                |                                    | time spent in fetch phase                                                                                        
search.fetch_total                   | sfto,searchFetchTotal              | total fetch ops                                                                                                  
pri.search.fetch_total               |                                    | total fetch ops                                                                                                  
search.open_contexts                 | so,searchOpenContexts              | open search contexts                                                                                             
pri.search.open_contexts             |                                    | open search contexts                                                                                             
search.query_current                 | sqc,searchQueryCurrent             | current query phase ops                                                                                          
pri.search.query_current             |                                    | current query phase ops                                                                                          
search.query_time                    | sqti,searchQueryTime               | time spent in query phase                                                                                        
pri.search.query_time                |                                    | time spent in query phase                                                                                        
search.query_total                   | sqto,searchQueryTotal              | total query phase ops                                                                                            
pri.search.query_total               |                                    | total query phase ops                                                                                            
search.scroll_current                | scc,searchScrollCurrent            | open scroll contexts                                                                                             
pri.search.scroll_current            |                                    | open scroll contexts                                                                                             
search.scroll_time                   | scti,searchScrollTime              | time scroll contexts held open                                                                                   
pri.search.scroll_time               |                                    | time scroll contexts held open                                                                                   
search.scroll_total                  | scto,searchScrollTotal             | completed scroll contexts                                                                                        
pri.search.scroll_total              |                                    | completed scroll contexts                                                                                        
segments.count                       | sc,segmentsCount                   | number of segments                                                                                               
pri.segments.count                   |                                    | number of segments                                                                                               
segments.memory                      | sm,segmentsMemory                  | memory used by segments                                                                                          
pri.segments.memory                  |                                    | memory used by segments                                                                                          
segments.index_writer_memory         | siwm,segmentsIndexWriterMemory     | memory used by index writer                                                                                      
pri.segments.index_writer_memory     |                                    | memory used by index writer                                                                                      
segments.index_writer_max_memory     | siwmx,segmentsIndexWriterMaxMemory | maximum memory index writer may use before it must write buffered documents to a new segment                     
pri.segments.index_writer_max_memory |                                    | maximum memory index writer may use before it must write buffered documents to a new segment                     
segments.version_map_memory          | svmm,segmentsVersionMapMemory      | memory used by version map                                                                                       
pri.segments.version_map_memory      |                                    | memory used by version map                                                                                       
segments.fixed_bitset_memory         | sfbm,fixedBitsetMemory             | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields
pri.segments.fixed_bitset_memory     |                                    | memory used by fixed bit sets for nested object field types and type filters for types referred in _parent fields
warmer.current                       | wc,warmerCurrent                   | current warmer ops                                                                                               
pri.warmer.current                   |                                    | current warmer ops                                                                                               
warmer.total                         | wto,warmerTotal                    | total warmer ops                                                                                                 
pri.warmer.total                     |                                    | total warmer ops                                                                                                 
warmer.total_time                    | wtt,warmerTotalTime                | time spent in warmers                                                                                            
pri.warmer.total_time                |                                    | time spent in warmers                                                                                            
suggest.current                      | suc,suggestCurrent                 | number of current suggest ops                                                                                    
pri.suggest.current                  |                                    | number of current suggest ops                                                                                    
suggest.time                         | suti,suggestTime                   | time spend in suggest                                                                                            
pri.suggest.time                     |                                    | time spend in suggest                                                                                            
suggest.total                        | suto,suggestTotal                  | number of suggest ops                                                                                            
pri.suggest.total                    |                                    | number of suggest ops                                                                                            
memory.total                         | tm,memoryTotal                     | total used memory                                                                                                
pri.memory.total                     |                                    | total user memory  


:

[Elasticsearch] index vs. indice vs. indices ????

Elastic/Elasticsearch 2015. 3. 18. 12:08

뭘 중요하거나 특별한건 아니지만 용어에 대한 정리가 필요 할 수 있어 그냥 적어 봅니다.


흔히 검색엔진에서는 인덱스(index) 또는 컬렉션(collection) 이라고 합니다.

검색 대상 문서들에 대한 색인 집합(?) 이라고 보시면 될 것 같습니다.


그럼 elasticsearch에서는 어떻게 사용을 할까요?

elasticsearch 뿐만 아니라 대부분의 검색엔진에서는 개별 검색 대상 그룹을 인덱스 또는 컬렉션 이라고 부릅니다.

그렇기 때문에 elasticsearch에서도 인덱스(index)라고 부르고 있고 이런 인덱스들의 복수 묶음을 indices 라고  하고 있습니다.


indice라는 표현이 간혹 나오기도 하는데 현재는 index와 indices로 정리가 된것 같아 동일하게 맞춰 볼까 합니다.

(indice 가 딱히 틀렸다고 하기도 애매 합니다.) 


[표기]

index (O)

indice (△)

indices (O)


아래는 그냥 참고하시라고 퍼왔습니다.


Ref.

http://en.wiktionary.org/wiki/indice

http://grammarist.com/usage/indexes-indices/


Indexes vs. indices

Indexes and indices are both accepted and widely used plurals of the noun index. Both appear throughout the English-speaking world, butindices prevails in varieties of English from outside North America, while indexes is more common in American and Canadian English. Meanwhile,indices is generally preferred in mathematical, financial, and technical contexts, while indexes is relatively common in general usage.

Neither form is wrong. Both have been in English many centuries (and though indexes is now most common in American English, it predates the United States by centuries). It’s true that indices is the plural of index in Latin, but index is an English word when English speakers use it—and it is a longstanding one at that—so we can pluralize it according to the conventions of English.






:

[elasticsearch] Indices API - Optimize

Elastic/Elasticsearch 2013. 4. 17. 12:52

본 문서는 개인적인 테스트와 elasticsearch.org 그리고 community 등을 참고해서 작성된 것이며,

정보 교환이 목적입니다.


잘못된 부분에 대해서는 지적 부탁 드립니다.

(예시 코드는 성능 및 보안 검증이 되지 않았습니다.)



[elasticsearch API 리뷰]

원문 링크 : http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize/


이 API 는 indices 를 최적화 시킨다.

검색 시 성능 향상을 가져 옴.


아래는 원문의 Request Parameters 이다.

Request Parameters

The optimize API accepts the following request parameters:

NameDescription
max_num_segmentsThe number of segments to optimize to. To fully optimize the index, set it to 1. Defaults to simply checking if a merge needs to execute, and if so, executes it.
only_expunge_deletesShould the optimize process only expunge segments with deletes in it. In Lucene, a document is not deleted from a segment, just marked as deleted. During a merge process of segments, a new segment is created that does not have those deletes. This flag allow to only merge segments that have deletes. Defaults to false.
refreshShould a refresh be performed after the optimize. Defaults to true.
flushShould a flush be performed after the optimize. Defaults to true.
wait_for_mergeShould the request wait for the merge to end. Defaults to true. Note, a merge can potentially be a very heavy operation, so it might make sense to run it set to false.

- 설명이 잘나와 있어서 요약만 합니다.

- fully optimize 를 위해서는 max_num_segments : 1

- only_expunge_deletes 가 true 이면 삭제 마킹만

- wait_for_merge false 를 이용해서 대용량 처리


파라미터를 이용한 샘플 코드를 보기로 하겠습니다.


[Java 예제코드]

response = builder.setIndices("blog")

.setMaxNumSegments(1) // full optimize 를 위해서는 1, 기본은 설정을 하지 않으면 simply checking 을 

.setOnlyExpungeDeletes(false) // 기본 false

.setWaitForMerge(true)

.setOperationThreading(BroadcastOperationThreading.THREAD_PER_SHARD)

.execute()

.actionGet();

log.debug("{}", response.getSuccessfulShards());


OptimizeRequest 와 OptimizeRequestBuilder 이 두가지를 이용해서 구현 가능 함.


:

[elasticsearch] Indices API - Aliases

Elastic/Elasticsearch 2013. 4. 17. 10:26

본 문서는 개인적인 테스트와 elasticsearch.org 그리고 community 등을 참고해서 작성된 것이며,

정보 교환이 목적입니다.


잘못된 부분에 대해서는 지적 부탁 드립니다.

(예시 코드는 성능 및 보안 검증이 되지 않았습니다.)



[elasticsearch API 리뷰]

원문 링크 : http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/


[Indices Aliases]

이 API 는 index name 의 별칭을 생성 및 삭제를 할 수 있도록 한다.

하나의 별칭에 여러개의 index name 을 등록 할 수도 있으며 filter 를 통해 같은 index 의 또 다른 view 를 구현 할 수 있다.

관련 예제는 원문에 잘 나와 있기 때문에 Java API 샘플 코드만 살펴 보도록 한다.


[샘플코드 : IndicesAliasesRequestBuilder.java]

clientManager.openClient();                    // singletone 객체를 이용한 connection manager

Client client = clientManager.getClient();

AdminClient admin = client.admin();

ClusterAdminClient cluster = admin.cluster();

IndicesAdminClient indices = admin.indices();


IndicesAliasesRequestBuilder aliases = new IndicesAliasesRequestBuilder(indices);

IndicesAliasesResponse response = aliases.addAlias("blog", "aliases_blog2")

.removeAlias("blog",  "aliases_blog1")

.execute()

.actionGet();


log.debug("{}", response);        // slf4j logger


[Filtered Aliases]

curl -XPOST 'http://localhost:9200/_aliases' -d ' { "actions" : [ { "add" : { "index" : "test1", "alias" : "alias2", "filter" : { "term" : { "user" : "kimchy" } } } } ]

}'

- 이미 위에서 언급 했듯이 RDBMS 에서 사용하는 view table 과 비슷한 목적으로 사용이 가능 하다고 이해 하면 쉽다.

: