Hi

i am added fulltext search filter to views.
to enable search for parts of words,
I added a line in schema.xml :

 <fieldType name="text" class="solr.TextField" indexed="true" stored="true" multiValued="true" positionIncrementGap="100">
      <analyzer type="index">
        <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />

how true is this the solution?

Comments

rajivk’s picture

It should work as expected. I am using it in my site and it works perfectly.

torpy’s picture

Brilliant, thanks for this.

pol’s picture

You can now do this #1846860: Ability to add your own dynamic field types but I'm still unable to get it working, so while I wait for a reply, I use this.

I have added in my schema.xml this:

<!-- Company customisation -->
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="50" side="front"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="50" side="back"/>
<!-- End of Company customisation -->

And it's working perfectly.

More info on this: http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.EdgeNGr...

OanaIlea’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This issue was closed due to lack of activity over a long period of time. If the issue is still acute for you, feel free to reopen it and describe the current state.