[infinispan-dev] Query module new API and configurations
Manik Surtani
manik at jboss.org
Tue Aug 25 06:46:28 EDT 2009
On 25 Aug 2009, at 11:09, Emmanuel Bernard wrote:
>
> 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/Query.html
>
> 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.
Aren't there standards around this already?
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
More information about the infinispan-dev
mailing list