lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: multiple Tokens in a Tokengroup not matching
Date Sat, 15 Sep 2007 22:39:29 GMT
I really can't tell much from your e-mail. What I'd recommend is
that you get a copy of Luke and examine your index (including
your query and it's results). Also, try query.toString() to see what
the actual query submitted to Lucene is, that may give you some
clues as to what's going on.

If the results make no sense, think about posting the results of
the toString and/or the Luke explain to  the list and I suspect
you'll get a more helpful response.

Imagine that you had been given your e-mail while knowing nothing
about the application. There's not much "there" there <G>. More
detail would help us give you a more helpful response....

That said, it's tough getting a bunch of code dropped on  your
head and being told "fix it". Been there, done that. Not much fun.


On 9/14/07, Dave Schneider <> wrote:
> Hi,
> I've inherited some Lucene 1.9.1 code, and have run into the following
> problem:
> I have a TokenGroup with multiple tokens in it, and a query that should
> match against multiple tokens (e.g. X and Y) in the TokenGroup.
> However, when I look in the Hit that results, I see that one of the
> Tokens in the TokenGroup has a weight of 1.0, while all the rest have a
> weight of 0.  If I run a search with just X in the query, it matches the
> TokenGroup, and when I run a search with just Y in the query, it also
> matches the TokenGroup, just as I'd expect.  But a query that includes
> both X and Y looks like only X matches.  I need to see that both X and Y
> matched in order to get my highlighting to work correctly.
> Can anyone provide any hints as to what might be going on here, and what
> I might do to fix it?  We have a vague suspicion that it's related to
> the weight on the matching token being 1.0 that's causing Lucene to not
> both with any other tokens (because the weight for the TokenGroup is
> already as high as it can be), but it's just a suspicion.
> Thanks,
> Dave Schneider
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message