lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3830) MappingCharFilter could be improved by switching to an FST.
Date Mon, 30 Apr 2012 19:53:48 GMT


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)
+ * An FST {@link Outputs} implementation where each output
+ * is a sequence of bytes.
+ *
+ * @lucene.experimental
+ */
+public final class CharSequenceOutputs extends Outputs<CharsRef> { 
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:
>             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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message