lucene-java-user mailing list archives

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

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
Hope this helps.

Anshum Gupta
Naukri Labs!

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 <> 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

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