在最新版本的Lucene(或Lucene.NET)中,以排序顺序恢复搜索结果的正确方法是什么?
我有一个这样的文件:
var document = new Lucene.Document();
document.AddField("Text", "foobar");
document.AddField("CreationDate", DateTime.Now.Ticks.ToString()); // store the date as an int
indexWriter.AddDocument(document);
Run Code Online (Sandbox Code Playgroud)
现在我想进行搜索并按照最近的顺序返回我的结果.
如何通过CreationDate进行搜索结果搜索?我看到的所有文档都是针对使用现已弃用的旧版本的Lucene版本.