lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Whelan <phil...@gmail.com>
Subject Re: Why does this search succeed with web app, but not Luke?
Date Thu, 06 Aug 2009 23:09:27 GMT
Hi Jim,

Are you using the same Analyzer for indexing and searching? xxxx.yyy
will be seem as a HOSTNAME by StandardAnalyzer and will keep it as one
term, whereas another indexer might split this into 2 terms. This
should not matter either way as long as you are using the same
Analyzer for both indexing and searching.

I would expect this to pass unless you are using NOT_ANALYZED, or the
WhitespaceAnalyzer, or something else that would not split on "/".
    path:xxxx.yyy

In Luke, do you see 2 terms "xxxx" and "yyy", or just "xxxx.yyy", or
something else?

Thanks,
Phil

On Thu, Aug 6, 2009 at 1:03 PM, <ohaya@cox.net> wrote:
> Hi,
>
> In my indexer app (based on the IndexFiles.java demo), I am adding the "path" field:
>
>    doc.add(new Field("path", f.getPath(), Field.Store.YES, Field.Index.ANALYZED));
>
> Per Luke, the full path (e.g., "c:\....\xxxx.yyy") gets parsed, and one of the terms
(again, per Luke) is "xxxx", i.e., the actual file name, but without the extension.
>
> Then, when I search with Luke for "path:xxxx", that succeeds, as expected, and when I
search with Luke for "path:xxxx.yyy", that fails, as expected.
>
> But, if I search using the demo web app, for "path:xxxx.yyy", it succeeds.
>
> Since the Luke search for "path:xxxx.yyy" fails, I don't understand why the web app search
for "path:xxxx.yyy" would succeed?
>
> Thanks,
> Jim

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message