问题
I am using SOLR4 along with Alfresco 5 application
I have a text field called field1 with value : 71,72,73 If I search for @field1:72 I get the results. But if I search for @field1:*72* I am not getting results.
What changes I need to do in the configs to get the results.
I have below configurations set on my schema.xml
<fieldType name="text___" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.ICUTokenizerFactory"/>
<filter class="org.apache.solr.analysis.WordDelimiterFilterFactory"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="1"
splitOnCaseChange="1"
splitOnNumerics="1"
preserveOriginal="1"
stemEnglishPossessive="1"/>
<filter class="solr.ICUFoldingFilterFactory"/>
</analyzer>
</fieldType>
UPDATE : After further analysis this looks to me a limitation of minimum number of characters that SOLR accepts for searching. If I use more than 2 characters I can get the results. For example in the above
@field1:*72,* Gives me the results. If I use just asterisk then also it works but not if I use 1 or 2 characters like 7* or 72* won't work.
UPDATE 2 : This time I tried with a text field having values "123456". If I search for 1* 12* 123* 1234*
I am not getting results. But I can get the results only if I give 12345* I can also get results if I give 123456*
I am sure this worked fine in older solr version 4.9 but broken in 4.10
来源:https://stackoverflow.com/questions/60182835/alfresco-solr4-not-giving-results-if-i-use-wildcard-search-on-a-text-field-havin