Take the 2-minute tour ×

We're running into a serious bug with the Lucene.NET 2.3 codebase. We're upgrading to Lucene 2.9 in hopes the bug is fixed.

Upgrading to the latest version, we see that the MultiFieldQueryParser contructor is [Obsolete]:

[Obsolete("Use the ctor with Version param instead.")]
public MultiFieldQueryParser(string[] fields, Analyzer analyzer)

Instead, we're to use the constructor that takes a Version parameter:

public MultiFieldQueryParser(Version version, string[] fields, Analyzer analyzer)

Problem is, I can't find any documentation regarding what the version parameter is, what it's supposed to be, what I'm supposed to pass in here.

Can anyone shine some light on this?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

The version parameter was added to provide backwards compatibility in a way that can be extended to accommodate future changes.

If you don't care about backwards compatibility, just use Version.LUCENE_CURRENT. If you really need to know exactly what changed, you usually have to go diving into the source code.

General Lucene tip: you usually get better documentation looking at the java version.

share|improve this answer
Thanks a bunch! –  Judah Himango Apr 6 '10 at 3:57
In 3.0.1, Version.LUCENE_CURRENT is deprecated lucene.apache.org/java/3_0_1/changes/… So, use the actual version number. –  Shashikant Kore Apr 6 '10 at 11:55
Are you kidding me? Jeez. Actual version number...ok...Version takes 2 params. A string and an int. Where's the documentation for this? –  Judah Himango Apr 6 '10 at 17:51
Ah, there it is: Lucene.Net.Util.Version.LUCENE_29 as documented here: lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/util/… –  Judah Himango Apr 6 '10 at 17:52
@ShashikantKore Good catch. –  itsadok Apr 7 '10 at 8:30

Your Answer


