Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 359fdb42a11d^
Choose a base ref
...
head repository: NixOS/nixos-search
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4ef69e3f1c73
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on May 20, 2020

  1. Add top-level attrset to package documents

    So we can aggregate on eg haskellPackages
    adisbladis committed May 20, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    359fdb4 View commit details
  2. Change pversion to keyword instead of text

    Text analysis doesn't make sense on this field
    adisbladis committed May 20, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    Copy the full SHA
    4ef69e3 View commit details
Showing with 12 additions and 2 deletions.
  1. +12 −2 scripts/import-channels-into-elasticsearch
14 changes: 12 additions & 2 deletions scripts/import-channels-into-elasticsearch
Original file line number Diff line number Diff line change
@@ -133,9 +133,17 @@ def get_packages(evaluation):
or None
for platform in data["meta"].get("platforms", [])
]
yield dict(

attr_set = None
if "." in attr_name:
attr_set = attr_name.split(".")[0]
if not attr_set.endswith("Packages") and not attr_set.endswith("Plugins"):
attr_set = None

doc = dict(
id=attr_name,
attr_name=attr_name,
attr_set=attr_set,
pname=data["pname"],
pversion=data["version"],
description=data["meta"].get("description"),
@@ -146,6 +154,7 @@ def get_packages(evaluation):
position=position,
homepage=data["meta"].get("homepage"),
)
yield doc

return len(packages), gen

@@ -202,8 +211,9 @@ def recreate_index(es, channel):
}
},
),
attr_set=dict(type="keyword"),
pname=dict(type="keyword"),
pversion=dict(type="text"),
pversion=dict(type="keyword"),
description=dict(type="text"),
longDescription=dict(type="text"),
license=dict(