如何传递“允许的" ID列表以过滤Lucene搜索? [英] How do I pass a list of 'allowed' IDs to filter a Lucene search?

查看:67
本文介绍了如何传递“允许的" ID列表以过滤Lucene搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只需要返回用户可以通过Lucene搜索访问的文档.我可以从组成允许的"子集的数据库中获取ID列表.我如何将它们传递给Lucene?我在网上找到的文章建议我需要使用BitSet和FieldCache(是吗?),但是我很难找到好的例子.有人有吗?

I need to return just the documents that a user has access to from a Lucene search. I can get a list of IDs from a database that make up the 'allowed' subset. How can I pass these to Lucene? The articles I've found on the web suggest I need to use a BitSet and FieldCache (am I right?), but I'm having trouble finding good examples. Does anyone have any?

我正在使用C#,但是任何一种语言都很棒.谢谢.

I'm using C#, but any language would be great. Thanks.

推荐答案

一旦我知道我需要使用自定义过滤器,请询问

Once I knew I needed to use a custom filter, asking this question got the right answer.

这篇关于如何传递“允许的" ID列表以过滤Lucene搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆