@@ -126,10 +126,10 @@ private String getAlternative(String key) {
if ("index.fields".equals(key)) {
return "lucence.fulltextFieldList";
}
- if ("index.fields.analyse".equals(key)) {
+ if ("index.fields.analyze".equals(key)) {
return "lucence.indexFieldListAnalyze";
}
- if ("index.fields.noanalyse".equals(key)) {
+ if ("index.fields.noanalyze".equals(key)) {
return "lucence.indexFieldListNoAnalyze";
}
if ("index.fields.store".equals(key)) {
diff --git a/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/index/SchemaService.java b/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/index/SchemaService.java
index 82ea9fa02..3bef15add 100644
--- a/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/index/SchemaService.java
+++ b/imixs-workflow-engine/src/main/java/org/imixs/workflow/engine/index/SchemaService.java
@@ -52,8 +52,8 @@
*
*
*
index.fields - content which will be indexed
- *
index.fields.analyse - fields indexed as analyzed keyword fields
- *
index.fields.noanalyse - fields indexed without analyze
+ *
index.fields.analyze - fields indexed as analyzed keyword fields
+ *
index.fields.noanalyze - fields indexed without analyze
*
index.fields.store - fields stored in the index
*
index.operator - default operator
*
index.splitwhitespace - split text on whitespace prior to analysis
@@ -67,7 +67,7 @@
public class SchemaService {
/*
- * index.fields index.fields.analyse index.fields.noanalyse index.fields.store
+ * index.fields index.fields.analyze index.fields.noanalyze index.fields.store
*
* index.operator index.splitwhitespace
*
@@ -82,11 +82,11 @@ public class SchemaService {
@Inject
@ConfigProperty(name = "index.fields.analyze", defaultValue = "")
- private String indexFieldsAnalyse;
+ private String indexFieldsAnalyze;
@Inject
@ConfigProperty(name = "index.fields.noanalyze", defaultValue = "")
- private String indexFieldsNoAnalyse;
+ private String indexFieldsNoAnalyze;
@Inject
@ConfigProperty(name = "index.fields.store", defaultValue = "")
@@ -96,14 +96,14 @@ public class SchemaService {
private DocumentService documentService;
private List fieldList = null;
- private List fieldListAnalyse = null;
- private List fieldListNoAnalyse = null;
+ private List fieldListAnalyze = null;
+ private List fieldListNoAnalyze = null;
private List fieldListStore = null;
private Set uniqueFieldList = null;
// default field lists
private static List DEFAULT_SEARCH_FIELD_LIST = Arrays.asList("$workflowsummary", "$workflowabstract");
- private static List DEFAULT_NOANALYSE_FIELD_LIST = Arrays.asList("$modelversion", "$taskid", "$processid",
+ private static List DEFAULT_NOANALYZE_FIELD_LIST = Arrays.asList("$modelversion", "$taskid", "$processid",
"$workitemid", "$uniqueidref", "type", "$writeaccess", "$modified", "$created", "namcreator", "$creator",
"$editor", "$lasteditor", "$workflowgroup", "$workflowstatus", "txtworkflowgroup", "name", "txtname",
"$owner", "namowner", "txtworkitemref", "$uniqueidsource", "$uniqueidversions", "$lasttask", "$lastevent",
@@ -124,8 +124,9 @@ public class SchemaService {
void init() {
logger.finest("......lucene FulltextFieldList=" + indexFields);
- logger.finest("......lucene IndexFieldListAnalyse=" + indexFieldsAnalyse);
- logger.finest("......lucene IndexFieldListNoAnalyse=" + indexFieldsNoAnalyse);
+ logger.finest("......lucene IndexFieldListAnalyze=" + indexFieldsAnalyze);
+ logger.finest("......lucene IndexFieldListNoAnalyze=" + indexFieldsNoAnalyze);
+ logger.finest("......lucene IndexFieldListStore=" + indexFieldsStore);
// compute search field list
fieldList = new ArrayList();
@@ -143,30 +144,30 @@ void init() {
}
// compute Index field list (Analyze)
- fieldListAnalyse = new ArrayList();
- if (indexFieldsAnalyse != null && !indexFieldsAnalyse.isEmpty()) {
- StringTokenizer st = new StringTokenizer(indexFieldsAnalyse, ",");
+ fieldListAnalyze = new ArrayList();
+ if (indexFieldsAnalyze != null && !indexFieldsAnalyze.isEmpty()) {
+ StringTokenizer st = new StringTokenizer(indexFieldsAnalyze, ",");
while (st.hasMoreElements()) {
String sName = st.nextToken().toLowerCase().trim();
// do not add internal fields
if (!"$uniqueid".equals(sName) && !"$readaccess".equals(sName)) {
- fieldListAnalyse.add(sName);
+ fieldListAnalyze.add(sName);
}
}
}
// compute Index field list (NoAnalyze)
- fieldListNoAnalyse = new ArrayList();
+ fieldListNoAnalyze = new ArrayList();
// add all static default field list
- fieldListNoAnalyse.addAll(DEFAULT_NOANALYSE_FIELD_LIST);
- if (indexFieldsNoAnalyse != null && !indexFieldsNoAnalyse.isEmpty()) {
+ fieldListNoAnalyze.addAll(DEFAULT_NOANALYZE_FIELD_LIST);
+ if (indexFieldsNoAnalyze != null && !indexFieldsNoAnalyze.isEmpty()) {
// add additional field list from imixs.properties
- StringTokenizer st = new StringTokenizer(indexFieldsNoAnalyse, ",");
+ StringTokenizer st = new StringTokenizer(indexFieldsNoAnalyze, ",");
while (st.hasMoreElements()) {
String sName = st.nextToken().toLowerCase().trim();
- // Issue #560 - avoid duplicates from indexFieldsAnalyse
- if (!fieldListNoAnalyse.contains(sName) && !indexFieldsAnalyse.contains(sName)) {
- fieldListNoAnalyse.add(sName);
+ // Issue #560 - avoid duplicates from indexFieldsAnalyze
+ if (!fieldListNoAnalyze.contains(sName) && !indexFieldsAnalyze.contains(sName)) {
+ fieldListNoAnalyze.add(sName);
}
}
}
@@ -187,13 +188,13 @@ void init() {
// Issue #518:
// if a field of the indexFieldListStore is not part of the
- // fieldListAnalyse add not part of fieldListNoAnalyse , than we add these
- // fields to the indexFieldListAnalyse. This is to guaranty that we store the
+ // fieldListAnalyze add not part of fieldListNoAnalyze , than we add these
+ // fields to the indexFieldListAnalyze. This is to guaranty that we store the
// field value in any case.
for (String fieldName : fieldListStore) {
- if (!fieldListAnalyse.contains(fieldName) && !fieldListNoAnalyse.contains(fieldName)) {
- // add this field into he indexFieldListAnalyse
- fieldListAnalyse.add(fieldName);
+ if (!fieldListAnalyze.contains(fieldName) && !fieldListNoAnalyze.contains(fieldName)) {
+ // add this field into he indexFieldListAnalyze
+ fieldListAnalyze.add(fieldName);
}
}
@@ -202,8 +203,8 @@ void init() {
uniqueFieldList=new HashSet();
uniqueFieldList.add(WorkflowKernel.UNIQUEID);
uniqueFieldList.addAll(fieldListStore);
- uniqueFieldList.addAll(fieldListAnalyse);
- uniqueFieldList.addAll(fieldListNoAnalyse);
+ uniqueFieldList.addAll(fieldListAnalyze);
+ uniqueFieldList.addAll(fieldListNoAnalyze);
}
@@ -224,8 +225,8 @@ public List getFieldList() {
*
* @return
*/
- public List getFieldListAnalyse() {
- return fieldListAnalyse;
+ public List getFieldListAnalyze() {
+ return fieldListAnalyze;
}
/**
@@ -234,8 +235,8 @@ public List getFieldListAnalyse() {
*
* @return
*/
- public List getFieldListNoAnalyse() {
- return fieldListNoAnalyse;
+ public List getFieldListNoAnalyze() {
+ return fieldListNoAnalyze;
}
/**
@@ -265,8 +266,8 @@ public ItemCollection getConfiguration() {
ItemCollection config = new ItemCollection();
config.replaceItemValue("lucence.fulltextFieldList", fieldList);
- config.replaceItemValue("lucence.indexFieldListAnalyze", fieldListAnalyse);
- config.replaceItemValue("lucence.indexFieldListNoAnalyze", fieldListNoAnalyse);
+ config.replaceItemValue("lucence.indexFieldListAnalyze", fieldListAnalyze);
+ config.replaceItemValue("lucence.indexFieldListNoAnalyze", fieldListNoAnalyze);
config.replaceItemValue("lucence.indexFieldListStore", fieldListStore);
return config;
diff --git a/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneIndexService.java b/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneIndexService.java
index d3252502d..33cc7bbbf 100644
--- a/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneIndexService.java
+++ b/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneIndexService.java
@@ -83,7 +83,7 @@ public class LuceneIndexService {
public static final int EVENTLOG_ENTRY_FLUSH_COUNT = 16;
public static final String ANONYMOUS = "ANONYMOUS";
- public static final String DEFAULT_ANALYSER = "org.apache.lucene.analysis.standard.ClassicAnalyzer";
+ public static final String DEFAULT_ANALYZER = "org.apache.lucene.analysis.standard.ClassicAnalyzer";
public static final String DEFAULT_INDEX_DIRECTORY = "imixs-workflow-index";
@PersistenceContext(unitName = "org.imixs.workflow.jpa")
@@ -98,8 +98,8 @@ public class LuceneIndexService {
private String luceneIndexDir;
@Inject
- @ConfigProperty(name = "lucence.analyzerClass", defaultValue = DEFAULT_ANALYSER)
- private String luceneAnalyserClass;
+ @ConfigProperty(name = "lucence.analyzerClass", defaultValue = DEFAULT_ANALYZER)
+ private String luceneAnalyzerClass;
@Inject
@@ -128,13 +128,13 @@ public void setLuceneIndexDir(String luceneIndexDir) {
}
- public String getLuceneAnalyserClass() {
- return luceneAnalyserClass;
+ public String getLuceneAnalyzerClass() {
+ return luceneAnalyzerClass;
}
- public void setLuceneAnalyserClass(String luceneAnalyserClass) {
- this.luceneAnalyserClass = luceneAnalyserClass;
+ public void setLuceneAnalyzerClass(String luceneAnalyzerClass) {
+ this.luceneAnalyzerClass = luceneAnalyzerClass;
}
@@ -419,16 +419,16 @@ protected Document createDocument(ItemCollection aworkitem) {
_localFieldListStore.addAll(schemaService.getFieldListStore());
// analyzed...
- List indexFieldListAnalyse = schemaService.getFieldListAnalyse();
- for (String aFieldname : indexFieldListAnalyse) {
+ List indexFieldListAnalyze = schemaService.getFieldListAnalyze();
+ for (String aFieldname : indexFieldListAnalyze) {
addItemValues(doc, aworkitem, aFieldname, true, _localFieldListStore.contains(aFieldname));
// avoid duplication.....
_localFieldListStore.remove(aFieldname);
}
// ... and not analyzed...
- List indexFieldListNoAnalyse = schemaService.getFieldListNoAnalyse();
- for (String aFieldname : indexFieldListNoAnalyse) {
+ List indexFieldListNoAnalyze = schemaService.getFieldListNoAnalyze();
+ for (String aFieldname : indexFieldListNoAnalyze) {
addItemValues(doc, aworkitem, aFieldname, false, _localFieldListStore.contains(aFieldname));
}
@@ -534,10 +534,10 @@ protected IndexWriter createIndexWriter() throws IOException {
// indexWriterConfig = new IndexWriterConfig(new ClassicAnalyzer());
try {
// issue #429
- indexWriterConfig = new IndexWriterConfig((Analyzer) Class.forName(luceneAnalyserClass).newInstance());
+ indexWriterConfig = new IndexWriterConfig((Analyzer) Class.forName(luceneAnalyzerClass).newInstance());
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
throw new IndexException(IndexException.INVALID_INDEX,
- "Unable to create analyzer '" + luceneAnalyserClass + "'", e);
+ "Unable to create analyzer '" + luceneAnalyzerClass + "'", e);
}
return new IndexWriter(indexDir, indexWriterConfig);
diff --git a/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneSearchService.java b/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneSearchService.java
index b8a9e97e4..809ccfedb 100644
--- a/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneSearchService.java
+++ b/imixs-workflow-index-lucene/src/main/java/org/imixs/workflow/engine/lucene/LuceneSearchService.java
@@ -424,7 +424,7 @@ IndexSearcher createIndexSearcher() throws IOException {
}
/**
- * Returns in instance of a QueyParser based on a KeywordAnalyser. The method
+ * Returns in instance of a QueyParser based on a KeywordAnalyzer. The method
* set the lucene DefaultOperator to 'OR' if not specified otherwise in the
* imixs.properties.
*
diff --git a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java
index 9717cb379..cd924d855 100644
--- a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java
+++ b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java
@@ -318,6 +318,9 @@ public void rebuildIndex() {
* fields. Only if the param 'loadStubs' is false, then only the field
* '$uniqueid' will be returnded by the method. The caller is responsible to
* load the full document from DocumentService.
+ *
+ * Because fieldnames must not contain $ symbols we need to replace those field
+ * names used in a query.
*
*
*
@@ -359,7 +362,8 @@ public String query(String searchTerm, int pageSize, int pageIndex, SortOrder so
}
}
- // page size of 0 is allowed here - this will be used by the getTotalHits method of the SolrSearchService
+ // page size of 0 is allowed here - this will be used by the getTotalHits method
+ // of the SolrSearchService
if (pageSize < 0) {
pageSize = DEFAULT_PAGE_SIZE;
}
@@ -393,6 +397,48 @@ public String query(String searchTerm, int pageSize, int pageIndex, SortOrder so
}
+ /**
+ * This method adapts an Solr field name to the corresponding Imixs Item name.
+ * Because Solr does not accept $ char at the beginning of an field we need to
+ * replace starting _ with $ if the item is part of the Imixs Index Schema.
+ *
+ * @param itemName
+ * @return adapted Imixs item name
+ */
+ public String adaptSolrFieldName(String itemName) {
+ if (itemName == null || itemName.isEmpty() || schemaService == null) {
+ return itemName;
+ }
+ if (itemName.charAt(0) == '_') {
+ String adaptedName = "$" + itemName.substring(1);
+ if (schemaService.getUniqueFieldList().contains(adaptedName)) {
+ return adaptedName;
+ }
+ }
+ return itemName;
+ }
+
+ /**
+ * This method adapts an Imixs item name to the corresponding Solr field name.
+ * Because Solr does not accept $ char at the beginning of an field we need to
+ * replace starting $ with _ if the item is part of the Imixs Index Schema.
+ *
+ * @param itemName
+ * @return adapted Solr field name
+ */
+ public String adaptImixsItemName(String itemName) {
+ if (itemName == null || itemName.isEmpty() || schemaService == null) {
+ return itemName;
+ }
+ if (itemName.charAt(0) == '$') {
+ if (schemaService.getUniqueFieldList().contains(itemName)) {
+ String adaptedName = "_" + itemName.substring(1);
+ return adaptedName;
+ }
+ }
+ return itemName;
+ }
+
/**
* This method builds a JSON structure to be used to update an existing Solr
* schema. The method adds or replaces field definitions into a solr update
@@ -435,8 +481,8 @@ protected String buildUpdateSchema(String oldSchema) {
StringBuffer updateSchema = new StringBuffer();
List fieldListStore = schemaService.getFieldListStore();
- List fieldListAnalyse = schemaService.getFieldListAnalyse();
- List fieldListNoAnalyse = schemaService.getFieldListNoAnalyse();
+ List fieldListAnalyze = schemaService.getFieldListAnalyze();
+ List fieldListNoAnalyze = schemaService.getFieldListNoAnalyze();
// remove white space from oldSchema to simplify string compare...
oldSchema = oldSchema.replace(" ", "");
@@ -447,15 +493,15 @@ protected String buildUpdateSchema(String oldSchema) {
// finally add the default content field
addFieldDefinitionToUpdateSchema(updateSchema, oldSchema, DEFAULT_SEARCH_FIELD, "text_general", false, false);
- // add each field from the fieldListAnalyse
- for (String field : fieldListAnalyse) {
+ // add each field from the fieldListAnalyze
+ for (String field : fieldListAnalyze) {
boolean store = fieldListStore.contains(field);
// text_general - docValues are not supported!
addFieldDefinitionToUpdateSchema(updateSchema, oldSchema, field, "text_general", store, false);
}
- // add each field from the fieldListNoAnalyse
- for (String field : fieldListNoAnalyse) {
+ // add each field from the fieldListNoAnalyze
+ for (String field : fieldListNoAnalyze) {
boolean store = fieldListStore.contains(field);
// strings - docValues are supported so set it independently from the store flag
// to true. This is to increase sort and grouping performance
@@ -482,8 +528,8 @@ protected String buildUpdateSchema(String oldSchema) {
protected String buildAddDoc(List documents) {
List fieldList = schemaService.getFieldList();
- List fieldListAnalyse = schemaService.getFieldListAnalyse();
- List fieldListNoAnalyse = schemaService.getFieldListNoAnalyse();
+ List fieldListAnalyze = schemaService.getFieldListAnalyze();
+ List fieldListNoAnalyze = schemaService.getFieldListNoAnalyze();
SimpleDateFormat dateformat = new SimpleDateFormat("yyyyMMddHHmmss");
StringBuffer xmlContent = new StringBuffer();
@@ -491,15 +537,14 @@ protected String buildAddDoc(List documents) {
xmlContent.append("");
for (ItemCollection document : documents) {
-
+
// if no UniqueID is defined we need to skip this document
if (document.getUniqueID().isEmpty()) {
continue;
}
-
+
xmlContent.append("");
-
xmlContent.append("" + document.getUniqueID() + "");
// add all content fields defined in the schema
@@ -544,11 +589,11 @@ protected String buildAddDoc(List documents) {
xmlContent.append("");
// now add all analyzed fields...
- for (String aFieldname : fieldListAnalyse) {
+ for (String aFieldname : fieldListAnalyze) {
addFieldValuesToUpdateRequest(xmlContent, document, aFieldname);
}
// now add all notanalyzed fields...
- for (String aFieldname : fieldListNoAnalyse) {
+ for (String aFieldname : fieldListNoAnalyze) {
addFieldValuesToUpdateRequest(xmlContent, document, aFieldname);
}
@@ -578,6 +623,9 @@ protected String buildAddDoc(List documents) {
*
* To verify the existence of the field we parse the fieldname in the old schema
* definition.
+ *
+ * Note: In Solr field names must not start with $ symbol. For that reason we
+ * adapt the $ with _ for all known index fields
*
* @param updateSchema
* - a stringBuffer to build the update schema
@@ -593,8 +641,11 @@ protected String buildAddDoc(List documents) {
* - true if docValues should be set to true
*
*/
- private void addFieldDefinitionToUpdateSchema(StringBuffer updateSchema, String oldSchema, String name, String type,
- boolean store, boolean docvalue) {
+ private void addFieldDefinitionToUpdateSchema(StringBuffer updateSchema, String oldSchema, String _name,
+ String type, boolean store, boolean docvalue) {
+
+ // replace $ with _
+ String name = adaptImixsItemName(_name);
String fieldDefinition = "{\"name\":\"" + name + "\",\"type\":\"" + type + "\",\"stored\":" + store
+ ",\"docValues\":" + docvalue + "}";
@@ -671,7 +722,7 @@ private void addFieldValuesToUpdateRequest(StringBuffer xmlContent, final ItemCo
// wrapp value into CDATA
convertedValue = "";
- xmlContent.append("" + convertedValue + "");
+ xmlContent.append("" + convertedValue + "");
}
}
diff --git a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrSearchService.java b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrSearchService.java
index 9c0090649..99109455b 100644
--- a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrSearchService.java
+++ b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrSearchService.java
@@ -89,7 +89,7 @@ public class SolrSearchService implements SearchService {
private static Logger logger = Logger.getLogger(SolrSearchService.class.getName());
- private SimpleDateFormat luceneDateFormat=new SimpleDateFormat("yyyyMMddHHmmss");
+ private SimpleDateFormat luceneDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
/**
* Returns a collection of documents matching the provided search term. The term
@@ -122,9 +122,8 @@ public class SolrSearchService implements SearchService {
* in case the searchtem is not understandable.
*/
@Override
- public List search(String searchTerm, int pageSize, int pageIndex,
- SortOrder sortOrder, DefaultOperator defaultOperator, boolean loadStubs)
- throws QueryException {
+ public List search(String _searchTerm, int pageSize, int pageIndex, SortOrder sortOrder,
+ DefaultOperator defaultOperator, boolean loadStubs) throws QueryException {
long ltime = System.currentTimeMillis();
@@ -140,14 +139,14 @@ public List search(String searchTerm, int pageSize, int pageInde
ArrayList workitems = new ArrayList();
- searchTerm = schemaService.getExtendedSearchTerm(searchTerm);
+ String searchTerm = adaptSearchTerm(_searchTerm);
// test if searchtem is provided
if (searchTerm == null || "".equals(searchTerm)) {
return workitems;
}
// post query....
- String result = solarIndexService.query(searchTerm, pageSize, pageIndex,sortOrder,defaultOperator, loadStubs);
+ String result = solarIndexService.query(searchTerm, pageSize, pageIndex, sortOrder, defaultOperator, loadStubs);
logger.finest("......Result = " + result);
if (result != null && !result.isEmpty()) {
@@ -178,8 +177,8 @@ public List search(String searchTerm, int pageSize, int pageInde
* a users roles to test the read access level of each workitem matching the
* search term.
*
- * In Solr we can get the count if we the the query param 'row=0'.
- * The the response contains still the numFound but not docs!
+ * In Solr we can get the count if we the the query param 'row=0'. The the
+ * response contains still the numFound but not docs!
*
*
* @param sSearchTerm
@@ -192,30 +191,26 @@ public List search(String searchTerm, int pageSize, int pageInde
@Override
public int getTotalHits(final String _searchTerm, final int _maxResult, final DefaultOperator defaultOperator)
throws QueryException {
- long l=System.currentTimeMillis();
- int hits=0;
-// if (_maxResult!=0) {
-// logger.severe("getTotalHits should be called with maxResult==0");
-// return 0;
-// }
-
- String searchTerm = schemaService.getExtendedSearchTerm(_searchTerm);
+ long l = System.currentTimeMillis();
+ int hits = 0;
+
+ String searchTerm=adaptSearchTerm(_searchTerm);
// test if searchtem is provided
if (searchTerm == null || "".equals(searchTerm)) {
return 0;
}
- // post query with row = 0
- String result = solarIndexService.query(searchTerm, 0, 0,null,defaultOperator, true);
+ // post query with row = 0
+ String result = solarIndexService.query(searchTerm, 0, 0, null, defaultOperator, true);
try {
- String response=JSONParser.getKey("response", result);
- hits=Integer.parseInt(JSONParser.getKey("numFound", response));
+ String response = JSONParser.getKey("response", result);
+ hits = Integer.parseInt(JSONParser.getKey("numFound", response));
} catch (NumberFormatException e) {
logger.severe("getTotalHits - failed to parse solr result object! - " + e.getMessage());
- hits=0;
+ hits = 0;
}
-
- logger.info("......computed totalHits in " +(System.currentTimeMillis()-l) + "ms");
+
+ logger.info("......computed totalHits in " + (System.currentTimeMillis() - l) + "ms");
return hits;
}
@@ -289,7 +284,7 @@ private ItemCollection parseDoc(JsonParser parser) {
logger.finest("......found item " + itemName);
List> itemValue = parseItem(parser);
// convert itemName and value....
- itemName = adaptItemName(itemName);
+ itemName = solarIndexService.adaptSolrFieldName(itemName);
document.replaceItemValue(itemName, itemValue);
event = parser.next();
}
@@ -304,7 +299,7 @@ private ItemCollection parseDoc(JsonParser parser) {
* @return
*/
private List