public class SolrStore<K,T extends org.apache.gora.persistency.impl.PersistentBase>
extends org.apache.gora.store.impl.DataStoreBase<K,T>
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_BATCH_SIZE
The default batch size (ArrayList) of SolrDocuments to be used in the event of an absent
value for
solr.batchSize. |
protected static int |
DEFAULT_COMMIT_WITHIN
The default commit size of SolrDocuments to be used in the event of an absent
value for
solr.commitSize. |
protected static String |
DEFAULT_MAPPING_FILE
The default file name value to be used for obtaining the Solr object field mapping's
|
protected static int |
DEFAULT_RESULTS_SIZE
The default results size of SolrDocuments to be used in the event of an absent
value for
solr.resultsSize. |
static int |
DEFAULT_UNION_SCHEMA
Default schema index with value "0" used when AVRO Union data types are
stored
|
static ConcurrentHashMap<String,org.apache.avro.specific.SpecificDatumReader<?>> |
readerMap |
protected static String |
SOLR_BATCH_SIZE_PROPERTY
A batch size unit (ArrayList) of SolrDocument's to be used for writing to Solr.
|
protected static String |
SOLR_COMMIT_WITHIN_PROPERTY
A batch commit unit for SolrDocument's used when making (commit) calls to Solr.
|
protected static String |
SOLR_CONFIG_PROPERTY
The
solrconfig.xml file to be used - defined in gora.properties |
protected static String |
SOLR_RESULTS_SIZE_PROPERTY
The maximum number of result to return when we make a call to
execute(Query). |
protected static String |
SOLR_SCHEMA_PROPERTY
The
schema.xml file to be used - defined in gora.properties |
protected static String |
SOLR_SERVER_PASSWORD
Solr client password.
|
protected static String |
SOLR_SERVER_USER_AUTH
Whether to use secured Solr client or not.
|
protected static String |
SOLR_SERVER_USERNAME
Solr client username.
|
protected static String |
SOLR_SOLRJSERVER_IMPL
The solrj implementation to use.
|
protected static String |
SOLR_URL_PROPERTY
The URL of the Solr server - defined in
gora.properties |
static ConcurrentHashMap<String,org.apache.avro.specific.SpecificDatumWriter<?>> |
writerMap |
| Constructor and Description |
|---|
SolrStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createSchema() |
boolean |
delete(K key) |
long |
deleteByQuery(org.apache.gora.query.Query<K,T> query) |
void |
deleteSchema() |
static String |
escapeQueryKey(String key) |
org.apache.gora.query.Result<K,T> |
execute(org.apache.gora.query.Query<K,T> query) |
void |
flush() |
T |
get(K key,
String[] fields) |
SolrMapping |
getMapping() |
List<org.apache.gora.query.PartitionQuery<K,T>> |
getPartitions(org.apache.gora.query.Query<K,T> query) |
String |
getSchemaName() |
void |
initialize(Class<K> keyClass,
Class<T> persistentClass,
Properties properties) |
T |
newInstance(org.apache.solr.common.SolrDocument doc,
String[] fields) |
org.apache.gora.query.Query<K,T> |
newQuery() |
void |
put(K key,
T persistent) |
boolean |
schemaExists() |
void |
truncateSchema() |
equals, get, getBeanFactory, getConf, getFields, getFieldsToQuery, getKeyClass, getOrCreateConf, getPersistentClass, getSchemaName, newKey, newPersistent, readFields, setBeanFactory, setConf, setKeyClass, setPersistentClass, writeprotected static final String DEFAULT_MAPPING_FILE
protected static final String SOLR_URL_PROPERTY
gora.propertiesprotected static final String SOLR_CONFIG_PROPERTY
solrconfig.xml file to be used - defined in gora.propertiesprotected static final String SOLR_SCHEMA_PROPERTY
schema.xml file to be used - defined in gora.propertiesprotected static final String SOLR_BATCH_SIZE_PROPERTY
gora.properties.
A default value of 100 is used if this value is absent. This value must be of type Integer.protected static final String SOLR_SOLRJSERVER_IMPL
gora.properties
This value must be of type String.protected static final String SOLR_SERVER_USER_AUTH
gora.properties
This value must be of type boolean.protected static final String SOLR_SERVER_USERNAME
gora.properties
This value must be of type String.protected static final String SOLR_SERVER_PASSWORD
gora.properties
This value must be of type String.protected static final String SOLR_COMMIT_WITHIN_PROPERTY
gora.properties.
A default value of 1000 is used if this value is absent. This value must be of type Integer.protected static final String SOLR_RESULTS_SIZE_PROPERTY
execute(Query). This should be
defined in gora.properties. This value must be of type Integer.protected static final int DEFAULT_BATCH_SIZE
solr.batchSize.
Set to 100 by default.protected static final int DEFAULT_COMMIT_WITHIN
solr.commitSize.
Set to 1000 by default.protected static final int DEFAULT_RESULTS_SIZE
solr.resultsSize.
Set to 100 by default.public static final int DEFAULT_UNION_SCHEMA
public static final ConcurrentHashMap<String,org.apache.avro.specific.SpecificDatumReader<?>> readerMap
public static final ConcurrentHashMap<String,org.apache.avro.specific.SpecificDatumWriter<?>> writerMap
public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties)
public SolrMapping getMapping()
public String getSchemaName()
public void createSchema()
public void truncateSchema()
public void deleteSchema()
public boolean schemaExists()
public T newInstance(org.apache.solr.common.SolrDocument doc, String[] fields) throws IOException
IOExceptionpublic boolean delete(K key)
public List<org.apache.gora.query.PartitionQuery<K,T>> getPartitions(org.apache.gora.query.Query<K,T> query) throws IOException
IOExceptionpublic void flush()
public void close()
Copyright © 2010-2015 The Apache Software Foundation. All Rights Reserved.