相关疑难解决方法(0)

Lucene.NET - 按int排序

在最新版本的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版本.

sorting lucene lucene.net

9
推荐指数
1
解决办法
3063
查看次数

标签 统计

lucene ×1

lucene.net ×1

sorting ×1