1 13 18 package org.jahia.services.search; 19 20 21 import org.jahia.data.fields.JahiaField; 22 import org.jahia.data.search.JahiaSearchResult; 23 import org.jahia.exceptions.JahiaException; 24 import org.jahia.params.ParamBean; 25 import org.jahia.services.JahiaService; 26 import org.jahia.services.fields.ContentField; 27 28 import java.util.ArrayList ; 29 import java.io.IOException ; 30 31 import org.jahia.utils.fileparsers.FileExtractor; 32 import org.apache.lucene.index.IndexReader; 33 34 40 public abstract class JahiaSearchService extends JahiaService { 41 42 48 public abstract void addToSearchEngine (JahiaIndexableDocument indObj); 49 50 55 public abstract void addScheduledDocumentToSearchEngine(JahiaIndexableDocument indObj); 56 57 63 public abstract void removeFromSearchEngine (JahiaIndexableDocument indObj); 64 65 73 public abstract void removeFromSearchEngine (int siteId, 74 String keyFieldValue); 75 76 84 public abstract void removeFromSearchEngine (int siteId, 85 String keyFieldName, 86 String keyFieldValue); 87 88 96 public abstract JahiaSearchResult search (JahiaSearcher jSearcher, ParamBean jParams) 97 throws JahiaException; 98 99 112 public abstract JahiaSearchResult doSearch (String queryString, 113 ParamBean jParams, 114 ArrayList languageCodes) 115 throws JahiaException; 116 117 125 public abstract void indexField (int fieldID, 126 boolean stagingOnly, 127 ParamBean jParams); 128 129 138 public abstract void indexField (int fieldID, 139 boolean stagingOnly, 140 ParamBean jParams, boolean allowInMemoryIndex); 141 142 151 public abstract void addFieldToSearchEngine (JahiaField aField, int workflowState); 152 153 163 public abstract void addFieldToSearchEngine (JahiaField aField, 164 int workflowState, 165 boolean allowInMemoryIndex); 166 167 173 public abstract void removeFieldFromSearchEngine (JahiaField aField); 174 175 181 public abstract void removeFieldFromSearchEngine (ContentField contentField); 182 183 193 public abstract void removeFieldFromSearchEngine (int siteId, 194 int fieldId, 195 int workflowState, 196 String languageCode); 197 198 205 public abstract SiteIndexationStatus getSiteIndexationStatus (int siteID); 206 207 212 public abstract void updateSiteIndexationStatus(SiteIndexationStatus status); 213 214 224 public abstract boolean indexSite (int siteID, 225 ParamBean jParams, 226 boolean deleteIndexFirst, 227 boolean abortPreviousJob); 228 229 230 237 public abstract boolean abortSiteIndexation (int siteID); 238 239 247 public abstract boolean optimizeIndex (int siteID); 248 249 257 public abstract String getSiteIndex (int siteID) throws JahiaException; 258 259 265 public abstract String getSearchIndexRootDir () throws JahiaException; 266 267 274 public abstract FileExtractor getFileExtractor(String contentType) 275 throws JahiaException; 276 277 278 283 public abstract int getNbOfFilesInQueue(); 284 285 290 public abstract int getNbDocumentsInQueue(); 291 292 295 public abstract void notifyMainIndexThread(); 296 297 public abstract RAMIndexer getRAMIndexer(); 298 299 308 public abstract IndexReader getIndexReader (int siteID) 309 throws IOException , JahiaException; 310 311 } 312 | Popular Tags |