View | Details | Raw Unified | Return to bug 40964
Collapse All | Expand All

(-)a/debian/docs/koha-elasticsearch.xml (-1 / +7 lines)
Lines 34-40 Link Here
34
      <arg>-r|--reset</arg>
34
      <arg>-r|--reset</arg>
35
      <arg>-b|--biblios</arg>
35
      <arg>-b|--biblios</arg>
36
      <arg>-a|--authorities</arg>
36
      <arg>-a|--authorities</arg>
37
      <arg>-v|--verbose</arg>
37
      <arg>-w|--where</arg>
38
      <arg>-c n|--commit n</arg>
38
      <arg>-c n|--commit n</arg>
39
      <arg>-v|--verbose</arg>
39
      <arg>-v|--verbose</arg>
40
      <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
40
      <arg choice="req" rep="repeat"><replaceable>instancename</replaceable></arg>
Lines 82-87 Link Here
82
        <para>In conjunction with <option>--rebuild</option> it triggers bibliographic record reindexing.</para>
82
        <para>In conjunction with <option>--rebuild</option> it triggers bibliographic record reindexing.</para>
83
      </listitem>
83
      </listitem>
84
    </varlistentry>
84
    </varlistentry>
85
    <varlistentry>
86
      <term><option>-w</option></term>
87
      <listitem>
88
        <para>In conjunction with <option>--rebuild</option>, pass some arbitrary SQL to limit the records to be indexed.</para>
89
      </listitem>
90
    </varlistentry>
85
    <varlistentry>
91
    <varlistentry>
86
      <term><option>-c, --commit</option></term>
92
      <term><option>-c, --commit</option></term>
87
      <listitem>
93
      <listitem>
(-)a/debian/scripts/koha-elasticsearch (-1 / +11 lines)
Lines 46-51 Options: Link Here
46
                      they're added to Elasticsearch (default: 5000).
46
                      they're added to Elasticsearch (default: 5000).
47
    -p|--processes n  Specify the number of parallel processes to use
47
    -p|--processes n  Specify the number of parallel processes to use
48
                      for indexing.
48
                      for indexing.
49
    -w|--where SQL    Pass some additional SQL to limit the records to
50
                      be indexed.
51
49
    --verbose|-v      Be verbose.
52
    --verbose|-v      Be verbose.
50
    --help|-h         Print this help.
53
    --help|-h         Print this help.
51
54
Lines 114-119 run_rebuild_elasticsearch() Link Here
114
        rebuild_opts="${rebuild_opts} -v"
117
        rebuild_opts="${rebuild_opts} -v"
115
    fi
118
    fi
116
119
120
    if [ "${where}" ]; then
121
        rebuild_opts="${rebuild_opts} --where \"${where}\""
122
    fi
123
117
    # KOHA_HOME and KOHA_BINDIR may have been adjusted/set by adjust_paths_git_install
124
    # KOHA_HOME and KOHA_BINDIR may have been adjusted/set by adjust_paths_git_install
118
    if koha-shell \
125
    if koha-shell \
119
          -c "${KOHA_HOME}/${KOHA_BINDIR}/search_tools/rebuild_elasticsearch.pl ${rebuild_opts}" \
126
          -c "${KOHA_HOME}/${KOHA_BINDIR}/search_tools/rebuild_elasticsearch.pl ${rebuild_opts}" \
Lines 133-138 commit_size=5000 Link Here
133
processes=1
140
processes=1
134
verbose="no"
141
verbose="no"
135
op=""
142
op=""
143
where=""
136
144
137
# Read parameters
145
# Read parameters
138
while [ -n "$*" ]; do
146
while [ -n "$*" ]; do
Lines 158-163 while [ -n "$*" ]; do Link Here
158
        -p|--processes)
166
        -p|--processes)
159
            clo_processes="$2" ; shift
167
            clo_processes="$2" ; shift
160
            ;;
168
            ;;
169
        -w|--where)
170
            where="$2" ; shift
171
            ;;
161
        --rebuild)
172
        --rebuild)
162
            set_action "rebuild"
173
            set_action "rebuild"
163
            ;;
174
            ;;
164
- 

Return to bug 40964