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

Dawid Weiss commented on LUCENE-3830:
-------------------------------------

I briefly looked at the patch. Looks good (didn't check indexes and most of the 
logic, just went through the general idea)
{code}
+ * An FST {@link Outputs} implementation where each output
+ * is a sequence of bytes.
+ *
+ * @lucene.experimental
+ */
+
+public final class CharSequenceOutputs extends Outputs<CharsRef> { 
{code}
Javadoc is probably wrong (sequence of bytes?).

Other than that I think it's all right. I'd probably implement it based on the 
stack of currently "active" tokens moving through the fst -- this way you know 
when you have a greedy first longest match simply by looking at the set of 
active tokens when a match fires instead of restarting from each position.

But then -- Mihov's algorithm claims to reduce this to O(1) basically so it'd 
be very nice to implement that instead ;)

                
> MappingCharFilter could be improved by switching to an FST.
> -----------------------------------------------------------
>
>                 Key: LUCENE-3830
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3830
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Dawid Weiss
>            Assignee: Michael McCandless
>            Priority: Minor
>              Labels: gsoc2012, lucene-gsoc-12
>             Fix For: 4.0
>
>         Attachments: LUCENE-3830.patch
>
>
> MappingCharFilter stores an overly complex tree-like structure for matching 
> input patterns. The input is a union of fixed strings mapped to a set of 
> fixed strings; an fst matcher would be ideal here and provide both memory and 
> speed improvement I bet.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to