[ 
https://issues.apache.org/jira/browse/LUCENE-8997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16974239#comment-16974239
 ] 

Adrien Grand commented on LUCENE-8997:
--------------------------------------

I'm unsure about keeping dimensions empty: it works well if your index has only 
lines or only points since all points will have a value of 0 for certain 
dimensions. But if the index mixes triangles and points, then this could 
actually hurt?

> Add type of triangle info to ShapeField encoding
> ------------------------------------------------
>
>                 Key: LUCENE-8997
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8997
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Ignacio Vera
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are currently encoding three type of triangle in ShapeField:
>  * POINT: all three coordinates are equal
>  * LINE: two coordinates are equal
>  * TRIANGLE: all coordinates are different
> Because we still have two unused bits, it might be worthy to encode this 
> information in those two bits as follows:
>  * 0 0 : Unknown so this is an index created before adding this information. 
> We can compute in this case the information while decoding for backwards 
> compatibility.
>  * 1 0: The encoded triangle is a POINT
>  * 0 1: The encoded triangle is a LINE
>  * 1 1: The encoded triangle is a TRIANGLE
> We can later leverage this information so we don't need to decode all 
> dimensions in case of POINT and LINE and we are currently computing in some 
> of the methods ithe type of triangle we are dealing with, This will go as 
> well.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to