Commit eb913583 authored by Pablo Panero's avatar Pablo Panero
Browse files

Merge branch 'dev' into 'master'

v0.7.0

See merge request webservices/cern-search/cern-search-rest-api!50
parents fb8adef3 4ff35e5f
......@@ -7,7 +7,7 @@
# under the terms of the MIT License; see LICENSE file for more details.
# Use CentOS7:
FROM gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:d1f96a1c3600a9a00e76433b593d0edc0a49e532
FROM gitlab-registry.cern.ch/webservices/cern-search/cern-search-rest-api/cern-search-rest-api-base:cfe1fe3d1aba819d240acbb6a7bfe79678f82ee5
ARG build_devel
ENV DEVEL=$build_devel
......
......@@ -10,7 +10,9 @@
FROM inveniosoftware/centos7-python:3.6
# Install pre-requisites
RUN yum update -y && \
RUN yum erase -y python36u python36u-devel python36u-pip && \
yum install -y rh-python36 python36-devel python36-pip && \
yum update -y && \
yum install -y \
gcc \
openssl \
......
......@@ -13,7 +13,7 @@ invenio-app = ">=1.1.0,<1.2.0"
invenio-base = ">=1.0.0,<1.1.0"
invenio-config = ">=1.0.0,<1.1.0"
invenio-db = {version = ">=1.0.0,<1.1.0",extras = ["postgresql", "versioning"]}
invenio-indexer = {version = ">=1.0.0,<1.1.0",extras = ["elasticsearch6"]}
invenio-indexer = {version = "==1.0.2",extras = ["elasticsearch6"]}
invenio-jsonschemas = ">=1.0.0,<1.1.0"
invenio-logging = ">=1.0.0,<1.1.0"
invenio-records-rest = {version = ">=1.3.0,<1.4.0",extras = ["elasticsearch6"]}
......
This diff is collapsed.
......@@ -122,10 +122,33 @@ RECORDS_REST_FACETS = {
'aggs': {
'collection': {
'terms': {'field': 'collection'}
},
'type_format': {
'terms': {'field': 'type_format'}
},
'authors': {
'terms': {'field': '_data.authors.exact_match'}
}
},
'post_filters': {
'collection': terms_filter("collection")
'collection': terms_filter("collection"),
'type_format': terms_filter("type_format"),
'authors': terms_filter("_data.authors.exact_match")
}
}
}
RECORDS_REST_SORT_OPTIONS = {
'cernsearchqa-webservices': {
'bestmatch': {
'fields': ['-_score'],
'title': 'Best match',
'default_order': 'asc',
},
'mostrecent': {
'fields': ['_updated'],
'title': 'Newest',
'default_order': 'asc',
}
}
}
......
......@@ -56,25 +56,12 @@
"type": "string",
"description": "Website content"
},
"extras": {
"authors": {
"type": "array",
"description": "Attachments and followed links present in the website",
"description": "Authors of the site",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Linked website name or title"
},
"url": {
"type": "string",
"description": "Linked website full path website URL"
},
"content": {
"type": "string",
"description": "Linked website content"
}
}
"type": "string",
"description": "Author name"
}
}
}
......@@ -91,6 +78,9 @@
"collection": {
"type": "string"
},
"type_format": {
"type": "string"
},
"image_source": {
"type": "string"
},
......
......@@ -9,11 +9,17 @@
"pattern": "\\.|(\\:\\/\\/)|\\/"
}
},
"filter":{
"url_stop": {
"type": "stop",
"stopwords": ["http", "https", "ftp", "www", "web", "cern", "ch"]
}
},
"analyzer": {
"url_analyzer": {
"type": "standard",
"type": "custom",
"tokenizer": "url_tokenizer",
"stopwords": ["http", "https", "ftp", "www", "web", "cern", "ch"]
"filter": ["url_stop"]
}
},
"normalizer": {
......@@ -54,42 +60,42 @@
"type": "object",
"properties": {
"name": {
"type": "keyword",
"type": "text",
"analyzer": "english",
"fields": {
"french": {
"type": "text",
"analyzer": "french"
},
"english": {
"type": "text",
"analyzer": "english"
"exact_match": {
"type": "keyword"
}
}
},
"url": {
"type": "keyword",
"type": "text",
"analyzer": "url_analyzer",
"fields": {
"full_text": {
"type": "text",
"analyzer": "url_analyzer"
"exact_match": {
"type": "keyword"
}
}
},
"website": {
"type": "keyword",
"type": "text",
"analyzer": "url_analyzer",
"fields": {
"full_text": {
"type": "text",
"analyzer": "url_analyzer"
"exact_match": {
"type": "keyword"
}
}
},
"origin": {
"type": "keyword",
"type": "text",
"analyzer": "url_analyzer",
"fields": {
"full_text": {
"type": "text",
"analyzer": "url_analyzer"
"exact_match": {
"type": "keyword"
}
}
},
......@@ -103,40 +109,12 @@
}
}
},
"extras": {
"type": "object",
"properties": {
"name": {
"type": "keyword",
"fields": {
"french": {
"type": "text",
"analyzer": "french"
},
"english": {
"type": "text",
"analyzer": "english"
}
}
},
"url": {
"authors": {
"type": "text",
"fields": {
"exact_match": {
"type": "keyword",
"fields": {
"full_text": {
"type": "text",
"analyzer": "url_analyzer"
}
}
},
"content": {
"type": "text",
"analyzer": "english",
"fields": {
"french": {
"type": "text",
"analyzer": "french"
}
}
"eager_global_ordinals": true
}
}
}
......@@ -153,6 +131,10 @@
"type": "keyword",
"eager_global_ordinals": true
},
"type_format": {
"type": "keyword",
"eager_global_ordinals": true
},
"image_source": {
"enabled": false
},
......
......@@ -5,6 +5,3 @@
#
# CERN Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
-e git://github.com/ppanero/invenio-indexer.git@24d1b1520063faa0fc3cfe462e2198006dfd29d6#egg=invenio-indexer
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment