org.infinispan.query
Class QueryFactory
java.lang.Object
org.infinispan.query.QueryFactory
public class QueryFactory
- extends Object
Class that is used to build CacheQuery
- Since:
- 4.0
- Author:
- Navin Surtani
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryFactory
public QueryFactory(Cache cache,
QueryHelper qh)
getQuery
public CacheQuery getQuery(org.apache.lucene.search.Query luceneQuery)
- This is a simple method that will just return a
CacheQuery
- Parameters:
luceneQuery
- - Query
- Returns:
- the query result
getBasicQuery
public CacheQuery getBasicQuery(String field,
String search)
throws org.apache.lucene.queryParser.ParseException
- This method is a basic query. The user provides 2 strings and internally the
Query
is built.
The first string is the field that they are searching and the second one is the search that they want to run.
For example: -
CacheQuery
cq = new QueryFactory
The query is built by use of a QueryParser
and a StandardAnalyzer
- Parameters:
field
- - the field on the class that you are searchingsearch
- - the String that you want to be using to search
- Returns:
CacheQuery
result
- Throws:
org.apache.lucene.queryParser.ParseException
Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.