<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><br></div><div></div><blockquote type="cite"><div><span class="Apple-style-span" style="font-family: Arial; ">queryBuilder.withAnalyzer(Analyzer)</span></div><div><span class="Apple-style-span" style="font-family: Arial; "><div>queryBuilder.withEntityAnalyzer(Class&lt;?&gt;)</div><div>queryBuilder.basedOnEntityAnalyzer(Class&lt;?&gt;)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.overridesForField(String field, Analyzer)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.overridesForField(String field, Analyzer)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.build() //sucky name</div></span></div></blockquote><div><br></div><div>Perhaps rename the static factory methods to something like:</div><div><br></div><div>QueryBuilder.getQueryBuilder(Analyzer)</div><div>QueryBuilder.getQueryBuilder(Class&lt;?&gt;)</div><div><br></div><div>and QueryBuilder instances have overrideAnalyzerForField(String, Analyzer). &nbsp;Why do you need the build() method at the end?</div></div></div></blockquote><div><br></div><div>if you do that, all of the sudden, a QB can change it's analyzer on the fly making it immutable.</div><div>Also the overridesForField methods would pollute the API when it's time to create a query.</div><div><br></div><div>One of the advantages of a fluent API in a strongly typed environment is that we can hide methods that are meaningless in a given context.</div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>That been said, if the API ends up being pure Lucene and once we stabilize it, we can contribute it back even though I am not necessarily a huge fan of ASL.<br></div></blockquote><div><br></div><div>Not it doesn't have to be either ASL or even hosted at Apache. &nbsp;I guess what I am suggesting is perhaps even a separate project - LuceneQueryBuilder or something &nbsp;- which plain-old-Lucene users could use as well. &nbsp;Doesn't matter where it's hosted or what the license is - as long as its ASL or LGPL :)</div></div></div></blockquote></div><br><div>Let's start it under the Hibernate Search umbrella due to potential synergies and spin it out if needed.</div></body></html>