planetfederal / registry

pycsw + elasticsearch + opensearch + swagger - Based on HHyperMap
MIT License
11 stars 9 forks source link

Add multi-field search with boosts #35

Closed sstults closed 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 97.917% when pulling 504cd3ed699a9619a7c27749d9cc94b5be74efe2 on sstults:master into c1f3b72f80459ba55682a234ca3c642f09c7d76e on boundlessgeo:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 97.917% when pulling f9ccc95125e8d393e008204836befbe8daa5cec2 on sstults:master into c1f3b72f80459ba55682a234ca3c642f09c7d76e on boundlessgeo:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.4%) to 97.917% when pulling f9ccc95125e8d393e008204836befbe8daa5cec2 on sstults:master into c1f3b72f80459ba55682a234ca3c642f09c7d76e on boundlessgeo:master.

sstults commented 7 years ago

I'm looking into why this is failing on ES_VERSION < 2

ingenieroariel commented 7 years ago

Hey Scott,

In Elasticsearch 1.7 the tests are failing. It seems to be related with the ordering of the results, could you help us investigate? It should be as easy as changing the elasticsearch version in docker-compose.

EDIT: Wrote this before I saw your comment. Thanks a lot for looking into it.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.002%) to 99.655% when pulling df87ae9401767bdd9f5c8d0f6ca2c80dad44e334 on sstults:master into b7ebd334ecea3f51515af0ca990ea846c7c8bbd0 on boundlessgeo:master.

sstults commented 7 years ago

For ES < 2 the full-text query was being added to the boolean query filter. It needs to be outside of the filter in order to preserve score, and score is what lets field boosts work. So I reordered the final structure of the query a bit.

JorgeMartinezG commented 7 years ago

@sstults It means that for versions > 2, elasticsearch computes scores even the query_string is within a filter? Good to know!