You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vladimir Sutskever <Vl...@jpmorgan.com> on 2010/06/23 01:06:55 UTC

SOLR partial string matching question

Hi,

Can you guys make a recommendation for which types/filters to use accomplish the following partial keyword match:


A. Actual Indexed Term:  "bank of america"

B. User Enters Search Term:  "of ameri"


I would like SOLR to match document "bank of america" with the partial string "of ameri"

Any suggestions?



Kind regards,

Vladimir Sutskever
Investment Bank - Technology
JPMorgan Chase, Inc.



This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

Re: SOLR partial string matching question

Posted by Joe Calderon <ca...@gmail.com>.
you want a combination of WhitespaceTokenizer and EdgeNGramFilter
http://lucene.apache.org/solr/api/org/apache/solr/analysis/WhitespaceTokenizerFactory.html
http://lucene.apache.org/solr/api/org/apache/solr/analysis/EdgeNGramFilterFactory.html

the first will create tokens for each word the second will create
multiple tokens from each word prefix

use the analysis link from the admin page to test your filter chain
and make sure its doing what you want.


On Tue, Jun 22, 2010 at 4:06 PM, Vladimir Sutskever
<Vl...@jpmorgan.com> wrote:
> Hi,
>
> Can you guys make a recommendation for which types/filters to use accomplish the following partial keyword match:
>
>
> A. Actual Indexed Term:  "bank of america"
>
> B. User Enters Search Term:  "of ameri"
>
>
> I would like SOLR to match document "bank of america" with the partial string "of ameri"
>
> Any suggestions?
>
>
>
> Kind regards,
>
> Vladimir Sutskever
> Investment Bank - Technology
> JPMorgan Chase, Inc.
>
>
>
> This email is confidential and subject to important disclaimers and
> conditions including on offers for the purchase or sale of
> securities, accuracy and completeness of information, viruses,
> confidentiality, legal privilege, and legal entity disclaimers,
> available at http://www.jpmorgan.com/pages/disclosures/email.