I have create a custom HTML page for find existing location using ArcGIS API . Following this link https://developers.arcgis.com/javascript/3/jsapi/findexistinglocations-amd.html#portalurl
The API code is able to find attribute and spatial query from existing feature layer . But my feature layer size is too large and I want to find the intersect of only selected target feature in feature layer.