It is really not fixed. It could also be *-*-BAAN or BAAN-CAN20-*. In each
i just want only the fixed character(s) to match then the * can match any
character.


On Wed, Oct 10, 2012 at 2:05 PM, Toke Eskildsen <t...@statsbiblioteket.dk>wrote:

> On Wed, 2012-10-10 at 14:15 +0200, Kissue Kissue wrote:
> > I have added the string: *-BAAN-* to the index to a field called pattern
> > which is a string type. Now i want to be able to search for A100-BAAN-C20
> > or ZA20-BAAN-300 and have Solr return *-BAAN-*.
>
> That sounds a lot like the problem presented in the thread
> "Indexing wildcard patterns":
> http://web.archiveorange.com/archive/v/AAfXfcuIJY9BQJL3mjty
>
> The short answer is no, Solr does not support this in the general form.
> But maybe you can make it work anyway. In your example, the two queries
> A100-BAAN-C20 and ZA20-BAAN-300 share the form
> [4 random characters]-[4 significant characters]-[3 random characters]
> so a little bit of pre-processing would rewrite that to
> *-[4 significant characters]-*
> which would match *-BAAN-*
>
> If you describe the patterns and common elements to your indexed terms
> and to your queries, we might come up with something.
>
>

Reply via email to