Hi Erick, Thanks. Here I try here my best to provide Pseudo code. Indexed Value: "pink-i"
I have used a Custom Analyzer. My Analyzer looks a littlebit like following.. public class KeyWordFilter extends TokenFilter{ public KeyWordFilter(TokenStream in) { super(in); keywordStack = new LinkedList<Token>(); } org.apache.lucene.analysis.Token next(){ if(keywordStack.size() > 0){ return (Token) keywordStack.poll(); } //token = "pink-i" makeTokens(token); } void makeTokens(Token token){ //make following tokens and add to stack.. //[(pink,0,5,type=HYPENWORD_DIVIDED), (pinki,0,5,type=HYPENWORD_DIVIDED,posIncr=0), (i,5,6,type=HYPENWORD_DIVIDED)] } } I am 100% sure that there is a problem with token-positions. And PhraseQuery "pink i" is not working where as PhraseQuery "pinki i" works. And it seems positions are totally ignored by PhraseQuery. Any thoughts? Thx, Jelda > -----Original Message----- > From: Erick Erickson [mailto:[EMAIL PROTECTED] > Sent: Friday, August 17, 2007 3:31 PM > To: java-user@lucene.apache.org > Subject: Re: Issue with indexed tokens position > > You'd get much better answers if you posted a concise example > (or possibly code snippets), especially including the > analyzers you used. > > Have you used Luke to examine your index and see if it's > indexed as you expect? > > Best > Erick > > On 8/17/07, Ramana Jelda <[EMAIL PROTECTED]> wrote: > > > > Strangely.. > > My lucene query: fieldName:"pinki i" finds document. (see "i" > > in "pinki") > > > > Jelda > > > > > -----Original Message----- > > > From: Ramana Jelda [mailto:[EMAIL PROTECTED] > > > Sent: Friday, August 17, 2007 12:33 PM > > > To: java-user@lucene.apache.org > > > Subject: Issue with indexed tokens position > > > > > > Hi, > > > Lucene doesn't find following value. Some issues with PhraseQuery. > > > > > > 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) > > > > > > And I have indexed in a field called "fieldName". > > > My lucene search with the query [fieldName:"pink i"] can't find > > > above indexed value. > > > > > > Can anyone help me out here. > > > > > > Thx in advance, > > > Jelda > > > > > > > > > > > > > -------------------------------------------------------------------- > > > - 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] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]