Class IndexSearcher


  • @Technical
    @Bean
    @Singleton
    public class IndexSearcher
    extends Object
    The IndexSearcher class implements search over all the indexes. A IndexSearcher manages a set of cached lucene IndexSearcher.
    • Method Detail

      • getDefaultOperator

        public org.apache.lucene.queryparser.classic.QueryParser.Operator getDefaultOperator()
      • search

        public MatchingIndexEntry search​(String component,
                                         String objectId,
                                         String objectType)
                                  throws ParseException
        Searches the Lucene index for a specific object, by giving the PK of the index entry
        Parameters:
        component -
        objectId -
        objectType -
        Returns:
        MatchingIndexEntry wrapping the result, else null
        Throws:
        ParseException
      • search

        public MatchingIndexEntry[] search​(QueryDescription query)
                                    throws ParseException
        Search the documents of the given component's set. All entries found whose startDate is not reached or whose endDate is passed are pruned from the results set.
        Parameters:
        query - the query.
        Returns:
        an array of index entries.
        Throws:
        ParseException - on parse error