lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Che Dong" <ched...@hotmail.com>
Subject Use filter instead of searching Re: Error when trying to match file path
Date Tue, 31 Dec 2002 07:14:12 GMT
first indexing file path field with a untokened indexing field 
Field("filePath", file.getAbsolutePath(), true, true, false)

second , construct a prefix filter for searcher.I wrote a StringFilter.java for match and
prefix match which can download from:
http://www.chedong.com/tech/lucene_ext.tar.gz

Che , Dong
----- Original Message ----- 
From: "Rob Outar" <routar@ideorlando.org>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Thursday, October 24, 2002 8:45 PM
Subject: RE: Error when trying to match file path


> Some more information, with the following:
> 
> this.query =
> QueryParser.parse(file.getAbsolutePath(),"path",this.analyzer);
>         System.out.println(this.query.toString("path"));
> I got:
> F:"onesaf dev block b pair dev unittestdatafiles tools unitcomposer.xml"
> 
> So it looks like the Query Parser is stripping out all the "\", and doing
> something with the F:\, would anyone happen to know why this is happening?
> Do I need to use a different query to get the infromation I need?
> 
> Thanks,
> 
> Rob
> 
> -----Original Message-----
> From: Rob Outar [mailto:routar@ideorlando.org]
> Sent: Wednesday, October 23, 2002 5:48 PM
> To: lucene-user@jakarta.apache.org
> Subject: Error when trying to match file path
> 
> 
> Hi all,
> 
> I am indexing the filepath with the below:
> 
>  Document doc = new Document();
>         doc.add(Field.UnIndexed("path", f.getAbsolutePath()));
> 
> I then try to run the following after building the index:
> 
>  this.query =
> QueryParser.parse(file.getAbsolutePath(),"path",this.analyzer);
>         Hits hits = this.searcher.search(this.query);
> 
> It returns zero hits?!?
> 
> What am I doing wrong?
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Rob
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
>
Mime
View raw message