Hi Hoss & Erick, Thx for your responses. I found the bug in my code. It is not something todo with positions (As I said in my first mail, I was using right position increments) and also nothing to do with offsets. Offsets are just ignored, only useful for Highlighter perhaps. Anyway I am not interested in Highlighting at the moment.
The problem was order of the filters I use in my Analyzer. It is strange anyhow. Thx a lot again, Greetings Jelda > -----Original Message----- > From: Chris Hostetter [mailto:[EMAIL PROTECTED] > Sent: Friday, August 17, 2007 11:40 PM > To: java-user@lucene.apache.org > Subject: RE: Issue with indexed tokens position > > > : My lucene query: fieldName:"pinki i" finds document. (see > "i" in "pinki") > > i'm guessing that in this debuging output you provided... > > : > indexed value: pink-I > : > Indexed tokens:1: [pink:0->5] 2: [pinki:0->5] 3: [i:5->6] > : > (ex. explanation: > : > "pink" is a term "0->5" term-position) > > ...that the "1" is the position of "pink", "2" is the > position of "pinki", and "3" is the position of "i" ... the > numbers you are refering to as term-positions actually look > like start and end offsets. > > the offsets aren't used in phrase queries -- only the > positions, your problem appears to be that you are using a > non sloppy phrase query and expecting it to match two tokens > with a psotion gap of 1 between them. > > you could either use sloppier queries (ie: "pink i"~2) or > chnage your analyzer so the position incriment between "pink" > and "pinki" is 0 > > > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]