import name as keyword (#30)

otherwise elasticsearch will performs stemming which removes important
information:

Example:

Name: "nixpkgs-review"
Elasticsearch with 'text' mapping: ["nixpkgs", "review"]

Now searching for *nixpkgs-review* will return no results.
This commit is contained in:
Jörg Thalheim 2020-05-14 16:26:56 +01:00 committed by GitHub
parent ec4c23f295
commit 3816a7033a
Failed to generate hash of commit

View file

@ -155,7 +155,7 @@ def recreate_index(es, channel):
mappings=dict(
properties=dict(
attr_name=dict(type="keyword"),
name=dict(type="text"),
name=dict(type="keyword"),
version=dict(type="text"),
description=dict(type="text"),
longDescription=dict(type="text"),
@ -176,7 +176,7 @@ def recreate_index(es, channel):
),
platforms=dict(type="keyword"),
position=dict(type="text"),
homepage=dict(type="text"),
homepage=dict(type="keyword"),
),
),
),