Pick up other records along with coordinate search

I have a query that searches for proximity using setAroundLatLng and setAroundRadius.
It Works very well. Now there are records that I need to get back together, regardless of location. Type “sponsored or advertising records”.
That is, the filter for this “advertising” field has to have higher priority than the location filter.

new com.algolia.search.save.Query ("")
.setAroundLatLng (new AbstractQuery.LatLng (lat, long)
.setAroundRadius (radius)
.setFilters (“advertising: yes”)

How to solve this?

Hi there,

You may find it necessary to change the order of the default 8 ranking criteria (geosearch & attribute):

Keep in mind that doing so may have side effects to other queries, but if GeoSearch is always less important than the advertising attribute doing so may be ideal for your use-case.

You’ll do this on the Index → Configuration → Ranking and Sorting tab


Let me know how it goes and if you have further questions.