Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Merge requests
!2513
Bump PostgreSQL/PostGIS docker image from 14 to 17
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Bump PostgreSQL/PostGIS docker image from 14 to 17
postgresql-17
into
release-1.7.2
Overview
0
Commits
2
Pipelines
0
Changes
2
Merged
Bastien Abadie
requested to merge
postgresql-17
into
release-1.7.2
2 months ago
Overview
0
Commits
2
Pipelines
0
Changes
9
Expand
Refs
https://redmine.teklia.com/issues/7619
0
0
Merge request reports
Compare
version 1
version 1
97b54bcc
2 months ago
release-1.7.2 (base)
and
latest version
latest version
44b2fb08
2 commits,
2 months ago
version 1
97b54bcc
1 commit,
2 months ago
Show latest version
9 files
+
320
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
arkindex/documents/management/commands/reindex.py
+
11
−
2
Options
@@ -29,13 +29,22 @@ class Command(BaseCommand):
help
=
"
Only setup a collection. Create a collection and fields if they do not exist or update the fields
"
,
action
=
"
store_true
"
,
)
parser
.
add_argument
(
"
--sql-chunk-size
"
,
help
=
"
Size of the chunks of parent elements used when retrieving all children of indexable elements from the database.
"
,
type
=
int
,
default
=
10000
,
)
def
handle
(
self
,
corpus_id
,
**
options
):
def
handle
(
self
,
corpus_id
,
sql_chunk_size
,
**
options
):
if
not
settings
.
ARKINDEX_FEATURES
[
"
search
"
]:
raise
CommandError
(
"
Reindexation is not possible if the search feature flag is disabled.
"
"
Consider setting `features.search` to `on` or `true` or `yes` in the YAML
"
"
configuration file, and configuring Solr properly.
"
)
if
sql_chunk_size
<=
0
:
raise
CommandError
(
"
--sql-chunk-size must be set to a strictly positive integer.
"
)
if
options
[
"
all
"
]:
corpora
=
Corpus
.
objects
.
filter
(
indexable
=
True
)
elif
corpus_id
:
@@ -47,7 +56,7 @@ class Command(BaseCommand):
for
corpus
in
corpora
:
self
.
stdout
.
write
(
f
"
Indexing
{
corpus
.
name
}
"
)
indexer
=
Indexer
(
corpus
.
id
)
indexer
=
Indexer
(
corpus
.
id
,
sql_chunk_size
=
sql_chunk_size
)
if
options
.
get
(
"
drop
"
):
indexer
.
drop_index
()
indexer
.
setup
()
Loading