You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Mikhail Khludnev <mk...@apache.org> on 2016/06/21 07:05:45 UTC

Re: position padding instead of positionIncrementGap

Paul,
Thanks for responding!
But it sounds like it will work in a single value (token stream). How to
implement padding across several text values (separate token streams)? Can
we pass the last position from one token stream to the following?

On Tue, Jun 21, 2016 at 12:35 AM, Paul Elschot <pa...@gmail.com>
wrote:

> At the 4th token use positionincrement 8?
> That's too simple, so what is the real question?
>
> Mikhail Khludnev <mk...@apache.org> schreef op 20 juni 2016 23:27:47 CEST:
>
>> Hello! Devs,
>>
>> I'm sure it's discussed many times or were in it air. If I have a few
>> 3-tokens values in a multivalued field, how I can assign positions:
>> 0,1,2...10,11,12,...20,21,22...
>> instead of
>> 0,1,2, 12,13,14, 24,25,26.. giving that positionIncrementGap=10 ?
>>
>> --
>> Sincerely yours
>> Mikhail Khludnev
>> Principal Engineer,
>> Grid Dynamics
>>
>


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

RE: position padding instead of positionIncrementGap

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

So you want to use a fixed “start” position for each value instead of a gap? That’s impossible with patching IndexWriter. Alternatively write a single “appending” tokenstream that concat its sub-streams and assigns a corresponding gap depending on actual position.

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

 <http://www.thetaphi.de/> http://www.thetaphi.de

eMail: uwe@thetaphi.de

 

From: Mikhail Khludnev [mailto:mkhl@apache.org] 
Sent: Tuesday, June 21, 2016 9:06 AM
To: dev@lucene.apache.org
Subject: Re: position padding instead of positionIncrementGap

 

Paul,

Thanks for responding! 

But it sounds like it will work in a single value (token stream). How to implement padding across several text values (separate token streams)? Can we pass the last position from one token stream to the following? 

 

On Tue, Jun 21, 2016 at 12:35 AM, Paul Elschot <paul.j.elschot@gmail.com <ma...@gmail.com> > wrote:

At the 4th token use positionincrement 8?
That's too simple, so what is the real question?

Mikhail Khludnev <mkhl@apache.org <ma...@apache.org> > schreef op 20 juni 2016 23:27:47 CEST:

Hello! Devs,

 

I'm sure it's discussed many times or were in it air. If I have a few 3-tokens values in a multivalued field, how I can assign positions: 

0,1,2...10,11,12,...20,21,22...

instead of 

0,1,2, 12,13,14, 24,25,26.. giving that positionIncrementGap=10 ? 

 

-- 

Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





 

-- 

Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics