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:\\.yyy") gets parsed, and one of the
terms (again, per Luke) is "", i.e.,
Hi Jim,
Are you using the same Analyzer for indexing and searching? .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 ind
Phil,
Both my indexer and the webapp are basically from the Lucene demos, the indexer
starting with the IndexFiles.java demo code, so I think they're both using the
StandardAnalyzer.
What appears in Luke, when I select "path" is just the filename part, without
the extension, i.e., the "" p
Phil,
I need to be more precise...
The files that I have are at, say:
C:\dir1\dir2\
so, for example, I have
C:\dir1\dir2\file-1-1.dat
C:\dir1\dir2\file-1-2.dat
C:\dir1\dir2\file-1-3.dat
C:\dir1\dir2\file-1-4.dat
C:\dir1\dir2\file-1-5.dat
After indexing, and, using Luke, I look at the "path" f
Hi Jim,
> As I said, based on the terms in Luke, I would have expected a web app query
> on:
>
> path:file-1-2
>
> to succeed, and a query on:
>
> path:file-1-2.dat
> to fail.
>
> But, instead both of those succeed when I do a web query.
This query will also pass through the same (hopefully) Ana
Hi Phil,
Well, kind of... but...
Then, why, when I do the search in Luke, do I get the results I cited:
==> succeeds
.yyy ==> fails (no results)
I guess that I've been assuming that the search in Luke is "correct" and I've
been using that to "test my understanding", but maybe that'
It is a good general assumption that Luke is correct.
Can you confirm that you are using StandardAnalyzer everywhere, for
indexing and searching? This sort of issue is often caused by using
different analyzers.
What does Luke show as the indexed terms for path? In a little index
I've just creat
oh...@cox.net wrote:
Hi Phil,
Well, kind of... but...
Then, why, when I do the search in Luke, do I get the results I cited:
==> succeeds
.yyy ==> fails (no results)
I guess that I've been assuming that the search in Luke is "correct" and I've been using
that to "test my understa
Luke defaults to KeywordAnalyzer when you do a search on it. You have
to specifically choose StandardAnalyzer. You are probably already doing
this, but I figure its worth a check.
Matt
Andrzej Bialecki wrote:
oh...@cox.net wrote:
Hi Phil,
Well, kind of... but...
Then, why, when I do the
Ian,
I just re-confirmed that StandardAnalyzer is used in both my indexer app and in
the query/search web app.
The actual file paths look like:
C:\lucene-devel\dat\.dat
or
C:\lucene-devel\data\testdir\\.dat
For field "path", Luke shows:
lucene
data
c
devel
dat
Andrzej,
Hah!
I tried as you suggested using Luke, and I found at least part of my problem.
Luke was defaulting to KeywordAnalyzer.
I changed that to StandardAnalyzer, and did queries for:
path:x
and
path:xx.dat
For the first, the Rewritten was:
Hi Matt,
Good catch! As I just posted, I *just* noticed that (Luke use Keyword
Analyzer) :)!!!
Once I switched Luke to using Standard Analyzer, the Luke search results
matched my web query results.
Thanks!
Jim
Matthew Hall wrote:
> Luke defaults to KeywordAnalyzer when you do a sea
12 matches
Mail list logo