Lucene Entity Extraction

落爺英雄遲暮 提交于 2019-12-05 18:20:26
Xodarap

For the offset, see this question: How get the offset of term in Lucene?

I don't quite understand your second question. It sounds to me like you want to get the data from a stored field though. To get the data from a stored field:

TopDocs results = searcher.Search(query, filter, num);
foreach (ScoreDoc result in results.scoreDocs)
{
    Document resultDoc = searcher.Doc(result.doc);
    string valOfField = resultDoc.Get("My Field");
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!