You need to sign in to do that
Don't have an account?
Jonathan Wolff 7
Way to find similar results in Search Component Apex
Hello, I made a Search component, which querys on my object "Mediatheken".When I enter 'Pension' I do get results but if I try something similar like ' Pensio' or 'Pens' I do not get these results. Could you tell me if there is a possibility to find answers that are near to the entered text.
My Apex code:
public class MediathekSearchController {
@AuraEnabled(cacheable=true)
public static List<List<sObject>> getSearchResult(String searchKey){
List<List<sObject>> searchResult = [FIND : searchKey
IN ALL FIELDS RETURNING
Mediathek__c (Id, Name, Bezeichnung__c, Typ__c, Zielgruppe__c, Umfang__c, Bezeichnung_Link__c, Bezeichnung_Search__c)
];
return searchResult;
}
}
My Apex code:
public class MediathekSearchController {
@AuraEnabled(cacheable=true)
public static List<List<sObject>> getSearchResult(String searchKey){
List<List<sObject>> searchResult = [FIND : searchKey
IN ALL FIELDS RETURNING
Mediathek__c (Id, Name, Bezeichnung__c, Typ__c, Zielgruppe__c, Umfang__c, Bezeichnung_Link__c, Bezeichnung_Search__c)
];
return searchResult;
}
}