Class ProjectFacetsIndexLuceneUtils
java.lang.Object
it.uniroma2.art.semanticturkey.settings.facets.ProjectFacetsIndexLuceneUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static void
createFacetIndexAPI
(ProjectInfo projectInfo) static void
createFacetIndexAPI
(List<ProjectInfo> projectInfoList) static org.apache.lucene.index.IndexReader
static void
static void
static FacetsResultStruct
getAllFacets
(boolean excludeProjNameAndProjDesc) static String
static Optional<org.apache.lucene.document.Document>
getDocumentForProject
(String name) static String
getFacetValueFromProjectInfoForBagResults
(ProjectInfo projectInfo, String facetName) static File
static File
static ProjectsResult
static File
static boolean
static boolean
static boolean
static String
normalizeFacetValue
(Object value) static void
removeProjectFromIndex
(String projectName) static ProjectsAndFacetsResult
static boolean
check if the Notification Indexes can be upgraded to the current version of Lucene
-
Field Details
-
MAX_RESULT_QUERY_FACETS
public static final int MAX_RESULT_QUERY_FACETS- See Also:
-
MAX_RESULT_QUERY_PROJECTS
public static final int MAX_RESULT_QUERY_PROJECTS- See Also:
-
indexMainDir
- See Also:
-
lucIndexDirName
- See Also:
-
lucTaxoDirName
- See Also:
-
PROJECT_NAME
- See Also:
-
PROJECT_MODEL
- See Also:
-
PROJECT_LEX_MODEL
- See Also:
-
PROJECT_HISTORY
- See Also:
-
PROJECT_VALIDATION
- See Also:
-
PROJECT_DESCRIPTION
- See Also:
-
-
Constructor Details
-
ProjectFacetsIndexLuceneUtils
public ProjectFacetsIndexLuceneUtils()
-
-
Method Details
-
areLuceneDirsPresent
public static boolean areLuceneDirsPresent() -
isGlobalContentLuceneDirPresent
public static boolean isGlobalContentLuceneDirPresent() -
isNotificationPrefIndexDirPresent
public static boolean isNotificationPrefIndexDirPresent() -
isUserNotificationIndexPresent
public static boolean isUserNotificationIndexPresent() -
createFacetIndexAPI
public static void createFacetIndexAPI(List<ProjectInfo> projectInfoList) throws IOException, ProjectAccessException, InvalidProjectNameException -
createFacetIndexAPI
public static void createFacetIndexAPI(ProjectInfo projectInfo) throws IOException, ProjectAccessException, InvalidProjectNameException -
removeProjectFromIndex
- Throws:
IOException
-
deleteFacetIndexesFolders
public static void deleteFacetIndexesFolders() -
deleteGlobalSearchIndexFolder
public static void deleteGlobalSearchIndexFolder() -
upgradeOrDeleteNotificationIndexes
public static boolean upgradeOrDeleteNotificationIndexes()check if the Notification Indexes can be upgraded to the current version of Lucene- Returns:
- true if the upgrade was possible, false if it was not possible and so they were just deleted
-
getCurrentLuceneVersionNotificationIndex
- Throws:
IOException
-
getAllFacets
public static FacetsResultStruct getAllFacets(boolean excludeProjNameAndProjDesc) throws IOException - Throws:
IOException
-
getProjectListFromIndex
- Throws:
IOException
-
search
public static ProjectsAndFacetsResult search(Map<String, List<String>> facetToValueListMap) throws IOException- Throws:
IOException
-
getDocumentForProject
public static Optional<org.apache.lucene.document.Document> getDocumentForProject(String name) throws IOException - Throws:
IOException
-
normalizeFacetValue
-
getLuceneGlobalAccessDir
-
getNotificationPrefIndexDir
-
getUserNotificationIndexDir
-
createIndexReaderPublic
- Throws:
IOException
-
getFacetValueFromProjectInfoForBagResults
public static String getFacetValueFromProjectInfoForBagResults(ProjectInfo projectInfo, String facetName)
-