Skip to content

Commit

Permalink
change elastic search to 7.10
Browse files Browse the repository at this point in the history
fix search results
  • Loading branch information
craigrbarnes committed Sep 7, 2023
1 parent c54251c commit bec1836
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ services:
- ./postgres-data:/var/lib/postgresql/data
- ./postgres-init:/docker-entrypoint-initdb.d:ro
esproxy-service:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.12
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.0
container_name: esproxy-service
environment:
- cluster.name=elasticsearch-cluster
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- discovery.type=single-node
- network.host=0.0.0.0
- http.port=9200
entrypoint:
- /bin/bash
# mmapfs requires systemctl update - see https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-store.html#mmapfs
Expand Down
3 changes: 2 additions & 1 deletion src/mds/agg_mds/datastore/elasticsearch_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
AGG_MDS_DEFAULT_STUDY_DATA_FIELD,
AGG_MDS_DEFAULT_DATA_DICT_FIELD,
)
import json

AGG_MDS_INDEX = f"{AGG_MDS_NAMESPACE}-commons-index"
AGG_MDS_TYPE = "commons"
Expand Down Expand Up @@ -359,7 +360,7 @@ async def get_all_metadata(limit, offset, counts: Optional[str] = None, flatten=
index=AGG_MDS_INDEX,
body={"size": limit, "from": offset, "query": {"match_all": {}}},
)
hitsTotal = res["hits"]["total"]
hitsTotal = res["hits"]["total"]["value"]
toReduce = counts.split(",") if counts is not None else None
if flatten:
flat = []
Expand Down

0 comments on commit bec1836

Please sign in to comment.