|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nuiton.wikitty.storage.solr.WikittySearchEngineSolr
public class WikittySearchEngineSolr
| Field Summary | |
|---|---|
protected FieldModifier |
fieldModifier
Field modifier use to transform to solr format |
protected SolrResource |
solrResource
JTA resource |
protected org.apache.solr.client.solrj.SolrServer |
solrServer
solr server |
| Constructor Summary | |
|---|---|
WikittySearchEngineSolr(org.nuiton.util.ApplicationConfig config,
WikittyExtensionStorage extensionStorage)
Init wikitty search engine on solr embedded server. |
|
| Method Summary | |
|---|---|
protected void |
addToIndexDocument(org.apache.solr.common.SolrInputDocument doc,
FieldType.TYPE type,
String fqfieldName,
Object fieldValue,
boolean collection)
Ajoute un champs dans un document a indexer |
protected void |
addToIndexDocument(org.apache.solr.common.SolrInputDocument doc,
Wikitty w,
String fqfieldName)
modify one field in SolrInputDocument |
protected void |
addTreeIndexField(SolrResource solrResource,
Map<String,org.apache.solr.common.SolrDocument> tree,
AttachmentInTree attachmentInTree)
Update attached extra field on all objects passed in argument allAttachmentToIndex |
protected void |
addTreeIndexField(SolrResource solrResource,
org.apache.solr.common.SolrInputDocument doc,
Map<String,org.apache.solr.common.SolrDocument> tree)
Modifie/Ajoute les champs specifique a l'indexation des arbres sur les TreeNode. |
void |
clear(WikittyTransaction transaction)
|
protected org.apache.solr.common.SolrInputDocument |
createIndexDocument(Wikitty w)
Create all index document to used to modify indexation. |
void |
delete(WikittyTransaction transaction,
Collection<String> ids)
Plusieurs actions possibles en fontion du type d'objet: suppression d'un objet NON noeud suppression de cet objets suppression de cet objets dans les attachments des noeuds qui le contiennent suppression d'un noeud d'arbre suppression du noeud reindexation des noeuds qui le contenait comme parent suppression des attached sur les objets contenus dans les attachments de ce noeud reindexation des objets qui le contenait comme parent dans un champs attached |
PagedResult<String> |
findAllByCriteria(WikittyTransaction transaction,
Criteria criteria)
|
TreeNodeResult<String> |
findAllChildrenCount(WikittyTransaction transaction,
String wikittyId,
int depth,
boolean count,
Criteria filter)
Si l'argument n'est pas un TreeNode, une exception est levee |
void |
store(WikittyTransaction transaction,
Collection<Wikitty> wikitties,
boolean force)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.solr.client.solrj.SolrServer solrServer
protected FieldModifier fieldModifier
protected SolrResource solrResource
| Constructor Detail |
|---|
public WikittySearchEngineSolr(org.nuiton.util.ApplicationConfig config,
WikittyExtensionStorage extensionStorage)
extensionStorage - extension storageconfig - app config (can be null)| Method Detail |
|---|
public void clear(WikittyTransaction transaction)
clear in interface WikittySearchEngine
public void store(WikittyTransaction transaction,
Collection<Wikitty> wikitties,
boolean force)
store in interface WikittySearchEngine
public void delete(WikittyTransaction transaction,
Collection<String> ids)
throws WikittyException
delete in interface WikittySearchEnginetransaction - wikitty transactionids - to deletes
WikittyException
protected void addTreeIndexField(SolrResource solrResource,
org.apache.solr.common.SolrInputDocument doc,
Map<String,org.apache.solr.common.SolrDocument> tree)
SolrResource il ne
peut etre que dans deux etats. Soit il a ete reindexe pour les arbres
et il a les champs d'indexation arbre. Soit il a pas encore ete reindexe
pour les arbres et dans ce cas il ne doit pas avoir les champs d'indexation
d'arbre. (il est donc interdit d'avoir des champs d'indexation arbre
obsolete si le document est dans SolrResource)
solrResource - solR resourcedoc - les documents representant le TreeNodetree - tous les autres noeuds d'arbre dont on pourrait avoir
besoin pour l'indexation
protected void addTreeIndexField(SolrResource solrResource,
Map<String,org.apache.solr.common.SolrDocument> tree,
AttachmentInTree attachmentInTree)
solrResource - must contains reindexed TreeNode, that contains attachmenttree - solr document for some TreeNode (used when TreeNode not find in solrResource)attachmentInTree - attachment added and removed from TreeNode
public PagedResult<String> findAllByCriteria(WikittyTransaction transaction,
Criteria criteria)
findAllByCriteria in interface WikittySearchEngine
public TreeNodeResult<String> findAllChildrenCount(WikittyTransaction transaction,
String wikittyId,
int depth,
boolean count,
Criteria filter)
findAllChildrenCount in interface WikittySearchEnginetransaction - wikitty transactionwikittyId - l'objet root du resultatdepth - profondeur souhaite pour la recherche des filscount - vrai si l'on souhaite avoir le nombre d'attachment associe
au noeud retournefilter - filtre utilise pour compter le nombre d'attachment
protected void addToIndexDocument(org.apache.solr.common.SolrInputDocument doc,
FieldType.TYPE type,
String fqfieldName,
Object fieldValue,
boolean collection)
protected void addToIndexDocument(org.apache.solr.common.SolrInputDocument doc,
Wikitty w,
String fqfieldName)
doc - SolrInputDocument to modifyw - wikitty used to find field valuefqfieldName - field to indexprotected org.apache.solr.common.SolrInputDocument createIndexDocument(Wikitty w)
w - all wikitties object to index
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||