The issue was in SelectContent:525, before sending request to server, we do:
if (query)
{
query = '*' + query + '*';
}
so as to benefit from wildcard characters with the SEARCH query (on title_txt_fr) and match "Article" if the widget contains "Art" for example (to return all documents beginning with the widget content).
But with this strategy, the dash character broke the search and a search with "foo-bar" generates the following query: title_txt_fr:(*foo-bar*) and the document "foo-bar" does not match.
So I propose to generate the following query: title_txt_fr:(*foo* *bar*), which can be done with the following code:
if (query)
{
query = query.split(/\W/) .filter(function(w) {return w.length > 0})
.map(function(w) {return '*' + w + '*';})
.join(' '); }
Consequently, delimiters are purely ignored and cannot be searched ('-', '*', '+', '.', etc.), but it is really a problem ?
What's your opinion ?
Be careful, the ReferenceTableSearchUIModel class should be take into account. It is used to generate search model for reference table dynamically.
If the "title" with like operator have to be added, it should be added here too. SelectReferenceTableContent use this dynamic search model.
Be aware also of the all parameters which to not use the default model "select-content". For exemple, in ODF, to select ODF person, this is the "select-person.xml" search model which is use. Do necessary modifications.