Unwanted wildcards in contact search

With the default settings in Spark, you have to use wildcards if you only want to search for the last part of a name. For example: A search for Michael Jackson gives a result with “*Jackson”. But no results are shown if only “jackson” is entered.

Is it possible to make a change to the configuration that enables our users to search for other contacts without using wildcards? And if it is possible, which changes are needed?

Hi,

if you want to do this within the server you may violate the XMPP protocol. The source code for the search plugin is available within the Openfire search code. Modifying all queries to surround them with wildcards should be a minor code change.

One could even use an Openfire property xmpp.violations.wildcardsearch=true or something like this so one can enable and disable it.

LG

Hi,

Thank you for answering my question. May I ask two quick questions to see if I understand you correctly…

Modifying the queries of the search plugin will enable us to search for users without having to enter wildcards manually?

And placing wildcards around the queries in the search plugin is not a violation of the XMPP protocol?

Thans in advance,

Patrick

Hi Patrick,

modifying the queries within the search plugin may violate the protocol but as you will likely do this for a private server this should be no problem. Only if you want to submit this as a patch for the existing search plugin you may want to make clear that this option changes the standard Openfire search behavior and much more results are returned.

XEP-0055 contains no information about wildcards.

Changing it in the Openfire search plugin allows you to use Spark or any other client without modification.

LG