Support Topics Documentation Slack YouTube Blog

Search for geo points in all categories

(Bbhh) #1

I wish to get all points in a rectangular area regardless of category.

When querying, if I leave the categories parameter, search is performed on the Default category which in my app is empty.

I cannot just construct a concatenated string of all my categories. Currently a few dozen and eventually several hundred)

How can this be done?

(Kate Maksimenko) #2

You can get all categories with request:

-H application-id:[url=]application-id-value-from-console[/url]
-H secret-key:[url=]secret-key-value-from-console[/url] 
-H application-type:REST 

And add them into search query, where categories separated by comma:

(Bbhh) #3

Thanks I see it will work.

Is there a maximum limit on the number of categories you recommend? I would like to have hundreds of categories. With that the query URL will be very very long.

(Kate Maksimenko) #4

There are some standards\limits:

and here:

If you see limits on the our side - we can change them due to your demands.

(Mark Piller) #5

Hi Bbhh,

Out of curiosity, how do you intend to use categories in your application? What is the logical meaning of a category for you? Perhaps there is another way to group the geo points. For example, you could keep all the points in the same category and group them through a special metadata property. For instance “groupName=XXX”.



(Bbhh) #6

Hi Mark I would like to categorize for example by different types of offices, shops, restaurants, and more. Yes I agree it’s more proper to just have these less than a dozen categories, with relevant metadata such as law=immigration, fashion=hipster, resaturant=thai,

I was not planning the above because I was guessing
is still in the works if I want to search category law with partial metadata law=immigration.


(Mark Piller) #7

Hi Bbhh,

Relative search is supported, though the doc is missing. Based on what you described, I would recommend going with fewer categories and richer metadata. I think that would work much better for you.

In your searches you can reference as many metadata properties and express your queries in a SQL format (the where clause part). Please let me know if you need any help with the syntax for the geo queries. Something you could do is add geo points to Backendless and then use code generation for JavaScript to play with your own data. The generated project makes it very easy to introspect geo storage with queries and see how they work.


(Bbhh) #8

Hi Mark

That’s wonderful perhaps I can be referred to an example of partial metadata search match with the REST api?


(Mark Piller) #9

Hi Bbhh,

When you say “partial metadata”, do you mean a search for only some metadata properties? If not, please clarify.

Here’s the doc for REST search requests in radius:

and in rectangular area:

The example in the latter performs a search for the following metadata:

{“Cuisine”:“French”, “Atmosphere”:“Romantic”}

curl -H application-id:application-id-value-from-console-H secret-key:secret-key-value-from-console -X GET -v “{“Cuisine”%3A"French"%2C%20"Atmosphere"%3A"Romantic"}

Alternatively, you could use the SQL syntax to express metadata search:

Cuisine = ‘French’ and Atmosphere = ‘Romantic’

curl -H application-id:application-id-value-from-console-H secret-key:secret-key-value-from-console -X GET -v “’French’%20and%20Atmosphere%20%3D%20’Romantic’