I don't believe you can. If you just need query-time transformation, can't you just do it in your client app? If you need index-time transformation... well, you can do that, but it's up to your schema.xml and will of course apply to the field as a whole, not just for termscomponent queries, because that's just how solr works.

I'd note for your example, you'll also have to lowercase that capital A if you want it to match a lowercased a in a termscomponent prefix query.

To my mind (others may disagree), robust flexible auto-complete like this is still a somewhat unsolved problem in Solr, the termscomponent approach has it's definite limitations.

On 12/2/2010 12:24 PM, Nestor Oviedo wrote:
Hi everyone
Does anyone know how to apply some analyzers over a prefix query?
What I'm looking for is a way to build an autosuggest using the
termsComponent that could be able to remove the accents from the
query's prefix.
For example, I have the term "analisis" in the index and I want to
retrieve it with the prefix "AnĂ¡li" (notice the accent in the third
letter).
I think the regexp function won't help here, so I was wondering if
specifying some analyzers (LowerCase and ASCIIFolding) in the
termComponents configuration, it would be applied over the prefix.

Thanks in advance.
Nestor

Reply via email to