Wildcard search in Solr

后端 未结 2 1066
难免孤独
难免孤独 2021-01-12 19:09

I am having a problem doing wildcard searches in lucene syntax using the edismax handler. I have Solr 4.0 nightly build from the trunk.

A general search like \'comp

相关标签:
2条回答
  • 2021-01-12 19:51

    With edismax, leading wildcards are no problem. I just retested it.

    Wildcards in middle of term are no problem either.

    Looks like there is something else wrong. Are you sure you are using edismax?

    0 讨论(0)
  • 2021-01-12 19:54

    Leading wildcard won't work unless you activate the reverse string filter. To use it in Solr, add a ReversedWildcardFilterFactory to the analyzer of the field that you want to search with a leading wildcard.

    As for your other queries that return 0 result, try using luke to see how your terms are being analyzed (stored in the index). Don't forget to take into account the effect of stemming, if you are using it.

    0 讨论(0)
提交回复
热议问题