0

I would like to do a wildcard query with the following configuration in the schema.xml

<fieldType name="textGeneral" class="solr.TextField" sortMissingLast="true" positionIncrementGap="100">
    <analyzer>
        <tokenizer class="solr.KeywordTokenizerFactory" />
        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" preserveOriginal="1"/>
        <filter class="solr.LowerCaseFilterFactory" />
    </analyzer>
</fieldType>

The data i would like to find is the The Frick Collection, New York.

When I do the following query q=image_copyright:"frick collection," everthing works great.

But when I try to add wildcardsearch q=image_copyright:"*ck collection," I dont get any results.

Does anyone know how to do this with the NGram Tokenizer who slows up indexing time.

Edit 2012/04/19 I realized that you can do something like this. q=image_copyright:*ck?collection,* But this not 100% correct

sandrozbinden
  • 1,577
  • 1
  • 17
  • 28

2 Answers2

2

Solr 4.8 added support for "Complex Phrase Queries", which include quoted wildcards.

Flexo
  • 87,323
  • 22
  • 191
  • 272
Yonik
  • 2,341
  • 1
  • 18
  • 14
1

this is the well known issue of wildcard queries not being analyzed see here.

As of 3.6.0, recently released, this should be fixed

Persimmonium
  • 15,593
  • 11
  • 47
  • 78