diff --git a/.env.example b/.env.example index ea6aeaa..2f97d5d 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,6 @@ APP_URL=//tethys.at VUE_API=//www.tethys.at -SOLR_HOST=tethys.at -SOLR_CORE=rdr_data \ No newline at end of file +# SOLR_HOST=tethys.at +# SOLR_CORE=rdr_data +OPEN_HOST=192.168.21.18 +OPEN_CORE=tethys-records \ No newline at end of file diff --git a/OpenSearch queries.txt b/OpenSearch queries.txt new file mode 100644 index 0000000..5a84e5e --- /dev/null +++ b/OpenSearch queries.txt @@ -0,0 +1,9 @@ +Get all documents in the index ("core" in solr) +---------------------------------------------------- +curl -XGET "http://192.168.21.18/tethys-records/_search?pretty" -H 'Content-Type: application/json' -d' +{ + "query": { + "match_all": {} + } +}' + diff --git a/SOLR queries.txt b/SOLR queries.txt new file mode 100644 index 0000000..30d17b7 --- /dev/null +++ b/SOLR queries.txt @@ -0,0 +1,60 @@ +Search by a specific value for one of the fields +https://tethys.at/solr/rdr_data/select?&q=year:2024 + +Search within a specific range of values for one of the fields +https://tethys.at/solr/rdr_data/select?&q=year:2023%20TO%202024 years 2023 to 2024 + +Search for a term (search done in predefined field?) +https://tethys.at/solr/rdr_data/select?&q=linz + +Predefined Tethys Search +https://tethys.at/solr/rdr_data/select?&0=fl%3Did%2Clicence%2Cserver_date_published%2Cabstract_output%2Cidentifier%2Ctitle_output%2Ctitle_additional%2Cauthor%2Csubject%2Cdoctype&q=%2A&q.op=or&defType=edismax&qf=title%5E3%20author%5E2%20subject%5E1&indent=on&wt=json&rows=10&start=0&sort=server_date_published%20desc&facet=on&json.facet.language=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22language%22%20%7D&json.facet.subject=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22subject%22%2C%20limit%3A%20-1%20%7D&json.facet.year=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22year%22%20%7D&json.facet.author=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22author_facet%22%2C%20limit%3A%20-1%20%7D + +Predefined Tethys search changing the last facet to "doctype" +https://tethys.at/solr/rdr_data/select?&0=fl%3Did%2Clicence%2Cserver_date_published%2Cabstract_output%2Cidentifier%2Ctitle_output%2Ctitle_additional%2Cauthor%2Csubject%2Cdoctype&q=*&q.op=or&defType=edismax&qf=title^3%20author^2%20subject^1&indent=on&wt=json&rows=10&start=0&sort=server_date_published%20desc&facet=on&json.facet.language={%20type%3A%20%22terms%22%2C%20field%3A%20%22language%22%20}&json.facet.subject={%20type%3A%20%22terms%22%2C%20field%3A%20%22subject%22%2C%20limit%3A%20-1%20}&json.facet.author={%20type%3A%20%22terms%22%2C%20field%3A%20%22author_facet%22%2C%20limit%3A%20-1%20}&json.facet.doctype={%20type%3A%20%22terms%22%2C%20field%3A%20%22doctype%22%2C%20limit%3A%20-1%20} + +Giving a value for only one facet => Author: Coric, Stjepan (16) +https://tethys.at/solr/rdr_data/select?&0=fl%3Did%2Clicence%2Cserver_date_published%2Cabstract_output%2Cidentifier%2Ctitle_output%2Ctitle_additional%2Cauthor%2Csubject%2Cdoctype&q=%2A&q.op=or&defType=edismax&qf=title%5E3%20author%5E2%20subject%5E1&indent=on&wt=json&rows=10&fq=author%3A%28%22Coric%2C%20Stjepan%22%29&start=0&sort=server_date_published%20desc&facet=on&json.facet.language=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22language%22%20%7D&json.facet.subject=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22subject%22%2C%20limit%3A%20-1%20%7D&json.facet.year=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22year%22%20%7D&json.facet.author=%7B%20type%3A%20%22terms%22%2C%20field%3A%20%22author_facet%22%2C%20limit%3A%20-1%20%7D + + + +ASCII ++----+-----+----+-----+----+-----+----+-----+ +| Hx | Chr | Hx | Chr | Hx | Chr | Hx | Chr | ++----+-----+----+-----+----+-----+----+-----+ +| 00 | NUL | 20 | SPC | 40 | @ | 60 | ` | +| 01 | SOH | 21 | ! | 41 | A | 61 | a | +| 02 | STX | 22 | " | 42 | B | 62 | b | +| 03 | ETX | 23 | # | 43 | C | 63 | c | +| 04 | EOT | 24 | $ | 44 | D | 64 | d | +| 05 | ENQ | 25 | % | 45 | E | 65 | e | +| 06 | ACK | 26 | & | 46 | F | 66 | f | +| 07 | BEL | 27 | ' | 47 | G | 67 | g | +| 08 | BS | 28 | ( | 48 | H | 68 | h | +| 09 | TAB | 29 | ) | 49 | I | 69 | i | +| 0A | LF | 2A | * | 4A | J | 6A | j | +| 0B | VT | 2B | + | 4B | K | 6B | k | +| 0C | FF | 2C | , | 4C | L | 6C | l | +| 0D | CR | 2D | - | 4D | M | 6D | m | +| 0E | SO | 2E | . | 4E | N | 6E | n | +| 0F | SI | 2F | / | 4F | O | 6F | o | +| 10 | DLE | 30 | 0 | 50 | P | 70 | p | +| 11 | DC1 | 31 | 1 | 51 | Q | 71 | q | +| 12 | DC2 | 32 | 2 | 52 | R | 72 | r | +| 13 | DC3 | 33 | 3 | 53 | S | 73 | s | +| 14 | DC4 | 34 | 4 | 54 | T | 74 | t | +| 15 | NAK | 35 | 5 | 55 | U | 75 | u | +| 16 | SYN | 36 | 6 | 56 | V | 76 | v | +| 17 | ETB | 37 | 7 | 57 | W | 77 | w | +| 18 | CAN | 38 | 8 | 58 | X | 78 | x | +| 19 | EM | 39 | 9 | 59 | Y | 79 | y | +| 1A | SUB | 3A | : | 5A | Z | 7A | z | +| 1B | ESC | 3B | ; | 5B | [ | 7B | { | +| 1C | FS | 3C | < | 5C | \ | 7C | | | +| 1D | GS | 3D | = | 5D | ] | 7D | } | +| 1E | RS | 3E | > | 5E | ^ | 7E | ~ | +| 1F | US | 3F | ? | 5F | _ | 7F | DEL | ++----+-----+----+-----+----+-----+----+-----+ +https://www.asciitable.com/ see Hx + +If you write encodeURIComponent(",") in your JavaScript console, then you will also get %2C. And with decodeURIComponent("%2C") you will get back the "," \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ea6b588..206df8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "axios": "^1.2.2", "class-transformer": "^0.5.1", "dayjs": "^1.10.7", + "dompurify": "^3.1.5", "leaflet": "^1.7.1", "qs": "^6.10.1", "rxjs": "^7.5.5", @@ -29,6 +30,7 @@ "@babel/plugin-proposal-decorators": "^7.22.5", "@babel/preset-env": "^7.22.5", "@tailwindcss/forms": "^0.5.7", + "@types/dompurify": "^3.0.5", "@types/leaflet": "^1.7.9", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", @@ -2497,6 +2499,15 @@ "@types/node": "*" } }, + "node_modules/@types/dompurify": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.0.5.tgz", + "integrity": "sha512-1Wg0g3BtQF7sSb27fJQAKck1HECM6zV1EB66j8JH9i3LCjYabJa0FSdiSgsD5K/RbrsR0SiraKacLB+T8ZVYAg==", + "dev": true, + "dependencies": { + "@types/trusted-types": "*" + } + }, "node_modules/@types/eslint": { "version": "8.56.7", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.7.tgz", @@ -2694,6 +2705,12 @@ "@types/node": "*" } }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true + }, "node_modules/@types/webpack-env": { "version": "1.18.4", "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.18.4.tgz", @@ -5626,6 +5643,11 @@ "url": "https://github.com/fb55/domhandler?sponsor=1" } }, + "node_modules/dompurify": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.5.tgz", + "integrity": "sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA==" + }, "node_modules/domutils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", diff --git a/package.json b/package.json index de5f0e1..efa7d39 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "axios": "^1.2.2", "class-transformer": "^0.5.1", "dayjs": "^1.10.7", + "dompurify": "^3.1.5", "leaflet": "^1.7.1", "qs": "^6.10.1", "rxjs": "^7.5.5", @@ -32,6 +33,7 @@ "@babel/plugin-proposal-decorators": "^7.22.5", "@babel/preset-env": "^7.22.5", "@tailwindcss/forms": "^0.5.7", + "@types/dompurify": "^3.0.5", "@types/leaflet": "^1.7.9", "@typescript-eslint/eslint-plugin": "^7.2.0", "@typescript-eslint/parser": "^7.2.0", diff --git a/src/App.vue b/src/App.vue index 9b042da..afc4c9b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -34,7 +34,7 @@