You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Ignacio Vera (Jira)" <ji...@apache.org> on 2021/10/11 05:48:00 UTC
[jira] [Created] (LUCENE-10161) Points implementation should
distinguish between indexed and not indexed PointValues
Ignacio Vera created LUCENE-10161:
-------------------------------------
Summary: Points implementation should distinguish between indexed and not indexed PointValues
Key: LUCENE-10161
URL: https://issues.apache.org/jira/browse/LUCENE-10161
Project: Lucene - Core
Issue Type: Improvement
Reporter: Ignacio Vera
While working in L|UCENE-9820, where we are trying to add a cursor like API to PointValues API, I had a lot of friction with MutablePointValues. The issue is that this interface is representing non-indexed points but it is extending PointValues that describes indexed points.
Therefore here is proposed to extract a minimal interface from PointValues that represents not-indexed points. There idea would be something like:
{code:java}
/**
* Access to numeric values.
*
* @lucene.experimental
*/
public interface PointValuesReader {
/**
* Provides access to the points in this reader.
*
* @lucene.experimental
*/
@FunctionalInterface
interface DocValueVisitor {
/**
* Called for all documents in the reader when called in {@link
* #visitDocValues(DocValueVisitor)}.
*/
void visit(int docID, byte[] packedValue) throws IOException;
}
/** Visit all doc and values in this reader */
void visitDocValues(DocValueVisitor visitor) throws IOException;
/** Returns the total number of points in this reader. */
long size();
} {code}
This interface should be implemented by MutablePointValues and PointValues and should simplify the current implementation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org