简体   繁体   中英

How do I declare the version of Lucene.Net 3.0.3

I am beginning to learn Lucene.Net and was wondering how you declare the version number?

Here is what I have, but it doesn't work:

var analyzer = new StandardAnalyzer(Version.LUCENE_30); //Version.Lucene_30 is where the problem lies. 

I have also tried:

var analyzer = new StandardAnalyzer(Lucene.Net.Util.Version);

but get the same result.

To declare the version of Lucene.Net you can create a variable:

var version = Lucene.Net.Util.Version.LUCENE_30;

After this just add the variable into the StandardAnalyzer argument:

var analyzer = new StandardAnalyzer(version);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM