Diana Shkolnikov
74467e91e6
Update tests and fixtures
9 years ago
Diana Shkolnikov
ab5004273b
Fix unit tests due to new version of pelias-query
9 years ago
Julian Simioni
b4fb62f2c9
Test that src/backend passes correct config to elasticsearch
9 years ago
Peter Johnson
a4f6e70d25
upgrade to pelias-query@6.1.0
9 years ago
Diana Shkolnikov
aff146aec3
Fix local naming convention and confidence score middlewares
9 years ago
Diana Shkolnikov
e17b940136
Compute extent bounding box and expose bounding_box property in results
9 years ago
Diana Shkolnikov
36b6adddfd
Add bounding_box parsing step
9 years ago
missinglink
cd16ff92b1
add common.diff() function for test debugging
9 years ago
Julian Simioni
3a85392862
Update _type value in ES response fixtures
...
osmnode and osmway are not types anymore!
9 years ago
Diana Shkolnikov
b3939efb21
Fix ciao tests
9 years ago
Diana Shkolnikov
e9ceb25ca0
Fix crash when dedupe was comparing arrays as stings for parent properties
9 years ago
Diana Shkolnikov
af8044ef29
Fix all unit tests
9 years ago
Diana Shkolnikov
3daec67b6b
Fix helper unit tests
9 years ago
Diana Shkolnikov
31374b5381
Fix middleware unit tests
9 years ago
Diana Shkolnikov
e14697fe40
Remove adminFields because it is not needed anymore
9 years ago
Julian Simioni
74d05867cf
Update mock Elasticsearch response data
9 years ago
Julian Simioni
ab9dbdf7f0
Update ciao tests
9 years ago
missinglink
67449dcae0
Tweak weights for focus
9 years ago
Julian Simioni
616dd606a7
Add sources and layers sanitiser
...
This sanitiser can do a better job of determining when an invalid
combination of sources and layers was specified, and produce helpful
error messages.
9 years ago
missinglink
ce292baeaf
fixes for focus.point to work with wof integration
9 years ago
Julian Simioni
ef78b2e0fd
Filter source and layer by new fields
...
This is functionally the same code as before, except that it uses the
new source and layer mapping.
9 years ago
Julian Simioni
0ee1fdb4d9
Remove obsolete Geonames ID tests
...
These are fixed now with our better source/layer mapping
9 years ago
Julian Simioni
fa07ba9ddc
Add much needed whitespace
9 years ago
Julian Simioni
cdd00af6bc
Build responses with new source and layer fields
...
There is no longer any ambiguity in the source field and the layer
(which is stored as _type), so a lot of logic to compute them can simply
read from the elasticsearch document. Hooray!
9 years ago
Stephen Hess
d1dc88cefd
added tests for `default` schema
9 years ago
Stephen Hess
0f6059c05a
Refactored to use a function for looking up value for a label
...
The reason for this switch is that special case logic is needed to determine the US state name to display. All other fields can be looked up by name.
The burden of fallback functionality is now in `helper/labelSchema` so the burden of unit testing is now in `test/unit/helper/labelSchema.js`
9 years ago
Stephen Hess
431fe44f05
converted labelSchema to .js with module.exports
...
this is in preparation to introduce functions into the schema instead of strings
9 years ago
Stephen Hess
08f414b3d5
fixed encoding error that came from master
9 years ago
Stephen Hess
f7260c63a0
added tests for USA local and regional fallbacks for label generation
9 years ago
Stephen Hess
5456632cdf
Added flag to not include `default.name` in label
...
when source=`geonames` or `whosonfirst` and layer=`region`
This will stop, say, a search for "New Mexico" resulting in the label "New Mexico, NM, USA"
9 years ago
Stephen Hess
3e11e6687c
added `country_a` to label for all USA results
9 years ago
Stephen Hess
3e8d1bfd9b
broke country-specific label tests out to own file for easier testing
9 years ago
Julian Simioni
0e78167f17
[/place] Accept any valid layer for geonames
...
Instead of checking if the source/layer combination for geonames is
valid, always use the geoname type if the source is set to geonames,
regardless of which layer is in the gid.
This helps us better handle the case where people directly take gids
from our API responses.
Note: this functionality shouldn't be permanent and should be removed
once our new source/layer mapping system is in.
9 years ago
Julian Simioni
18de8b5699
Remove unused test examples
9 years ago
Julian Simioni
435104842d
Fix failing Ciao tests
...
They were expecting certain parts of the response to not be there when
an error is returned, but that's overspecifying the result in my
opinion.
9 years ago
missinglink
6711aa45e0
simplify pass 1
9 years ago
missinglink
3b4d566b11
add unit test
9 years ago
Diana Shkolnikov
df93be7543
Fix deduping for non-ascii strings
9 years ago
Peter Johnson
db5a78623a
disable viewport scale
9 years ago
Peter Johnson
f1ead56e60
disable viewport scale
9 years ago
Julian Simioni
87f6f32985
Use tape's throws where appropriate
9 years ago
Julian Simioni
fcc9237993
Use tape's doesNotThrow where appropriate
9 years ago
Julian Simioni
b5be8dea42
Remove duplicate test
9 years ago
Julian Simioni
5a84afa539
Add test of parsing hit with no address object
...
In #369 I said I wouldn't bother testing for the case of the address
object on hit being absent, but it turns out that does sometimes happen.
9 years ago
Diana Shkolnikov
9fa5fc5a77
calcSize became middleware (exposed and fixed bug in query defaults)
9 years ago
Diana Shkolnikov
42d940f8c8
Add simple normalizer (lowercase + remove punctuation)
9 years ago
Diana Shkolnikov
54187dde67
Add dedupe middleware
...
Dedupe middleware removes __exact__ dupes and truncates the results
to the specified size.
9 years ago
Diana Shkolnikov
500835a4c1
Update addressit module to not strip 0s from zipcodes
9 years ago
Peter Johnson
49d37eafed
one config per query
9 years ago
Peter Johnson
4e43310288
german street/number naming convention
9 years ago