Class LuceneTemplate

All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, LuceneOperations
Direct Known Subclasses:
ProjectingLuceneAccessor

public class LuceneTemplate extends LuceneAccessorSupport implements LuceneOperations
Deprecated.
To be removed in GemFire 10 integration
LuceneTemplate is a Lucene data access operations class encapsulating functionality for performing Lucene queries and other Lucene data access operations.
Since:
1.1.0
See Also:
  • Constructor Details

    • LuceneTemplate

      public LuceneTemplate()
      Deprecated.
      Constructs an uninitialized instance of LuceneTemplate.
    • LuceneTemplate

      public LuceneTemplate(org.apache.geode.cache.lucene.LuceneIndex luceneIndex)
      Deprecated.
      Constructs an instance of LuceneTemplate initialized with the given LuceneIndex.
      Parameters:
      luceneIndex - LuceneIndex used in Lucene queries.
      See Also:
      • LuceneIndex
    • LuceneTemplate

      public LuceneTemplate(String indexName, org.apache.geode.cache.Region<?,?> region)
      Deprecated.
      Constructs an instance of LuceneTemplate initialized with the given Lucene index name and Region.
      Parameters:
      indexName - String containing the name of the LuceneIndex.
      region - Region on which the Lucene query is executed.
      See Also:
      • Region
    • LuceneTemplate

      public LuceneTemplate(String indexName, String regionPath)
      Deprecated.
      Constructs an instance of LuceneTemplate initialized with the given Lucene index name and fully-qualified Region path.
      Parameters:
      indexName - String containing the name of the LuceneIndex.
      regionPath - String containing the fully-qualified path of the Region.
  • Method Details

    • query

      public <K, V> List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> query(String query, String defaultField, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query with a limit on the number of results returned.
      Specified by:
      query in interface LuceneOperations
      Overrides:
      query in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      V - Class type of the value.
      Parameters:
      query - String containing the Lucene query to execute.
      defaultField - String specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.
      resultLimit - limit on the number of query results to return.
      Returns:
      a List of LuceneResultStruct containing the query results.
      See Also:
      • LuceneResultStruct
      • List
    • query

      public <K, V> org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> query(String query, String defaultField, int resultLimit, int pageSize)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query with a limit on the number of results returned along with a page size for paging.
      Specified by:
      query in interface LuceneOperations
      Overrides:
      query in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      V - Class type of the value.
      Parameters:
      query - String containing the Lucene query to execute.
      defaultField - String specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.
      resultLimit - limit on the number of query results to return.
      pageSize - number of results per page.
      Returns:
      a PageableLuceneQueryResults data structure containing the results of the Lucene query.
      See Also:
      • PageableLuceneQueryResults
    • query

      public <K, V> List<org.apache.geode.cache.lucene.LuceneResultStruct<K,V>> query(org.apache.geode.cache.lucene.LuceneQueryProvider queryProvider, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query with a limit on the number of results returned.
      Specified by:
      query in interface LuceneOperations
      Overrides:
      query in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      V - Class type of the value.
      Parameters:
      queryProvider - LuceneQueryProvider is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.
      resultLimit - limit on the number of query results to return.
      Returns:
      a List of LuceneResultStruct containing the query results.
      See Also:
      • LuceneQueryProvider
      • LuceneResultStruct
      • List
    • query

      public <K, V> org.apache.geode.cache.lucene.PageableLuceneQueryResults<K,V> query(org.apache.geode.cache.lucene.LuceneQueryProvider queryProvider, int resultLimit, int pageSize)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query with a limit on the number of results returned along with a page size for paging.
      Specified by:
      query in interface LuceneOperations
      Overrides:
      query in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      V - Class type of the value.
      Parameters:
      queryProvider - LuceneQueryProvider is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.
      resultLimit - limit on the number of query results to return.
      pageSize - number of results per page.
      Returns:
      a PageableLuceneQueryResults data structure containing the results of the Lucene query.
      See Also:
      • LuceneQueryProvider
      • PageableLuceneQueryResults
    • queryForKeys

      public <K> Collection<K> queryForKeys(String query, String defaultField, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query returning a Collection of keys matching the query clause/predicate with a limit on the number of keys returned.
      Specified by:
      queryForKeys in interface LuceneOperations
      Overrides:
      queryForKeys in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      Parameters:
      query - String containing the Lucene query to execute.
      defaultField - String specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.
      resultLimit - limit on the number of keys returned.
      Returns:
      a Collection of keys matching the Lucene query clause (predicate).
      See Also:
    • queryForKeys

      public <K> Collection<K> queryForKeys(org.apache.geode.cache.lucene.LuceneQueryProvider queryProvider, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query returning a Collection of keys matching the query clause/predicate with a limit on the number of keys returned.
      Specified by:
      queryForKeys in interface LuceneOperations
      Overrides:
      queryForKeys in class LuceneAccessorSupport
      Type Parameters:
      K - Class type of the key.
      Parameters:
      queryProvider - LuceneQueryProvider is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.
      resultLimit - limit on the number of keys returned.
      Returns:
      a Collection of keys matching the Lucene query clause (predicate).
      See Also:
    • queryForValues

      public <V> Collection<V> queryForValues(String query, String defaultField, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query returning a Collection of values matching the query clause/predicate.
      Specified by:
      queryForValues in interface LuceneOperations
      Overrides:
      queryForValues in class LuceneAccessorSupport
      Type Parameters:
      V - Class type of the value.
      Parameters:
      query - String containing the Lucene query to execute.
      defaultField - String specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.
      resultLimit - limit on the number of values returned.
      Returns:
      a Collection of values matching Lucene query clause (predicate).
      See Also:
    • queryForValues

      public <V> Collection<V> queryForValues(org.apache.geode.cache.lucene.LuceneQueryProvider queryProvider, int resultLimit)
      Deprecated.
      Description copied from interface: LuceneOperations
      Executes the given Lucene query returning a Collection of values matching the query clause/predicate.
      Specified by:
      queryForValues in interface LuceneOperations
      Overrides:
      queryForValues in class LuceneAccessorSupport
      Type Parameters:
      V - Class type of the value.
      Parameters:
      queryProvider - LuceneQueryProvider is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.
      resultLimit - limit on the number of values returned.
      Returns:
      a Collection of values matching Lucene query clause (predicate).
      See Also: