Pregunta

Is it possible in XSLT to search and find content, even though the content is misspelled or the words splitted up - even though it shouldn’t?

Example:

I need to find a webshop called bearshop.com, but I search it like this “bear shop”. This will end in a “no results”.

Another example:

I search “progresive” but the right word was “progressive”, and this will end in a “no result” as well.

The most important part is the first example, where the search can be written with or without white spaces and still find the content. Hope someone can help me or lead me in the right direction :)

Kind regards,

Niels

¿Fue útil?

Solución

If you are looking for a general way of matching similar words, this is often called fuzzy search and can quite easily be done with Umbraco and Examine.

There may even is a way to use this with XSLT, though I never tested that.

Otros consejos

Assuming XSLT/XPath 2.0 you can use //foo[matches(., 'bear\s*shop')].

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top