Skip to content

Commit

Permalink
Use GETOPT for the command line scripts #326: setting MIXED as the de…
Browse files Browse the repository at this point in the history
…fault Solr field type - previously the index script set it
  • Loading branch information
pkiraly committed Nov 10, 2023
1 parent f023a89 commit e822753
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions solr-functions
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ purge_and_exit() {
}

store_fields() {
SOLR_DB_URL=$1
SOLR_URL=$1
OUTPUT_DIR=$2
echo "Store fields into ${OUTPUT_DIR}/solr-fields.json"
curl -s "${SOLR_DB_URL}/admin/luke?wt=json" \
echo "curl -s \"${SOLR_URL}/admin/luke?wt=json\" | jq '.fields | keys_unsorted'"
curl -s "${SOLR_URL}/admin/luke?wt=json" \
| jq '.fields | keys_unsorted' \
> $OUTPUT_DIR/solr-fields.json
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class MarcToSolrParameters extends CommonParameters {
private boolean useEmbedded = false;
private String solrUrl = null;
private boolean doCommit = false;
private SolrFieldType solrFieldType = SolrFieldType.MARC;
private SolrFieldType solrFieldType = SolrFieldType.MIXED;
private SolrClient mainClient = null;
private SolrClient validationClient = null;
private boolean indexWithTokenizedField = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void testDefaults() {
assertNull(parameters.getSolrUrl());
assertFalse(parameters.doCommit());
assertNotNull(parameters.getSolrFieldType());
assertEquals(SolrFieldType.MARC, parameters.getSolrFieldType());
assertEquals(SolrFieldType.MIXED, parameters.getSolrFieldType());
} catch (ParseException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit e822753

Please sign in to comment.