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

James Dyer commented on SOLR-5332:
----------------------------------

We have a use case where we use a modified version of EdgeNGramFilter to 
"preserve the original".  The field we used this on is multi-valued.  We change 
all user queries against the field to phrases with slop to prevent partial 
matches across values.  But our users also want to be able to enter sub-strings 
on this field.  (Because all queries are phrase queries, wildcards are not an 
option.)  So had this functionality existed we would have been spared of having 
to implement it ourselves.  (I didn't contribute the code because I couldn't 
imagine it had broad applicability.  But it seems that with this issue, at 
least a few others out there have cases for it as well)

> Add "preserve original" setting to the EdgeNGramFilterFactory
> -------------------------------------------------------------
>
>                 Key: SOLR-5332
>                 URL: https://issues.apache.org/jira/browse/SOLR-5332
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 4.4, 4.5, 4.5.1, 4.6
>            Reporter: Alexander S.
>
> Hi, as described here: 
> http://lucene.472066.n3.nabble.com/Help-to-figure-out-why-query-does-not-match-td4086967.html
>  the problem is in that if you have these 2 strings to index:
> 1. facebook.com/someuser.1
> 2. facebook.com/someveryandverylongusername
> and the edge ngram filter factory with min and max gram size settings 2 and 
> 25, search requests for these urls will fail.
> But search requests for:
> 1. facebook.com/someuser
> 2. facebook.com/someveryandverylonguserna
> will work properly.
> It's because first url has "1" at the end, which is lover than the allowed 
> min gram size. In the second url the user name is longer than the max gram 
> size (27 characters).
> Would be good to have a "preserve original" option, that will add the 
> original string to the index if it does not fit the allowed gram size, so 
> that "1" and "someveryandverylongusername" tokens will also be added to the 
> index.
> Best,
> Alex



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to