org.elasticsearch.search.lookup
Class SourceLookup

java.lang.Object
  extended by org.elasticsearch.search.lookup.SourceLookup
All Implemented Interfaces:
Map

public class SourceLookup
extends Object
implements Map


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
SourceLookup()
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 List<Object> extractRawValues(String path)
          Returns the values associated with the path.
 Object extractValue(String path)
           
 Object filter(String[] includes, String[] excludes)
           
 Object get(Object key)
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map m)
           
 Object remove(Object key)
           
 void setNextDocId(int docId)
           
 void setNextReader(org.apache.lucene.index.IndexReader reader)
           
 void setNextSource(BytesReference source)
           
 void setNextSource(Map<String,Object> source)
           
 int size()
           
 Map<String,Object> source()
           
static Map<String,Object> sourceAsMap(byte[] bytes, int offset, int length)
           
static Map<String,Object> sourceAsMap(BytesReference source)
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

SourceLookup

public SourceLookup()
Method Detail

source

public Map<String,Object> source()

sourceAsMap

public static Map<String,Object> sourceAsMap(BytesReference source)
                                      throws ElasticSearchParseException
Throws:
ElasticSearchParseException

sourceAsMap

public static Map<String,Object> sourceAsMap(byte[] bytes,
                                             int offset,
                                             int length)
                                      throws ElasticSearchParseException
Throws:
ElasticSearchParseException

setNextReader

public void setNextReader(org.apache.lucene.index.IndexReader reader)

setNextDocId

public void setNextDocId(int docId)

setNextSource

public void setNextSource(BytesReference source)

setNextSource

public void setNextSource(Map<String,Object> source)

extractRawValues

public List<Object> extractRawValues(String path)
Returns the values associated with the path. Those are "low" level values, and it can handle path expression where an array/list is navigated within.


filter

public Object filter(String[] includes,
                     String[] excludes)

extractValue

public Object extractValue(String path)

get

public Object get(Object key)
Specified by:
get in interface Map

size

public int size()
Specified by:
size in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

values

public Collection values()
Specified by:
values in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

putAll

public void putAll(Map m)
Specified by:
putAll in interface Map

clear

public void clear()
Specified by:
clear in interface Map


Copyright © 2009-2012. All Rights Reserved.