marc tobias
47bb49384e
Vagrant documentation: update path to php tests
2017-10-21 11:46:12 +02:00
Sarah Hoffmann
fcf7fcee03
Merge pull request #814 from lonvia/phrase-as-a-class
...
Make phrases a class and add early checking of token validity
2017-10-15 18:07:55 +02:00
Sarah Hoffmann
5c18d6865d
adapt unit tests to new Phrase class
2017-10-14 20:45:20 +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
7ea1ef3feb
take country names only from relations
2017-10-12 21:03:03 +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
97bc185152
Merge pull request #812 from lonvia/search-as-a-class
...
Refactoring Search arrays
2017-10-10 21:08:11 +02:00
Sarah Hoffmann
c8780da19c
documentation for SearchContext and SearchDescription
2017-10-10 00:15:56 +02:00
Sarah Hoffmann
c02bf4986f
coding style and some documentation
2017-10-09 23:13:04 +02:00
Sarah Hoffmann
9a5d5d9aec
move complete search query code into SearchDescription
2017-10-09 22:55:50 +02:00
Sarah Hoffmann
2c62a8dbbc
adapt phpunit tests to new SearchContext class
2017-10-09 22:11:46 +02:00
Sarah Hoffmann
55629a4891
move country list to SearchContext
2017-10-08 23:33:54 +02:00
Sarah Hoffmann
907133a38c
move excluded place list to SearchContext
2017-10-08 23:15:06 +02:00
Sarah Hoffmann
86c0858130
move viewbox sql to new SearchContext
2017-10-08 22:44:01 +02:00
Sarah Hoffmann
30511fd3ab
replace NearPoint with a more generic context object
...
The NearPoint is actually common to all SearchDescriptions
and there is other context data as well. like viewbox, that
needs to be available to the search object but is common.
2017-10-08 21:23:31 +02:00
Sarah Hoffmann
614a6ab861
don't trust words from word table to be sanatized
2017-10-08 17:36:38 +02:00
Sarah Hoffmann
4bff2814a9
add missing include
2017-10-08 17:13:41 +02:00
Sarah Hoffmann
8e0ffde3e0
fix CodeSniffer violations
2017-10-08 17:00:59 +02:00
Sarah Hoffmann
795153b213
fix more syntax issues
2017-10-08 16:42:04 +02:00
Sarah Hoffmann
fd08d41962
move Search dump function into SearchDescription class
2017-10-08 16:05:27 +02:00
Sarah Hoffmann
75e35f3832
fix syntax errors from introduction of SearchDescription
2017-10-08 15:26:14 +02:00
Sarah Hoffmann
16268f92cc
convert getGroupedSearches to SearchDescription class
2017-10-08 12:57:22 +02:00
Sarah Hoffmann
d72c863353
add function to convert array to SQL
2017-10-08 10:06:17 +02:00
Sarah Hoffmann
96b6a1a418
use SearchDescription class in query loop
2017-10-08 09:54:12 +02:00
Sarah Hoffmann
0067555c38
move initial search setup to new class type
2017-10-07 12:24:21 +02:00
Sarah Hoffmann
77d4453334
add new class for searches
2017-10-07 12:24:21 +02:00
Sarah Hoffmann
c563c2bfec
drop searches with excluded country codes earlier
2017-10-07 12:23:46 +02:00
Sarah Hoffmann
266153f218
remove code for dropping address terms
...
This code has been inactive in quite a while and is a suboptimal
solution. We need to be much more selective in what gets dropped.
2017-10-07 11:53:33 +02:00
Sarah Hoffmann
73e737d775
fix variable names
2017-10-06 22:01:52 +02:00
Sarah Hoffmann
5029101048
further restrict use of partial terms in names
2017-10-06 21:36:28 +02:00
Sarah Hoffmann
0c9a241487
housenumbers may only appear before or after the name
2017-10-06 21:16:35 +02:00
Sarah Hoffmann
41d2cd318d
penalize search order where a country comes first
2017-10-06 21:07:33 +02:00
Sarah Hoffmann
0d2cdb5c2f
allow postcodes and housenumbers together
...
Fixes #805 .
2017-10-06 20:48:35 +02:00
Sarah Hoffmann
f8d55b5448
sanitize special search term before normalizing
2017-10-06 00:22:27 +02:00
Sarah Hoffmann
00a3a8834b
fix postcode search
...
Name token must be fully replaced with the postcode and
postcode search must be done only once.
2017-10-04 23:33:29 +02:00
Sarah Hoffmann
32f6ddf6db
only allow either postcode or special search
...
Fixes #804 .
2017-10-04 20:15:06 +02:00
Sarah Hoffmann
1220ff5da6
use correct source for radius column in debug view
2017-10-04 20:14:35 +02:00
Sarah Hoffmann
89c576fbe1
tests: more coverage for all API endpoints
2017-10-04 00:05:34 +02:00
Sarah Hoffmann
e276ec2e94
Merge pull request #803 from lonvia/update-postcodes
...
Add script to update table with artifical postcode centroids
2017-10-03 16:28:22 +02:00
Sarah Hoffmann
bafbf679b6
add script for updating postcodes
2017-10-03 15:58:14 +02:00
Sarah Hoffmann
8e2ef2842e
move psqlRunScript implementation into cmd lib
...
Function needed for update.php as well.
2017-10-03 14:26:59 +02:00
Sarah Hoffmann
218b70fd96
test: remove road-fallback test from db tests
...
This should be tested in the api section.
2017-10-03 14:26:08 +02:00
Sarah Hoffmann
e3323e8888
fix search for postcode via structured query
...
Results from the artifical postcode table were dropped
when reevaluating rank of results.
2017-10-03 12:10:27 +02:00