List<Object> headers = new ArrayList<Object>();
Map<String, Field> fieldsMapping = new HashMap<String, Field>();
Structure st = null;
if(!"_all".equals(structureInode)){
st = StructureCache.getStructureByInode(structureInode);
WorkflowScheme wfScheme = APILocator.getWorkflowAPI().findSchemeForStruct(st);
lastSearchMap.put("structure", st);
luceneQuery.append("+structureName:" + st.getVelocityVarName() + " ");
}
else {
for(int i=0;i<fields.size();i++){
String x = fields.get(i);
if("_all".equals(x)){
String next = fields.get(i+1);
next = next.replaceAll("\\*", "");
while(next.contains(" ")){
next = next.replace(" ", " ");
}
String y[] = next.split(" ");
for(int j=0;j<y.length;j++){
y[j] = y[j].replaceAll(specialCharsToEscape, "\\\\$1");
luceneQuery.append("title:" + y[j] + "* ");
}
break;
}
}
luceneQuery.append("-structureName:Host ");
luceneQuery.append("-structureType:3 ");
}
WorkflowScheme wfScheme = APILocator.getWorkflowAPI().findSchemeForStruct(st);
// Stores (database name,type description) pairs to catch certain field types.
List<Field> targetFields = new ArrayList<Field>();
if(st!=null){
targetFields = FieldsCache.getFieldsByStructureInode(st.getInode());