1
If I search for a piece of a word other than the first characters of the word he doesn’t think. Like if I search for "Car" it searches correctly, but now if I search for "los" or "arlos" returns me empty.
I have in the Client table:
id name
1 Carlos da Silva
2 Tiago Casanova
3 Pedro Gomes
On my model:
searchable do
text :name
end
On the controller:
@clients = Client.search do
fulltext params[:search]
paginate :page => params[:page] || 1
end
In my schema.xml
<fieldType name="text" class="solr.TextField" omitNorms="false">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EdgeNGramFilterFactory" minGramSize="1" maxGramSize="15" />
<filter class="solr.PorterStemFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory" />
</analyzer>
</fieldType>