From: Adam Dickmeiss Date: Wed, 3 Nov 2010 14:05:31 +0000 (+0100) Subject: Allow user-defined info for target suffix. X-Git-Tag: v1.5.1~15^2~6 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=06f4982922e351c51a267025816d02db8a5f94e0;p=pazpar2-moved-to-github.git Allow user-defined info for target suffix. This has no meaning in Pazpar2 except to distinguish targets from each other. The suffix data begins with #. For example z3950.indexdata.com/gils#Mydata --- diff --git a/NEWS b/NEWS index d50e6a0..4f1a213 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Allow user-defined info for target suffix. This has no meaning in +Pazpar2 except to distinguish targets from each other. The suffix +data begins with #. For example z3950.indexdata.com/gils#Mydata + Added exact-match recordfilter; format name=value --- 1.5.0 2010/10/05 diff --git a/src/database.c b/src/database.c index da26ed0..5648af8 100644 --- a/src/database.c +++ b/src/database.c @@ -168,6 +168,7 @@ struct database *new_database(const char *id, NMEM nmem) struct database *db; char hostport[256]; char *dbname; + char *db_comment; struct setting *idset; if (strlen(id) > 255) @@ -177,6 +178,9 @@ struct database *new_database(const char *id, NMEM nmem) *(dbname++) = '\0'; else dbname = ""; + db_comment = strchr(dbname, '#'); + if (db_comment) + *db_comment = '\0'; db = nmem_malloc(nmem, sizeof(*db)); memset(db, 0, sizeof(*db)); db->host = 0; diff --git a/test/test_http_18.res b/test/test_http_18.res index 77b4469..267fde6 100644 --- a/test/test_http_18.res +++ b/test/test_http_18.res @@ -9,7 +9,7 @@ BIBLIOGRAPHY OF MAINE GEOLOGY -This data base is a computer based bibliography of marine geology. It allows searching by topic and geographic location, similar to GEOREF. It is currently under development to replace the printed Bibliography of Marine Geology +This data base is a computer based bibliography of marine geology. It allows searching by topic and geographic location, similar to GEOREF. It is currently under development to replace the printed Bibliography of Marine Geology BIBLIOGRAPHY OF MAINE GEOLOGY This data base is a computer based bibliography of marine geology. It allows searching by topic and geographic location, similar to GEOREF. It is currently under development to replace the printed Bibliography of Marine Geology 1692-PRESENT @@ -21,7 +21,7 @@ GROUNDWATER RESOURCE MAPS - COUNTY SERIES -A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine +A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine GROUNDWATER RESOURCE MAPS - COUNTY SERIES A series of 1:250,000 scale maps showing well yield, well depth, and depth to bedrock for a large number of bedrock wells inventoried by the Maine Geological Survey in the mid-to late 1970's comprises this data set. Some series also show bedrock topography and potentiometric surface. Geographic coverage is restricted to Southern Maine 1972-1978 @@ -33,7 +33,7 @@ OIL/GAS DRILLING -This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records +This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records OIL/GAS DRILLING This database contains information on oil and gas drilling such as well name, operator, driller, location, depth, copies of logs run, permits, samples (cuttings, core), completion records 1907-PRESENT diff --git a/test/test_http_21.res b/test/test_http_21.res index 88a62fe..a156563 100644 --- a/test/test_http_21.res +++ b/test/test_http_21.res @@ -1,6 +1,6 @@ OK -z3950.indexdata.com/gils +z3950.indexdata.com/gils#DUMMY gils 0 0 diff --git a/test/test_http_urls b/test/test_http_urls index 1f68455..e94d528 100644 --- a/test/test_http_urls +++ b/test/test_http_urls @@ -13,7 +13,7 @@ http://localhost:9763/search.pz2?command=search&query=function%20()%20%7B%250A%2 http://localhost:9763/search.pz2?session=1&command=show&sort=date:1&block=1 http://localhost:9763/search.pz2?session=1&command=show&start=0&number=1 http://localhost:9763/search.pz2?command=init&clear=1 -http://localhost:9763/search.pz2?session=2&command=settings&pz:name%5Bz3950.indexdata.com%2Fgils%5D=gils&pz:requestsyntax%5Bz3950.indexdata.com%2Fgils%5D=usmarc&pz:nativesyntax%5Bz3950.indexdata.com%2Fgils%5D=iso2709&pz:xslt%5Bz3950.indexdata.com%2Fgils%5D=marc21%5Ftest.xsl +http://localhost:9763/search.pz2?session=2&command=settings&pz:name%5Bz3950.indexdata.com%2Fgils%23DUMMY%5D=gils&pz:requestsyntax%5Bz3950.indexdata.com%2Fgils%23DUMMY%5D=usmarc&pz:nativesyntax%23DUMMY%5Bz3950.indexdata.com%2Fgils%23DUMMY%5D=iso2709&pz:xslt%5Bz3950.indexdata.com%2Fgils%23DUMMY%5D=marc21%5Ftest.xsl http://localhost:9763/search.pz2?session=2&command=search&query=computer 2 http://localhost:9763/search.pz2?session=2&command=show&block=1 http://localhost:9763/search.pz2?session=2&command=search&query=kubiak%20stanis%C5%82aw