Re: revisit payloads API in DocsAndPositionsEnum

2012-08-12 Thread Michael McCandless
+1, this is a great cleanup. Thank Robert! Mike McCandless http://blog.mikemccandless.com On Sun, Aug 12, 2012 at 1:56 AM, Robert Muir wrote: > Here's a patch: http://pastebin.com/d2DdWxJp > > On Sat, Aug 11, 2012 at 1:35 PM, Simon Willnauer > wrote: >> +1 this makes lots of sense >> >> simon

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Shai Erera
I agree Shai On Sun, Aug 12, 2012 at 9:18 AM, Robert Muir wrote: > That would definitely be separate. I looked into this: the problem is > things like LUCENE-4219. > > So the current behavior for payload-using span queries (at least > span-near with payloads) is wrong, they score differently de

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Robert Muir
That would definitely be separate. I looked into this: the problem is things like LUCENE-4219. So the current behavior for payload-using span queries (at least span-near with payloads) is wrong, they score differently depending upon whether you next() or advance() them (which is horrible!), so I c

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Shai Erera
Looks good. Perhaps separately, what do you think about doing the same to Spans.isPayloadAvailable/getPayload? Shai On Sun, Aug 12, 2012 at 8:56 AM, Robert Muir wrote: > Here's a patch: http://pastebin.com/d2DdWxJp > > On Sat, Aug 11, 2012 at 1:35 PM, Simon Willnauer > wrote: > > +1 this make

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Robert Muir
Here's a patch: http://pastebin.com/d2DdWxJp On Sat, Aug 11, 2012 at 1:35 PM, Simon Willnauer wrote: > +1 this makes lots of sense > > simon > > On Sat, Aug 11, 2012 at 7:28 PM, Michael McCandless > wrote: >> +1 >> >> Mike McCandless >> >> http://blog.mikemccandless.com >> >> >> On Sat, Aug 11,

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Simon Willnauer
+1 this makes lots of sense simon On Sat, Aug 11, 2012 at 7:28 PM, Michael McCandless wrote: > +1 > > Mike McCandless > > http://blog.mikemccandless.com > > > On Sat, Aug 11, 2012 at 10:08 AM, Robert Muir wrote: >> The payloads api is really confusing: >> >> /** Returns the payload at this po

Re: revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Michael McCandless
+1 Mike McCandless http://blog.mikemccandless.com On Sat, Aug 11, 2012 at 10:08 AM, Robert Muir wrote: > The payloads api is really confusing: > > /** Returns the payload at this position, or null if no >* payload was indexed. Only call this once per >* position. You should not mo

revisit payloads API in DocsAndPositionsEnum

2012-08-11 Thread Robert Muir
The payloads api is really confusing: /** Returns the payload at this position, or null if no * payload was indexed. Only call this once per * position. You should not modify anything (neither * members of the returned BytesRef nor bytes in the * byte[]). */ public abstract By