lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <ansh...@gmail.com>
Subject Re: How can i restrict search to only some documents.
Date Wed, 13 May 2009 09:01:11 GMT
Hi,

There are several ways to do it, easier ones:
1. While indexing, you could store the directory and then filter results on
directory while searching.
2. Run a prefix query while searching in case you can't index the directory,
though I wouldn't have a reason to justify this approach.

The above solution is considering that you have restrictions on directory
basis. If it involves a rather open restriction i.e. document/file basis,
you would have to categorize documents while indexing i.e. also index, for
each document, a field that specifies groups who have permission on this
doc.
Hope this helps.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Wed, May 13, 2009 at 2:15 PM, Velaboy V <velaboy@ymail.com> wrote:

> Hi,
>
> I am new to Lucene.
>
> I have a document repository laid out like this:
> \docsdir
>    \doc1dir\
>    \doc2dir\
>    \doc3dir\
>     ...
>
> Every docNdir contains several files (xml).
>
> While searching, i want to restrict the search Only to a set of documents
> (this is because the user who is searching has rights on only some
> documents).
>
> What is the best way to go about this?
> (I haven't even thought of how index will be created yet...).
>
> Regards,
> velaboy
>
>
>
>      Explore and discover exciting holidays and getaways with Yahoo! India
> Travel http://in.travel.yahoo.com/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message