geoadmin/mf-chsdi3 — pull request #745 by loicgasser (2014-06-03 14:09:22+00:00)
Title: Use keyword filter

I opened this PR to get rid of the very redundant information contained in the "detail" field of the parcels.

'parzelle', 'parcelle', 'parcella', 'parcel' is at the moment defined at the beginning of each parcel field.
This is bad for 2 reasons:
1. The size of the indices
2. Performance

This request:
http://api3.geo.admin.ch//rest/services/api/SearchServer?searchText=parcel%20bern&type=locations

takes around 630ms in prod at the moment, while it takes around 250ms in test with this modifications.

I updated the view

dritte.kantone.parzellen_sphinx (got rid of keywords in detail field), deployed the DB in test and I am currently regenerating the indices.

This approach could be used in SwissSearch to filter on different origins.

Note the use of rank for filtering (Integer), if you want more info have a look at sphinx doc (attributes Vs fields)