W
W
webscout2010-11-15 06:26:37
MySQL
webscout, 2010-11-15 06:26:37

Sphinx and related tables

DBMS MySQL.
There are 2 plates: companies (company) and addresses (adress).
They are connected by a one-to-many relationship. — i.e. One company can have multiple addresses.

Each address has coordinates: x, y (stored as a float).

I want to find companies whose addresses are in a certain rectangular area (that is, x and y must be in a given range).

Also, some restrictions on companies are needed (I figured it out), so I use a plate for the index with companies, not addresses.

This is exactly what will not work:
- sql_attr_multi will not help - it can only work with uint, timestamp types
- sql_joined_field works only with text.

It remains only to cut off 3-4 characters from x, y and convert them to integer, and then use sql_attr_multi - but I really don’t want to do this.

However, is there any alternative way? I've only been familiar with sphinx for 1 day, so I don't know all its features.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MuXaJIbI4, 2010-11-15
@MuXaJIbI4

filterRange?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question