Skip to content

Commit

Permalink
Merge pull request #60 from certego/develop
Browse files Browse the repository at this point in the history
0.7.5
  • Loading branch information
mlodic authored Nov 16, 2023
2 parents 60d2078 + 69e8d45 commit 2f73c31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions certego_saas/ext/upload/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def upload(
qs = cls.objects
if index:
qs.filter(index=index)
docs = qs.order_by("+time")
docs = qs.order_by("+creation_date")
if max_number:
docs = docs[:max_number]
logger.info(f"Uploading {docs.count()} documents")
Expand Down Expand Up @@ -80,14 +80,7 @@ class BIDocument(__BIDocumentInterface, Model):
kwargs = JSONField()

class Meta:
indexes = [
Index(
fields=[
"index",
"time",
]
)
]
indexes = [Index(fields=["index", "creation_date"])]

else:

Expand All @@ -99,4 +92,4 @@ class BIDocument(__BIDocumentInterface, Document):
category = mongo_fields.StringField(required=True)
count = mongo_fields.IntField(required=True, min_value=0)
kwargs = mongo_fields.DictField(required=False)
meta = {"indexes": ["index", "time"]}
meta = {"indexes": ["index", "creation_date"]}
2 changes: 1 addition & 1 deletion certego_saas/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.7.4"
VERSION = "0.7.5"

0 comments on commit 2f73c31

Please sign in to comment.