Sarah Hoffmann
5c8fbe8186
Merge pull request #941 from mtmail/parameter-parser-tests2
...
PHP tests for ParameterParser
2018-03-06 23:25:20 +01:00
marc tobias
3ef4c4fbe7
ParameterParser: getStringList removes empty strings
2018-03-06 14:51:48 +01:00
marc tobias
47258f40ea
ParameterParser: getFloat with empty string value throws exception
2018-03-06 13:35:27 +01:00
marc tobias
123a3c0347
ParameterParser: getInt with empty string value throws exception
2018-03-06 13:33:19 +01:00
Sarah Hoffmann
f23a860b33
second attempt at strict names in structured queries
...
If a term does not go into names it should go into
address terms.
2018-03-02 00:26:48 +01:00
Sarah Hoffmann
df008d99f5
do not allow importance to become 0
...
Importance is weighed against a viewbox factor which disappears
when the importance is 0.
Fixes #930 .
2018-03-01 22:37:45 +01:00
Sarah Hoffmann
fd920fba9b
for structured search only accept name terms from the first phrase
...
Fixes #952 .
2018-03-01 22:35:34 +01:00
Marc Tobias Metten
8a615ad969
phpcs fixes. Mostly spacing and single quotes
2018-02-23 01:16:01 +01:00
Edward Betts
7e00a6e2ff
Correct spelling mistakes.
2018-02-18 13:11:35 +00:00
Jonas Hantelmann
a489ac07cd
PlaceLookup::getAddressDetails() should be public, restore default values
...
PlaceLookup::getAddressDetails() is also used within the hierarchy.php
file so it must not be private.
2018-02-12 11:21:05 +01:00
Sarah Hoffmann
3505417e3f
Merge pull request #905 from mtmail/illinois-li-case-insensitive
...
make sure Illinois,Alabama,Louisiana state code special handling is case insensitive
2018-02-10 15:50:42 +01:00
Sarah Hoffmann
29e78780e5
Merge pull request #909 from mtmail/decimal-coord-parsing-with-sub-seconds
...
parsing coordinates allows second with floats
2018-02-10 15:49:48 +01:00
marc tobias
e428019170
typo in error message
2018-02-08 18:02:19 +01:00
marc tobias
5042be1b72
parsing coordinates allows second with floats
2018-02-08 17:45:43 +01:00
Marc Tobias Metten
315713ff9a
make sure Illinois,Alabama,Louisiana state code special handling is case insensitive
2018-02-07 00:48:18 +01:00
Sarah Hoffmann
13469e1576
convert remaining http links and shorten copyright URL
2018-01-11 23:05:28 +01:00
Sarah Hoffmann
c7b903f4b0
assume name for special operator in bounded search
...
With bounded=1 we already have a restricted area, so it does
not make sense to interpret the query as a near search.
Fixes #311 .
2017-12-17 23:50:16 +01:00
Sarah Hoffmann
cdfa31c390
Gives preference to special terms like postcode and housenumber
...
Fixes #846 .
2017-12-17 20:23:34 +01:00
Sarah Hoffmann
b94229fb8e
Give higher penalty to partial search terms
...
Avoids that the interpreation of a term as partial term
is ranked higher than as a special term like postcode
or house number.
Fixes #847 .
2017-12-17 16:00:44 +01:00
Sarah Hoffmann
ed85388de5
fix address walk-up for reverse
...
Fixes the row for the join and completely drops parts that have
a linked_place_id.
Fixes #859 .
2017-12-15 00:10:05 +01:00
Matej Krajčovič
fcba2eabc4
Fix typos in introduction.php
2017-10-30 12:36:20 +01:00
Sarah Hoffmann
8d91a88b22
allow unnamed roads for reverse geocoding
...
Should avoid that results are too far off in areas where
most roads are unnamed.
2017-10-27 20:10:32 +02:00
Sarah Hoffmann
f7258e314d
ignore linked places for reverse geocoding
...
Fixes #838 .
2017-10-27 20:06:53 +02:00
Sarah Hoffmann
6c1977b448
replace double-quoting with single quotes where applicable
2017-10-26 21:40:33 +02:00
Sarah Hoffmann
adbbb1ce02
restrict number of results for reverse queries
...
When given a coordinate off the coast of a large town, the entire
town may end up in the potential results during the reverse query.
Postgres then needs to sort tens of thousands of results before it
can determine the clostest one. Given that the results at such a
large search radius are bound to be imprecise anyway, restrict
the number of results postgres should consider to 1000.
2017-10-25 22:34:29 +02:00
Sarah Hoffmann
f78d094483
fix variable typo when filtering results
...
Fixes #830 and #832 .
2017-10-25 20:25:23 +02:00
Sarah Hoffmann
7eeb79ce67
placex must not return a lookup housenumber
2017-10-25 20:11:51 +02:00
Sarah Hoffmann
7caa67d8ec
penalize housenumber after the postcode
2017-10-24 23:30:41 +02:00
Sarah Hoffmann
919b1b42fa
fix uninitialised rank variable when regrouping searches
2017-10-24 23:17:47 +02:00
Sarah Hoffmann
760807c5e0
revert use of global penalty for a search direction
...
Adding a penalty to a search description because there
is a term at the beginning which looks like a country
turned out to be a bad idea as there are too many
abbreviations around that match against frequently
matched words.
2017-10-24 22:42:29 +02:00
Sarah Hoffmann
282c6777ee
use PlaceLookup::loadParamArray in search and lookup
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
9981d74ee1
add loadParamArray function to PlaceLookup and use for reverse
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
1a4506f6ab
use PlaceLookup in search
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
914caab43d
make PlaceLookup::lookup() accept multiple results
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
5eb11800a7
replace SQL code in PlaceLookup with content of search's get_details
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
1424e8e29b
use Result class in reverse geocoding
...
Also simplifies the reverse algorithm slightly by no longer
having an additional distance lookup.
2017-10-23 23:30:53 +02:00
Sarah Hoffmann
42f079c355
introduce Result class in Geocode and SearchDescription
2017-10-23 23:30:53 +02:00
marc tobias
2361ca2c71
UI: allow copy&pasting lat,lon into the lat search field
2017-10-21 14:28:28 +02:00
marc tobias
3cee2d185d
UI: allow copy&pasting lat,lon into the lat search field
2017-10-21 14:11:46 +02:00
marc tobias
da4a2b7b6e
UI: scrollwheel, minimap
2017-10-21 13:24:02 +02:00
Sarah Hoffmann
cdf8c67898
fix CodeSniffer offences
2017-10-13 23:11:09 +02:00
Sarah Hoffmann
00265af528
move word recheck into token collection
...
Drop tokens for special and postcode searches already when
collecting them for ValidTokens when they cannot be found
in the normalized query.
2017-10-13 23:04:12 +02:00
Sarah Hoffmann
77b76ae51b
simplify cross-check of country tokens
...
Drop country tokens that do not match the country code list
early. Remove in turn the special country code check for
structured phrases. It is sufficient to do this during
word list building.
2017-10-13 22:23:39 +02:00
Sarah Hoffmann
9ef2370a2a
remove unused $aPossibleMainWordIDs array
2017-10-13 21:34:13 +02:00
Sarah Hoffmann
c700421aa7
add documentation for Phrase
2017-10-13 21:23:45 +02:00
Sarah Hoffmann
77abe882ab
take frequency scores from token description
...
No need to hand them in separately.
2017-10-12 22:59:07 +02:00
Sarah Hoffmann
023f94b066
convert phrase array to class
2017-10-12 22:37:44 +02:00
Sarah Hoffmann
df463f4ea6
Show address rank in details and hide unset admin_level
...
Address rank explains better why the address parts are where
they are.
Fixes #766 .
2017-10-11 22:17:59 +02:00
Sarah Hoffmann
3da4c9c384
Sort results for near searches by proximity
...
If a reference coordinate is given, results really should be
sorted by distance to this point ignoring importance completely.
Fixes #796 .
2017-10-10 23:03:28 +02:00
Sarah Hoffmann
c8780da19c
documentation for SearchContext and SearchDescription
2017-10-10 00:15:56 +02:00