I would like to search with only part of a word,not the whole word.For example when I search name of people,I would like to search only the first 3 letters of the Last Name,not the whole name.Now if I put on search only the first 3 letters I take no results.For the moment I am using the search api with apache solr(and perhaps views).Any suggestions please?


Add ngramfilter to text type definition in schema.xml in solr config directory.

<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
    <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="25" />
|improve this answer|||||
  • :I added it but its failing because there is no tokenizer..which class should I add for my tokenizer? – user1050619 Aug 4 '14 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.