Open timwis opened 9 years ago
Look like some of the quote above got mistakenly read as HTML markdown. Here's what it should say:
Description: A literal search text. If the layer has a display field associated with it, the server searches for this text in this field. This parameter is a short hand for a where clause of: where <displayField> like '%<text>%'. The text is case sensitive. This parameter is ignored if the where parameter is specified.
But anyway, does your feature service have a Display Field specified?
I'll ask around whether ArcGIS Online supports this. Offhand, I'm not entirely sure myself how to set the display field.
Also, to avoid any confusion, text
is not meant to search all text fields, merely the display field.
Hey @nixta! Yes I imagine the feature services would have display fields set. I guess the real problem is that there's no way to search all text fields. I suppose if we knew what the fields where, we could construct a where clause that checks all of them, ie. where=a=x or b=x or c=x or d=x
etc. though that would require us to query the API first to get a list of all the fields.
Hi @timwis, yeah, you'd query the end point to get the list of fields and could filter out the string ones and build a where clause using LIKE
and OR
.
Socrata uses $q. Geoservices documentation has a param
text
described as:Doesn't sound like it. Using
CONTAINS()
inwhere
may be possible, but this post suggests (a) it may not be, and (b) you have to specify the field to search on