Hi Trejkaz,

A normal codec would call visitor.compare on smaller and smaller cells
(1D ranges for the 1D case) of the byte[] space and depending on that
result would call one of the visit methods, or skip that cell if
compare returned CELL_OUTSIDE_QUERY.

I think for your case (to migrate all values) you could simply call
visitor.visit(int docID, byte[] packedValue) for every value in the
segment.

Mike McCandless

http://blog.mikemccandless.com


On Tue, Jan 24, 2017 at 12:43 AM, Trejkaz <trej...@trypticon.org> wrote:
> Hi all.
>
> I'm, considering writing a migration to copy existing doc values into
> points (after which I will discard their postings). So essentially I
> have to implement three things:
>
>     public void intersect(String fieldName, IntersectVisitor visitor)
> throws IOException
>     public byte[] getMinPackedValue(String fieldName) throws IOException
>     public byte[] getMaxPackedValue(String fieldName) throws IOException
>
> It looks like LongPoint.encodeDimension is the encoding I want to
> convert the values themselves.
>
> The docs on this "intersect" thing are talking about a query... I
> assume the visitor itself is conceptually the query in this context...
>
> ...but is the right thing to do here just to call visit() (ah, but
> which one?) for every value? In a particular order? ;)   Or is there
> something even more tricky I'm supposed to do?
>
>
> TX
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to