<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 25 Aug 2009, at 12:31, Emmanuel Bernard wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><font class="Apple-style-span" color="#000000"><br></font></div><div>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.</div></div></div></blockquote><div><br></div><div>I agree with ou it's annoying (though you don't need a QP necessarily). I do think the DSL approach will work best.</div></div></div></blockquote><div><br></div><div>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.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>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?</div><div><br></div><div>e.g.: - </div><div><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>CacheQuery cq = new QueryFactory(cache).getQuery(org.apache.lucene.query.BooleanQuery.<b><i>class</i></b>);</div></div></div></blockquote><div><br></div><div>Well but then how do you pass each side which are Lucene queries themselves.</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>Cheers</div></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div>Lead, Infinispan</div><div>Lead, JBoss Cache</div><div><a href="http://www.infinispan.org">http://www.infinispan.org</a></div><div><a href="http://www.jbosscache.org">http://www.jbosscache.org</a></div><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>