Alfresco SOLR4 not giving results if I use wildcard search on a text field having comma separated numbers

随声附和 提交于 2020-03-25 21:59:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!