You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ed Murray <ma...@avenuedesign.net> on 2007/07/09 06:52:01 UTC
Search that supports all valid characters in a Unix filename
Could
someone let me know the best Analyzer to use to get an exact match on a Unix
filename when it is inserted into an untokened field.
Filenames
obviously contain spaces and forward slashes along with other characters. I am using
a WhitespaceAnalyzer but when the query is parsed it is
chopped into different keywords as such:
I have
tried several different Analyzers but I can’t seem to get what I want.
Filename:
/repository/Administration/780 IT Support/filegate.txt
Query:URL:/repository/Administration/780
URL:IT URL:Support/filegate.txt
I am
assuming that this would be in common usage with Lucene but there does not seem
to be an easy way to do it.
Re: Search that supports all valid characters in a Unix filename
Posted by Steven Rowe <sa...@syr.edu>.
Hi Ed,
Ed Murray wrote:
> Could
> someone let me know the best Analyzer to use to get an exact match on a Unix
> filename when it is inserted into an untokened field.
>
> Filenames
> obviously contain spaces and forward slashes along with other characters. I am using
> a WhitespaceAnalyzer but when the query is parsed it is
> chopped into different keywords as such:
>
> I have
> tried several different Analyzers but I can’t seem to get what I want.
>
> Filename:
> /repository/Administration/780 IT Support/filegate.txt
> Query:URL:/repository/Administration/780
> URL:IT URL:Support/filegate.txt
The usual way to enable this is using PerFieldAnalyzerWrapper, with
KeywordAnalyzer on the Unix filename field.
Steve
--
Steve Rowe
Center for Natural Language Processing
http://www.cnlp.org/tech/lucene.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org