You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2017/01/04 11:34:58 UTC

[jira] [Created] (LUCENE-7619) Add WordDelimiterGraphFilter

Michael McCandless created LUCENE-7619:
------------------------------------------

             Summary: Add WordDelimiterGraphFilter
                 Key: LUCENE-7619
                 URL: https://issues.apache.org/jira/browse/LUCENE-7619
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Michael McCandless
            Assignee: Michael McCandless
             Fix For: 6.5, master (7.0)


Currently, {{WordDelimiterFilter}} doesn't try to set the {{posLen}} attribute and so it creates graphs like this:

!before.png!

but with this patch (still a work in progress) it creates this graph instead:

!after.png!

This means (today) positional queries when using WDF at search time are buggy, but since we fixed LUCENE-7603, with this change here you should be able to use positional queries with WDGF.

I'm also trying to produce holes properly (removes logic from the current WDF that swallows a hole when whole token is just delimiters).

Surprisingly, it's actually quite easy to tweak WDF to create a graph (unlike e.g. {{SynonymGraphFilter}}) because it's already creating the necessary new positions, and its output graph never has side paths, except for single tokens that skip nodes because they have {{posLen > 1}}.  I.e. the only fix to make, I think, is to set {{posLen}} properly.  And it really helps that it does its own "new token buffering + sorting" already.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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