lucene-lucene-net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Haywood" <>
Subject RE: How to limit search to directory
Date Wed, 08 Nov 2006 13:30:06 GMT
It is probably a matter of either tokenizing the "parent" field when
indexing or using standard analyzer (instead of, say, keywordanalyzer)
when building the query.

Can you post your code so we can all see/help?


-----Original Message-----
From: Jan Slansky [] 
Sent: Wednesday, November 08, 2006 3:42 AM
Subject: Re: How to limit search to directory

Hi George,

thank you for your reply. I have found that there is field named
"parent". So it would be fine to use it in my search query (AND
But there is problem with parsing of colon, underscore and backslash
characters. Even when I escape them (: as a \: ) the final query is
without these characters and they are replaced with space. I tried to
place d:\data\documents in quotations.
What is wrong with parsing of these special characters? I'm using latest
(I hope so) (


George Aroush wrote:
> Hi Jan,
> The easiest solution is to create two separate indexes and search into

> the specific index.  When you want to search both indexes, create a 
> MultiSearcher.
> An alternative is to create an extra field for each document.  In this

> extra field store a value unique to "d:\data\help" and a value unique 
> to "d:\data\documents"  During search, AND this unique field to the
> Regards,
> -- George Aroush
> -----Original Message-----
> From: Jan Slansky []
> Sent: Monday, November 06, 2006 6:06 AM
> To:
> Subject: How to limit search to directory
> Hello,
> I have a question about query. Is it possible to limit search query to

> look for a file in one specific folder and its subdirectories?
> Example:
> d:\data\help
> d:\data\documents
> I am indexing d:\data folder and I would like to limit query to search

> only in d:\data\documents directory and all it's subdirectories.
> Thanks in advance for any help.
> Jan

View raw message