Dear Community,
I am developing a search and the search should operate only on two columns aka "name" and "alternate". the search widget as coded:
const source: any[] = [];
searchConfig.sources.forEach((sourceItem) => {
source.push({
layer: new FeatureLayer({
url: sourceItem.url,
outFields: ['*'],
}),
searchFields: ["name", "alternate"],
displayField: "name",
exactMatch: true,
outFields: ["name", "alternate"],
name: "source layer"
placeholder: "whoop",
suggestionTemplate: "Name: {name}",
maxResults: 5,
suggestionsEnabled: false,
});
});
const searchWidget = new Search({
view: stores.mapStore.mapView,
allPlaceholder: 'quickSearch',
sources: [],
searchAllEnabled: true,
locationEnabled: false,
includeDefaultSources: false,
});
searchWidget.set('sources', source);
Unfortunately the GET call also searches for the objectid:
GET HTTP://URL_TO_FEATURESERVER/1/query?f=pbf&maxAllowableOffset=1&resultRecordCount=1&where=(name = 68) OR (alternate = '68') OR (objectid = 68)&outFields=name,alternate,objectid&outSR=102100&spatialRel=esriSpatialRelIntersects&token=MYCOOLTOKEN I want to remove "objectid" from the fields to be searched. How can I do this?