Search is finding features in layers that are off and that are filtered out
Hi,
I'm seeing that search is returning not only features in layers that are off, but also records that are filtered out by definition queries! This pretty much makes the search useless when queries/filters are applied to the layers, since it returns so many results that are not for the data shown in the map.
Is there some way that search can just show what is actually in the current layers, and in the ones that are on? Wouldn't this be the primary use case?
thanks
Rob
-
Querying and global search have always worked on layers whether or not they're visible. I assume that's because they're attribute queries, so the spatial state of the layer is irrelevant.
For filters, I recommend using the Filter Workflow option on the layer in GE instead of setting a Definition Query in ArcMap. Performance is generally better, and then those records will be completed excluded from the site.
0 -
I realized that when indexed instant search is turned on, the search returns all features, even those filtered out by definition queries. However with regular map service search it only returns features that will show after the definition query is applied.
However I'm interested by the Filter Workflow which I've never used before - thanks for the hint on that John. I'm researching that now and from what i can tell, it designed to run whenever a layer is turned on? I looked at the Layer filter workflow example and it appears to have an output argument of the where clause which I suppose the layer uses when it sends the request. This makes sense for individual layer filters but it says to apply the filter workflow at the map service level if it's a dynamic service. I don't understand how it knows which layers to filter with the where clause if it's at the map service level.
I'd really like to use the filter workflow rather than definition queries as sometimes there is a huge amount of data and I think performance would really benefit in my case to not using a definition query. However another complication is that the where statement needs to pull from the selected item in a combobox, then refresh the map. So my workflow currently pops open the form, presents comboboxes which the user selects and then applies the definition query to the layers I want filtered and refreshes the map. How to I use the layer filter workflow method (so the where clause is actually in t he map service request) from combobox selections?
Also, I've actually got a couple different workflows via a couple different buttons that filter different layers. So for example button one runs a workflow to filter layers 1-5 in a service and then button 2 runs a workflow to filter layers 6-10.
Any help on this is massively appreciated!
0 -
A layer filter workflow restricts access to records when the site loads the same way a definition query does when you publish a service. The examples LG gives is for restricting access to certain records in a layer based on the user that logs in, but you can also just restrict access for everyone.
If you want to hide records AFTER the site loads, then you're back to building a workflow. In that case, you can use the SetLayerDefinition activity to write a definition query for the layer and apply it. That process would probably work because you could present all of the field values in a combobox, get user input, and then build the layer definition off of that and refresh the map. The other nice thing about that method is then you can also clear the definition and do a new one without having to refresh the page.
In both cases, layer definitions apply to individual layers. I'm not sure what the documentation diction is getting at, but in both activities you have to set an individual layer ID.
0 -
Hey John, what you're now suggesting is in fact how my workflows currently work. I have a form that pops open with one or more comboboxes (populated by SQL views usually), and then after those are selected, a definition query is applied to certain layers.
But when you mentioned the layer filter and I read about it, it said that it actually inlcuded the where clause in the service request, which I would assume would be much more effecient than the service sending the entire dataset and then having the definition query applied in Geocortex. I was excited by this prospect since I do have a couple maps where there is so much data (with thousands of possible combobox selection combinations) where the def queries drastically reduce the data points shown, however it does still take a while to load for the heavier maps.
But from what I can tell, the layer filter can't be applied after the site is loaded? So the service couldn't be requested again with the where clause applied and refresh the map? If that's the case then I guess I have to keep using the definition queries. I would need to do that because the selections need to be applied multiple times in a session.
Perhaps another possible way to deal with massive datasets is to edit a SQL table somehow in Geocortex, which is the source of an inner join, restricting data served up by SQL server (which feeds into the map service). However I don't know yet if there is a way to edit a (non-spatial) SQL table in Geocortex somehow...
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare