On 25 Aug 2009, at 12:31, Emmanuel Bernard wrote:
>
> is that to create a lucene query then you need to do the work of
> creating up a QueryParser and stuff like that. This is the bit that
> I'd like to avoid.
I agree with ou it's annoying (though you don't need a QP
necessarily). I do think the DSL approach will work best.
A DSL would work, but I'd rather not define our own language here.
Which is why I asked for a standard. Perhaps something based on SQL/
JPA-QL? Or are you thinking DSL specific to Lucene - which could be
used by any/all of {Lucene, Hibernate Search, Infinispan}? In which
case the DSL should ideally be a Lucene project.
> Is it too round-about / tricky / yucky if we the user is to
provide
> the specific class of the query? Or is that what you were
> suggesting anyway Manik?
>
> e.g.: -
> CacheQuery cq = new
> QueryFactory
> (cache).getQuery(org.apache.lucene.query.BooleanQuery.class);
Well but then how do you pass each side which are Lucene queries
themselves.
Yeah just the class isn't enough. The class would need to be "set up"
appropriately, and how you "set up" the query is different for
different instances.
Cheers
--
Manik Surtani
manik(a)jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org