actually, it isn't possible to define a tokenizer on a string field,
therefore you should use custom TextField.

To enable the wildcards:

1. trailing wildcard prepa* should work off the shelf
2. leading wildcard *test can be enabled with the following filter (with
our own settings, entire filter has been dropped due to caution below):

<!-- add this after you tokenizers -->
<filter class="solr.ReversedWildcardFilterFactory" withOriginal="true"
maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>

caution: this may potentially double your index in absolute count of
tokens, but with solr4's compression it can be acceptable.

The reason to reverse the tokens for a leading wildcard search is that
without this solr would need to scan the entire dictionary of terms in
order to find suffix matches. And with reversing you need to scan only the
suffix's subset of reversed tokens.

HTH,
Dmitry




On Thu, Oct 3, 2013 at 11:06 AM, soumikghosh05 <soumikghos...@yahoo.co.in>wrote:

> I want to store the below string into Title field.
>
> this is a test title prepared for solar wild card query.
>
> I want to query the it with the below string.
>
>  *test title prepa*
>
> What type of field type I should use? (string or TextField) and what type
> of
> tokenizer I should use?
>
> what would be my query syntax?
>
> I am very new to Solr. Any help or suggestion would be great help for me.
>
> Thanks in Advance,
> Soumik
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Wild-card-on-field-search-tp4093272.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to