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

Michael McCandless commented on LUCENE-4617:
--------------------------------------------

bq. But i would just like some abstractions here in FSTs so we can do 
interesting things with them in the future.

+1

bq. even as a start it could just become package-private and maybe called from 
finish() transparently.

Right we should be able to do that right away.

{quote}
I'm not sure why today Builder needs to know willPack=true up front, so its not 
obvious how hard this will be to factor out,
or if its even possible, or the right thing to do.
{quote}

It's actually only the "mutable FST" that needs to know willPack, because in 
that mode it allocates two additional packed ints arrays (GrowableWriter) and 
dereferences node lookups through one of those ... the Builder itself doesn't 
need to know.

                
> remove FST.pack() method
> ------------------------
>
>                 Key: LUCENE-4617
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4617
>             Project: Lucene - Core
>          Issue Type: Sub-task
>          Components: core/FSTs
>            Reporter: Robert Muir
>
> Current method to make a packed FST:
> 1. Create an FST Builder with willPack=true, telling it you are later going 
> to pack() it.
> 2. Create your fst with finish() as normal.
> 3. Take that fst, and call pack() on it to get another FST.
> This makes no sense. if you pass willPack=true, then I think finish() should 
> just return a packed fst.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to