On 25 août 09, at 11:33, Manik Surtani wrote:
>
> CacheQuery cq = new QueryFactory(cache).getQuery("fieldName",
> "stuffToSearchFor");
Looks good. But I think we should also support Lucene queries
directly, as they provide a richer set of searchable terms and
constraints. Or perhaps impls like BooleanQuery to combine queries.
E.g.:
Query luceneQuery = createComplexLuceneQuery();
CacheQuery cq = new QueryFactory(cache).getQuery(luceneQuery);
See:
http://lucene.apache.org/java/2_4_1/api/core/org/apache/lucene/search/Que...
It's a fine line to add "easy" query object factory methods:
- this single term query is often not enough
- even when it is, are you doing a TermQuery, a FuzzyTermQuery
(which fuzzy factor), a PrefixQuery or even why not a RangeQuery?
where are you going to draw the line? I would rather see some DSL to
build Lucene queries which I would like to work on for HSearch as soon
as free time comes by.