Subscript matches within SOLR

I can't figure out how to find subscript matches with SOLR, I figured out prefix matching so I can get ham to fit hamburgers.

How can I find a β€œburger” to fit a hamburger? I tried a hamburger, but it threw the error '*' or '?' not allowed as first character in WildcardQuery.

How can I combine substrings using SOLR?

+7
substring search solr edismax
source share
3 answers

You can enable this, but it will be very resource intensive (e.g. search for SuffixQuery).

See: http://lucene.472066.n3.nabble.com/Leading-Wildcard-Search-td522362.html

Mailing List Quoting: Work Around? Imagine creating a second index (or adding another field) with all the conditions written back.

=>

See Add ReverseStringFilter https://issues.apache.org/jira/browse/LUCENE-1398

and support for efficient wildcard searches: https://issues.apache.org/jira/browse/SOLR-1321

At the moment, the problems .apache.org seems empty. Try using for example. Google cache.

+3
source share

If someone gets here after searching for the "apacheolr substring", there is a simpler solution: https://drupal.stackexchange.com/a/27956/10419 (from https://drupal.stackexchange.com/questions/26024 / how-can-i-make-search-with-a-substring-of-a-word )

Add ngramfilter to the text type definition in schema.xml in the solr directory configuration.

<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <filter class="solr.EdgeNGramFilterFactory" minGramSize="3" maxGramSize="25" /> 
+9
source share

As indicated in the link above, you can use basic wildcards with edismax (ExtendedDismaxQParser). Just try to check if this is enough.

More information on the aforementioned reverseedstring can also be found here: solr.ReversedWildcardFilterFactory

+3
source share

All Articles