forked from OpenNeo/impress
Matchu
cded361f73
We originally had a regression on name-matching, where, among other issues, `straw hat` returned items containing both "straw" and "hat", which isn't really helpful behavior since we're sorting alphabetically. Now, `straw hat` behaves as expected. Additionally, "phrases like these" behave as expected, too.
66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
# Add here your search queries
|
|
# see the detailed Source documentation at https://github.com/ddnexus/flex/wiki/Sources
|
|
|
|
|
|
# ANCHORS litheral key: it will not be used as template
|
|
# you can store here fragments of queries to reuse in the templates below
|
|
ANCHORS:
|
|
- &species_support_id_partial
|
|
term:
|
|
species_support_id: <<species_support_id>>
|
|
- &occupied_zone_id_partial
|
|
terms:
|
|
occupied_zone_id: <<occupied_zone_id>>
|
|
- &restricted_zone_id_partial
|
|
terms:
|
|
restricted_zone_id: <<restricted_zone_id>>
|
|
|
|
_names:
|
|
multi_match:
|
|
query: <<name>>
|
|
fields: <<fields>>
|
|
type: phrase
|
|
|
|
_negative_names:
|
|
multi_match:
|
|
query: <<name>>
|
|
fields: <<fields>>
|
|
type: phrase
|
|
|
|
_species_support_ids:
|
|
*species_support_id_partial
|
|
|
|
_negative_species_support_ids:
|
|
*species_support_id_partial
|
|
|
|
_occupied_zone_ids:
|
|
*occupied_zone_id_partial
|
|
|
|
_negative_occupied_zone_ids:
|
|
*occupied_zone_id_partial
|
|
|
|
_restricted_zone_ids:
|
|
*restricted_zone_id_partial
|
|
|
|
_negative_restricted_zone_ids:
|
|
*restricted_zone_id_partial
|
|
|
|
item_search:
|
|
- query:
|
|
bool:
|
|
must:
|
|
- term:
|
|
is_nc: <<is_nc= ~>>
|
|
- term:
|
|
is_pb: <<is_pb= ~>>
|
|
- <<_names= ~>>
|
|
- <<_species_support_ids= ~>>
|
|
- <<_occupied_zone_ids= ~>>
|
|
- <<_restricted_zone_ids= ~>>
|
|
must_not:
|
|
- <<_negative_names= ~>>
|
|
- <<_negative_species_support_ids= ~>>
|
|
- <<_negative_occupied_zone_ids= ~>>
|
|
- <<_negative_restricted_zone_ids= ~>>
|
|
sort:
|
|
- name.<<locale>>.untouched
|