Sarah Hoffmann
e115de47fc
use Debug class for formatting reverse debug output
2020-10-12 17:12:03 +02:00
Sarah Hoffmann
7d2b6879c8
restrict postcode searches to postcode in first token
...
In structured queries we should only assume that it is
a postcode search when only the postcode and optionally
the country is given. If any other term is present, it
is better to avoid the search for postcode as it yields
too many bad searches. Given that the terms in a structured
query are ordered, this means that the postcode must be
the first token just like in the unstructured query.
Fixes #1988 .
2020-10-06 14:08:31 +02:00
Sarah Hoffmann
1db8f7e353
add descriptive term for address rank 24
...
With that term we have terms for all ranks, so that no generic
'administrative' term will show up in the address details anymore.
2020-09-25 16:02:17 +02:00
Sarah Hoffmann
f8a5f2964f
remove dead code
...
The SQL query has moved into the addTokensFromDB() funtion.
2020-09-21 10:39:14 +02:00
Sarah Hoffmann
576ee5aaab
use same label for all types of postcode in address
2020-09-18 16:17:30 +02:00
marc tobias
7ac22e9227
starting PHP 5.4 get_magic_quotes_gpc() returns false, no need to check
2020-09-14 00:45:22 +02:00
Sarah Hoffmann
770754ae2c
place lookup: filter places that have no details
...
In rare cases search_name might have entries for places for
which we do not return details, in particular for linkees.
Need to remove those entries in the result list before returning
the details.
Fixes #1932 .
2020-08-27 09:33:21 +02:00
Sarah Hoffmann
72ee1abc90
ensure that ordering by importance is stable
...
The initial search results retrieved from the database already come
preordered, either by importnace or by distance. We want to keep
that order if all other things are equal.
2020-08-26 17:42:43 +02:00
Sarah Hoffmann
9e1909643c
PlaceLookup should return results in input order
2020-08-26 17:15:11 +02:00
Sarah Hoffmann
a4b30fc649
index admin boundaries before everything else
...
Avoids irregularities that might happen because the address
rank of a boundary is changed through linking.
2020-08-18 15:17:09 +02:00
Sarah Hoffmann
8cd9550295
implicitly connect to database during setup
...
Make access to the DB object a function, so that the connection
can be opened implicitly when the object is accessed for the first
time. This way we no longer need to check beforehand if a specific
function of the setup needs DB access or not.
Also move the check for the module to the relevant sub step.
2020-07-26 11:56:00 +02:00
Sarah Hoffmann
7429ff9dce
forgit to adapt info message
2020-07-18 12:14:51 +02:00
Sarah Hoffmann
29602fe0cf
Merge pull request #1874 from joy-yyd/rank_modification
...
House number search fix for #164
2020-07-18 12:12:37 +02:00
Sarah Hoffmann
3efe0dc8dc
move website settings back to settings/
...
We don't want the settings to become visible when a server is
accidentally configured wrongly.
2020-07-18 11:02:07 +02:00
Sarah Hoffmann
241e4af1b0
log file is a string when not set to false
2020-07-18 11:00:17 +02:00
(Joy) Yuanyue Ding
cac8a8df18
Modifiy the range of address_rank, fix for issue #164
2020-07-08 17:47:38 +02:00
Sarah Hoffmann
f376f45277
default language is a string when not set to false
2020-07-08 08:38:11 +02:00
Sarah Hoffmann
d364afdf3b
reenable debug parameter
...
The parameter got lost when switching to website settings.
Given that the use of a fixed parameter is limited,
debugging output can now only be set via the URL parameter.
2020-07-08 08:32:46 +02:00
Sarah Hoffmann
3a664dc676
reverse: ignore place nodes without an address rank
...
We already exclude all polygon places without an address
rank. place nodes should also be ignored. This removes
places like locality from the reverse results.
Fixes #1839 .
2020-07-05 15:38:49 +02:00
K Rahul Reddy
a3201be7e7
Moved settings-frontend to website/
2020-06-27 10:45:53 +05:30
K Rahul Reddy
6c406124dd
Added setup-website option
2020-06-27 10:45:51 +05:30
Sarah Hoffmann
4956f5e710
Merge pull request #1809 from lonvia/fix-display-names
...
Fix some glitches in choice of address tags
2020-05-27 21:28:17 +02:00
Sarah Hoffmann
e0d29f398e
each address line must fill at most one geocodejson field
...
This fixes an issue where a postcode with rank_address 5
would also appear in the state field.
2020-05-27 11:16:27 +02:00
Sarah Hoffmann
aa4bd00631
Adapt boundary labels for Sweden and Norway
...
This also gives us the correct labels for address output in
json and xml.
2020-05-23 16:19:27 +02:00
Sarah Hoffmann
cadbdaff18
fix style
2020-05-18 22:20:36 +02:00
Sarah Hoffmann
3a2ddbe2e0
encapsulate icon URL in a function
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
859347523f
also adapt uses of ClassTypes in website/
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
528fe6553f
adapt php tests
...
Also fixes some errors found by the tests.
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
1faa0f4d41
reorganise class/type information
...
Add a separate function for each property which saves necessary
information independently. Simplify computation of labels and
simple labels to not explicitly save the labels.
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
82a11cae2d
first draft
2020-05-17 16:46:45 +02:00
Sarah Hoffmann
9e2841ad44
search UI: hide unused query parameters
...
Only send query parameters relevant for the current query
type (simple/structured), hide the other input fields.
This is quite a bit of CSS state changing, so move the intial
setup of the input field states into Javascript.
2020-05-11 00:19:33 +02:00
Sarah Hoffmann
233e5f7c0e
show simple query field when no parameters are given
2020-05-10 23:52:53 +02:00
Sarah Hoffmann
d5d9445cfd
Fix PHP errors in structured HTML output
...
Correctly handle missing parameters.
2020-05-10 23:41:04 +02:00
galewis2
a5e3785843
Add simple/structured query selector to HTML search page ( #1722 )
2020-05-08 01:29:44 +02:00
Sarah Hoffmann
65ee7a8002
Merge pull request #1754 from mtmail/nominatim-db-tests-against-postgres
...
Nominatim::DB tests against separate postgresql database
2020-04-26 10:20:30 +02:00
marc tobias
a5d0657d9b
lonvia PR feedback
2020-04-26 03:33:15 +02:00
Sarah Hoffmann
0b0349f746
Merge pull request #1752 from mtmail/new-oo-shell-class
...
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-25 16:48:04 +02:00
Sarah Hoffmann
207efe700f
highway:construction should appear as 'road' in the address list
...
Fixes #1763 .
2020-04-22 09:08:33 +02:00
marc tobias
38c21de0ee
Nominatim::DB tests against separate postgresql database
2020-04-13 18:01:37 +02:00
marc tobias
fc40939775
new PHP Nominatim\Shell class to wrap shell escaping
2020-04-12 03:50:40 +02:00
Sarah Hoffmann
ef47515420
make admin levels 3 and 7 distinct ones in addresses
...
There really is no need to conflate these two levels as they
are in use in various countries.
Also adds province as a distinct place.
Fixes #1736 .
2020-04-10 22:58:11 +02:00
Sarah Hoffmann
a471a3d1b0
Merge pull request #1745 from lonvia/shuffle-sql-functions
...
Some more SQL function reorganisation
2020-04-10 17:23:09 +02:00
marc tobias
93ddd46231
Add JSON output for /deletable.php and /polygons.php
2020-04-10 15:34:56 +02:00
Sarah Hoffmann
f5f0c197be
move ranks-related functions in separate sql file
...
Also adds a common function for computing the update radius
around place nodes.
2020-04-10 11:34:14 +02:00
Sarah Hoffmann
a06ceeef4c
Merge pull request #1740 from mtmail/setupclass-index-outputfile-not-used
...
SetupClass.php: remove unused variable
2020-04-09 22:57:51 +02:00
marc tobias
c611d49941
SetupClass.php: remove unused variable
2020-04-08 14:16:06 +02:00
Sarah Hoffmann
11cd648699
remove name from geocodejson when not set
2020-04-08 11:19:43 +02:00
Sarah Hoffmann
29df9771bb
further tweaks to geocodejson address output
...
Removes the place itself from the address details and use
the lowest ranking element in the rank range for the output.
2020-04-08 11:11:33 +02:00
Sarah Hoffmann
e68c1132da
ignore isaddress in details output when it is not present
2020-04-08 10:28:28 +02:00
marc tobias
9431e80eb4
details JSON: also print isaddress addressline field
2020-04-07 14:50:41 +02:00