org.nuiton.wikitty.storage.solr
Class SolrUtil
java.lang.Object
org.nuiton.wikitty.storage.solr.SolrUtil
public class SolrUtil
- extends Object
- Version:
- $Revision: 650 $
Last update: $Date: 2010-12-23 12:44:57 +0100 (jeu., 23 déc. 2010) $
by : $Author: sletellier $
- Author:
- poussin
|
Method Summary |
static org.apache.solr.common.SolrInputDocument |
copySolrDocument(org.apache.solr.common.SolrDocument source,
boolean include,
String... fields)
copy all field of source in new document. |
static org.apache.solr.common.SolrDocument |
findById(org.apache.solr.client.solrj.SolrServer solrServer,
String id)
Find solr document by id |
static String |
getSolrFieldName(String fqfieldName,
FieldType.TYPE type)
if you change this method, change
TypeFieldModifer#convertToField(org.nuiton.wikitty.services.WikittyTransaction, java.lang.String)
too |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SolrUtil
public SolrUtil()
findById
public static org.apache.solr.common.SolrDocument findById(org.apache.solr.client.solrj.SolrServer solrServer,
String id)
- Find solr document by id
getSolrFieldName
public static String getSolrFieldName(String fqfieldName,
FieldType.TYPE type)
- if you change this method, change
TypeFieldModifer#convertToField(org.nuiton.wikitty.services.WikittyTransaction, java.lang.String)
too
- Parameters:
fqfieldName - type -
- Returns:
copySolrDocument
public static org.apache.solr.common.SolrInputDocument copySolrDocument(org.apache.solr.common.SolrDocument source,
boolean include,
String... fields)
- copy all field of source in new document.
If include is true copy only field specified in fields
if include is false copy all field except field in fields.
example:
if doc contains field: abc, aabbcc, aaabbbccc, toto
copySolrDocument(doc, true, "aa.*", ".*bbb.*")
field copied are: aabbcc, aaabbbccc
copySolrDocument(doc, false, "aa.*", ".*bbb.*")
field copied are: abc, toto
- Parameters:
source - include - fields -
- Returns:
Copyright © 2009-2010 CodeLutin. All Rights Reserved.