changeset 0:af2f8fe486f6 default tip

initial
author Dirk Wintergruen <dwinter@mpiwg-berlin.mpg.de>
date Tue, 17 Feb 2015 12:44:40 +0100
parents
children
files .project .pydevproject db.sqlite3 manage.py notes.txt proxy/__init__.py proxy/admin.py proxy/models.py proxy/tests.py proxy/views.py searchProxy/__init__.py searchProxy/settings.py searchProxy/urls.py searchProxy/wsgi.py ttools/__init__.py ttools/note.txt ttools/templates/api.html ttools/views.py
diffstat 15 files changed, 1179 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.project	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>searchProxy</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+		<nature>org.python.pydev.django.djangoNature</nature>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.pydevproject	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
+<key>DJANGO_MANAGE_LOCATION</key>
+<value>manage.py</value>
+</pydev_variables_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/${PROJECT_DIR_NAME}</path>
+</pydev_pathproperty>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.0</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python3</pydev_property>
+</pydev_project>
Binary file db.sqlite3 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/manage.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "searchProxy.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/notes.txt	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,27 @@
+http://localhost:8000/search/cl2/select?q=Meier&selected_facets=persons_exact:Heisenberg&selected_facets=persons_exact:Heinz&selected_facets=persons_exact:Schneider&selected_facets=persons_exact:Hans&selected_facets=persons_exact:Heinz&selected_facets=persons_exact:Heisenberg&selected_facets=persons_exact:Heisenberg&selected_facets=persons_exact:Heisenberg
+
+
+{'response': {'start': 0, 'numFound': 39278670, 'docs': [{'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['18.05.1922'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_050', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 50'], 'mpiwg-dri': 'MPIWG:D1H4N2FN', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['25.05.1917'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_027', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 27'], 'mpiwg-dri': 'MPIWG:87WX6ZK6', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['29.04.1916'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_015', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 15'], 'mpiwg-dri': 'MPIWG:CUA74W7K', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': [''], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_062', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 62'], 'mpiwg-dri': 'MPIWG:3CS6TEHH', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['03.01.1916'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_068', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 68'], 'mpiwg-dri': 'MPIWG:M16V30VA', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['12.02.1921'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_065', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 65'], 'mpiwg-dri': 'MPIWG:30AHB36Y', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['18.10.1916'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_012', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 12'], 'mpiwg-dri': 'MPIWG:1T9V01TU', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['06.09.1916'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_018', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 18'], 'mpiwg-dri': 'MPIWG:K70BT7KW', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': ['29.12.1915'], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_020', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 20'], 'mpiwg-dri': 'MPIWG:A9A8G5FU', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'doc-type': ['indexMeta'], 'IM_call-number': [''], 'author_c': ['Einstein, Albert'], 'IM_date': [''], 'title': [''], 'archive-path': '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_057', 'access-type': '', 'IM_signature': ['AHQP, M/f No. 1, Sect. 57'], 'mpiwg-dri': 'MPIWG:A8WWQAHF', 'author': ['Einstein, Albert'], 'title_s': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/DB36FBC852A844EB80BBD319B4C20ACBE245A7DB', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405265%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FDB36FBC852A844EB80BBD319B4C20ACBE245A7DB&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405265%3A405265.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/C14CC2D77FA15D60B24D24C4CA842F38E8E9ADF1', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405266%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FC14CC2D77FA15D60B24D24C4CA842F38E8E9ADF1&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405266%3A405266.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/E0983F1AE15CF13D4D6474730E70A9FAAE63BC36', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405267%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FE0983F1AE15CF13D4D6474730E70A9FAAE63BC36&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405267%3A405267.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F4D6CF5DA47B4964FE936C7154D719D2A7174436', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405268%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF4D6CF5DA47B4964FE936C7154D719D2A7174436&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405268%3A405268.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F311AB06997F9D10F2F44BC5CC70052C567AF59E', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405269%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF311AB06997F9D10F2F44BC5CC70052C567AF59E&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405269%3A405269.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/CE725B9A2B9683A152E9002DFBB34CD8D02D063B', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405270%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FCE725B9A2B9683A152E9002DFBB34CD8D02D063B&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405270%3A405270.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F56D65E32438EF5A93EA9F6B04F03E70A510DA46', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405271%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF56D65E32438EF5A93EA9F6B04F03E70A510DA46&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405271%3A405271.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/57E1D4306174DDEF7C997B98CDF9B68439062788', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405272%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F57E1D4306174DDEF7C997B98CDF9B68439062788&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405272%3A405272.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/7B901B857A3876ADDBFFE9B1627385220AF410F5', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405273%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F7B901B857A3876ADDBFFE9B1627385220AF410F5&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405273%3A405273.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/EC9EEBB2F0FCD3B45BF0B590B572FFF0D26A05DA', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405274%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FEC9EEBB2F0FCD3B45BF0B590B572FFF0D26A05DA&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405274%3A405274.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/8D78DABDCA64B8A2BD3467198FACE057D6A4E438', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405275%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F8D78DABDCA64B8A2BD3467198FACE057D6A4E438&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405275%3A405275.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/9F60C7CBC21110F07DD2F43617C284CDB9B5E8CD', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405276%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F9F60C7CBC21110F07DD2F43617C284CDB9B5E8CD&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405276%3A405276.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}]}, 'responseHeader': {'params': {'f.title_s.facet.limit': '50', 'f.year.facet.range.end': '2020', 'pf': 'title^2.0 author^1.0', 'f.doc-type.facet.limit': '50', 'fl': 'id,entity_type,author_c,author,title,title_s,keyword,year,IM_date,IM_signature,IM_call-number,archive-path,doc-type,mpiwg-dri,access-type,content', 'hl.mergeContigious': 'true', 'f.access-type.facet.limit': '50', 'f.year.facet.limit': '50', 'hl': 'true', 'f.doc-type.facet.mincount': '1', 'f.collection.facet.limit': '50', 'fq': 'author_c:"Einstein, Albert"', 'facet.sort': 'count', 'f.year.facet.range.start': '1', 'json.nl': 'map', 'f.title_s.facet.mincount': '1', 'f.author_c.facet.limit': '50', 'facet': 'true', 'hl.snippets': '3', 'f.content.hl.alternateField': 'teaser', 'f.author_c.facet.mincount': '1', 'facet.range': 'year', 'f.collection.facet.mincount': '1', 'rows': '10', 'ps': '15', 'mm': '1', 'wt': 'json', 'hl.fl': 'title', 'start': '0', 'f.content.hl.maxAlternateFieldLength': '256', 'spellcheck': 'true', 'f.access-type.facet.mincount': '1', 'q': '*', 'facet.field': 'author_c', 'facet.mincount': '1', 'f.year.facet.range.gap': '20'}, 'status': 0, 'QTime': 46}, 'highlighting': {'/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_018': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_027': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_065': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_020': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_062': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_050': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_068': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_057': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_012': {}, '/mpiwg/online/permanent/echo/quantum_project/ahqp/001/001_015': {}}, 'facet_counts': {'facet_ranges': {'year': {'counts': {'1981': 34, '1901': 364, '1961': 25, '1941': 481, '2001': 23, '1921': 665}, 'start': 1, 'end': 2021, 'gap': 20}}, 'facet_fields': {'doc-type': {'external': 100000}, 'author_c': {'Straus, Ernst G.': 5, 'Maric, Mileva': 6, 'Kahler, Eric': 2, 'Mayer, Walther': 12, 'Freud, Sigmund': 7, 'Born, Max': 6, 'Bergmann, P. G.': 1, 'Haas, W. J. de': 3, 'Hopf, Ludwig': 6, 'Mayer, W.': 8, 'Mühsam, Hans': 2, 'Cartan, Élie': 1, 'Murphy, James': 2, 'Einstein, Albert': 1790, 'Bargmann, Valentine': 2, 'Garnett, William': 1, 'Born, Hedwig': 3, 'Donder, Theophile de': 1, 'Curie, Marie': 1, 'Bergmann, Peter G.': 1, 'Planck, Max': 5, 'Brunn, Albert von': 1, 'Foerster, Friedrich Wilhelm': 1, 'Russ, Monique': 2, 'Boni, Nell': 2, 'Besso, Michele': 5, 'Fantova, Hanna': 1, 'Laurence, Dan H.': 2, 'Pauli, Wolfgang': 2, 'Haas, Wander Johannes de': 2, 'Infeld, Leopold': 16, 'Rosen, Nathan': 4, 'Bergmann, Peter': 1, 'Schrödinger, Ernst': 2, 'Rosen, N.': 4, 'Kaufman, B.': 5, 'Fokker, Adriaan D.': 1, 'Sommerfeld, Arnold': 4, 'Podolsky, Boris': 3, 'Bergmann, P.': 1, 'Fokker, Adriaan Danie͏̈l': 1, 'Ehrenfest, Paul': 4, 'Minkowski, Hermann': 8, 'Grossmann, Marcel': 6, 'Laub, Jakob': 7, 'Lorentz, Hendrik Antoon': 12, 'Grommer, Jakob': 5, 'Donder, Théophile de': 1, 'Fleming, John Ambrose': 1, 'Bargmann, V.': 2}}, 'facet_queries': {}, 'facet_dates': {}}}
+{'response': {'numFound': 39276880, 'docs': [{'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/DB36FBC852A844EB80BBD319B4C20ACBE245A7DB', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405265%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FDB36FBC852A844EB80BBD319B4C20ACBE245A7DB&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405265%3A405265.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/C14CC2D77FA15D60B24D24C4CA842F38E8E9ADF1', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405266%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FC14CC2D77FA15D60B24D24C4CA842F38E8E9ADF1&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405266%3A405266.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/E0983F1AE15CF13D4D6474730E70A9FAAE63BC36', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405267%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FE0983F1AE15CF13D4D6474730E70A9FAAE63BC36&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405267%3A405267.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F4D6CF5DA47B4964FE936C7154D719D2A7174436', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405268%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF4D6CF5DA47B4964FE936C7154D719D2A7174436&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405268%3A405268.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F311AB06997F9D10F2F44BC5CC70052C567AF59E', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405269%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF311AB06997F9D10F2F44BC5CC70052C567AF59E&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405269%3A405269.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/CE725B9A2B9683A152E9002DFBB34CD8D02D063B', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405270%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FCE725B9A2B9683A152E9002DFBB34CD8D02D063B&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405270%3A405270.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/F56D65E32438EF5A93EA9F6B04F03E70A510DA46', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405271%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FF56D65E32438EF5A93EA9F6B04F03E70A510DA46&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405271%3A405271.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/57E1D4306174DDEF7C997B98CDF9B68439062788', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405272%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F57E1D4306174DDEF7C997B98CDF9B68439062788&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405272%3A405272.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/7B901B857A3876ADDBFFE9B1627385220AF410F5', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405273%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F7B901B857A3876ADDBFFE9B1627385220AF410F5&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405273%3A405273.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/EC9EEBB2F0FCD3B45BF0B590B572FFF0D26A05DA', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405274%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2FEC9EEBB2F0FCD3B45BF0B590B572FFF0D26A05DA&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405274%3A405274.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/8D78DABDCA64B8A2BD3467198FACE057D6A4E438', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405275%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F8D78DABDCA64B8A2BD3467198FACE057D6A4E438&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405275%3A405275.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}, {'provider': ['Archives Portal Europe'], 'year': [''], 'IM_title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'title': ['Context information: Rijksfotoarchief: Collectie Heidemaatschappij, 1910-1970 - positieven >> Rijksfotoarchief: Collectie Heidemaatschappij, positieven'], 'doc-type': ['external'], 'archive-path': '/09003/9F60C7CBC21110F07DD2F43617C284CDB9B5E8CD', 'url': ['http://europeana.eu/api/25108/redirect?shownAt=http%3A%2F%2Fbeeldbank.nationaalarchief.nl%2Fna%3Acol1%3Adat405276%3A0%3Fbt%3Deuropeanaapi&provider=Archives+Portal+Europe&id=http%3A%2F%2Fwww.europeana.eu%2Fresolve%2Frecord%2F09003%2F9F60C7CBC21110F07DD2F43617C284CDB9B5E8CD&profile=standard'], 'image': ['http://europeanastatic.eu/api/image?uri=http%3A%2F%2Fna.memorix.nl%2Foai2%2F%3Fimage%3Dna%3Acol1%3Adat405276%3A405276.jpg%26type%3Dlarge&size=LARGE&type=IMAGE'], 'author': ['']}]}, 'facet_counts': {'facet_fields': {'doc-type': {'external': 100000}}, 'facet_queries': {}}}
+
+
+
+http://md.mpiwg-berlin.mpg.de:8983/solr/collection1/select?start=0&rows=10&fq=doc-type%3A*&spellcheck=true&q=*&fl=id%2Centity_type%2Cauthor_c%2Cauthor%2Ctitle%2Ctitle_s%2Ckeyword%2Cyear%2CIM_date%2CIM_signature%2CIM_call-number%2Carchive-path%2Cdoc-type%2Cmpiwg-dri%2Caccess-type%2Ccontent&mm=1&pf=title^2.0%20author^1.0&ps=15&hl=true&hl.fl=title&hl.snippets=3&hl.mergeContigious=true&f.content.hl.alternateField=teaser&f.content.hl.maxAlternateFieldLength=256&facet=true&facet.sort=count&facet.mincount=1&facet.field=doc-type&facet.field=title_s&facet.field=access-type&facet.field=collection&facet.field=author_c&f.doc-type.facet.limit=50&f.doc-type.facet.mincount=1&f.title_s.facet.limit=50&f.title_s.facet.mincount=1&f.access-type.facet.limit=50&f.access-type.facet.mincount=1&f.collection.facet.limit=50&f.collection.facet.mincount=1&facet.range=year&f.year.facet.range.start=1&f.year.facet.range.end=2020&f.year.facet.range.gap=20&f.year.facet.limit=50&f.author_c.facet.limit=50&f.author_c.facet.mincount=1&wt=json&json.nl=map
+
+
+"responseHeader":{"status":0,"QTime":51,"params":{"spellcheck":"true","facet":"true","f.doc-type.facet.mincount":"1","facet.range":"year","f.year.facet.range.end":"2020","f.author_c.facet.mincount":"1","hl":"true","f.collection.facet.limit":"50","f.collection.facet.mincount":"1","fl":"id,entity_type,author_c,author,title,title_s,keyword,year,IM_date,IM_signature,IM_call-number,archive-path,doc-type,mpiwg-dri,access-type,content","f.year.facet.range.gap":"20","f.content.hl.alternateField":"teaser","f.author_c.facet.limit":"50","hl.mergeContigious":"true","facet.field":["doc-type","title_s","access-type","collection","author_c"],"f.doc-type.facet.limit":"50","fq":"doc-type:*","mm":"1","f.year.facet.limit":"50","f.title_s.facet.limit":"50","f.year.facet.range.start":"1","facet.mincount":"1","f.content.hl.maxAlternateFieldLength":"256","hl.fl":"title","json.nl":"map","wt":"json","f.title_s.facet.mincount":"1","rows":"10","pf":"title^2.0 author^1.0","hl.snippets":"3","f.access-type.facet.limit":"50","facet.sort":"count","start":"0","q":"*","f.access-type.facet.mincount":"1","ps":"15"}},
+
+
+http://localhost:8000/search/cl2/select?start=0&rows=10&fq=doc-type%3A*&spellcheck=true&q=*&fl=id%2Centity_type%2Cauthor_c%2Cauthor%2Ctitle%2Ctitle_s%2Ckeyword%2Cyear%2CIM_date%2CIM_signature%2CIM_call-number%2Carchive-path%2Cdoc-type%2Cmpiwg-dri%2Caccess-type%2Ccontent&mm=1&pf=title^2.0%20author^1.0&ps=15&hl=true&hl.fl=title&hl.snippets=3&hl.mergeContigious=true&f.content.hl.alternateField=teaser&f.content.hl.maxAlternateFieldLength=256&facet=true&facet.sort=count&facet.mincount=1&facet.field=doc-type&facet.field=title_s&facet.field=access-type&facet.field=collection&facet.field=author_c&f.doc-type.facet.limit=50&f.doc-type.facet.mincount=1&f.title_s.facet.limit=50&f.title_s.facet.mincount=1&f.access-type.facet.limit=50&f.access-type.facet.mincount=1&f.collection.facet.limit=50&f.collection.facet.mincount=1&facet.range=year&f.year.facet.range.start=1&f.year.facet.range.end=2020&f.year.facet.range.gap=20&f.year.facet.limit=50&f.author_c.facet.limit=50&f.author_c.facet.mincount=1&wt=json&json.
+
+{"responseHeader":{"status":0,"QTime":49,"params":{"spellcheck":"true","facet":"true","f.doc-type.facet.mincount":"1","facet.range":"year","f.year.facet.range.end":"2020","f.author_c.facet.mincount":"1","hl":"true","f.collection.facet.limit":"50","f.collection.facet.mincount":"1","fl":"id,entity_type,author_c,author,title,title_s,keyword,year,IM_date,IM_signature,IM_call-number,archive-path,doc-type,mpiwg-dri,access-type,content","f.year.facet.range.gap":"20","f.content.hl.alternateField":"teaser","f.author_c.facet.limit":"50","hl.mergeContigious":"true","facet.field":"author_c","f.doc-type.facet.limit":"50","fq":"doc-type:*","f.year.facet.limit":"50","mm":"1","f.title_s.facet.limit":"50","f.year.facet.range.start":"1","facet.mincount":"1","f.content.hl.maxAlternateFieldLength":"256","hl.fl":"title","wt":"json","f.title_s.facet.mincount":"1","rows":"10","pf":"title^2.0 author^1.0","hl.snippets":"3","start":"0","facet.sort":"count","f.access-type.facet.limit":"50","json.":"","q":"*","f.access-type.facet.mincount":"1","ps":"15"}},
+
+
+str: http://md.mpiwg-berlin.mpg.de:8983/solr/collection1/select?facet.range=year&f.year.facet.range.start=1&f.doc-type.facet.mincount=1&hl.fl=title&f.year.facet.range.gap=20&mm=1&hl.snippets=3&spellcheck=true&hl=true&facet=true&f.title_s.facet.limit=50&f.year.facet.range.end=2020&json.=&f.collection.facet.mincount=1&wt=json&facet.sort=count&pf=title%5E2.0+author%5E1.0&f.title_s.facet.mincount=1&f.access-type.facet.mincount=1&q=%2A&f.content.hl.alternateField=teaser&start=0&rows=10&f.year.facet.limit=50&ps=15&f.access-type.facet.limit=50&f.content.hl.maxAlternateFieldLength=256&f.author_c.facet.mincount=1&facet.mincount=1&f.doc-type.facet.limit=50&facet.field=author_c&f.collection.facet.limit=50&fq=doc-type%3A%2A&fl=id%2Centity_type%2Cauthor_c%2Cauthor%2Ctitle%2Ctitle_s%2Ckeyword%2Cyear%2CIM_date%2CIM_signature%2CIM_call-number%2Carchive-path%2Cdoc-type%2Cmpiwg-dri%2Caccess-type%2Ccontent&hl.mergeContigious=true&f.author_c.facet.limit=50
+
+
+searchUrl   str: http://md.mpiwg-berlin.mpg.de:8983/solr/collection1/select?fq=doc-type%3A%2A&f.year.facet.range.end=2020&rows=10&facet.sort=count&q=%2A&mm=1&f.collection.facet.limit=50&hl.mergeContigious=true&f.year.facet.range.gap=20&hl=true&wt=json&fl=id%2Centity_type%2Cauthor_c%2Cauthor%2Ctitle%2Ctitle_s%2Ckeyword%2Cyear%2CIM_date%2CIM_signature%2CIM_call-number%2Carchive-path%2Cdoc-type%2Cmpiwg-dri%2Caccess-type%2Ccontent&f.title_s.facet.mincount=1&facet.mincount=1&hl.snippets=3&f.author_c.facet.limit=50&f.author_c.facet.mincount=1&ps=15&facet=true&f.year.facet.range.start=1&f.year.facet.limit=50&facet.field=author_c&hl.fl=title&f.doc-type.facet.limit=50&facet.range=year&f.content.hl.maxAlternateFieldLength=256&f.access-type.facet.limit=50&f.title_s.facet.limit=50&json.=&f.content.hl.alternateField=teaser&start=0&spellcheck=true&pf=title%5E2.0+author%5E1.0&f.collection.facet.mincount=1&f.access-type.facet.mincount=1&f.doc-type.facet.mincount=1  
+
+
+
+str: http://md.mpiwg-berlin.mpg.de:8983/solr/collection1/select?facet.range=year&f.year.facet.range.start=1&f.doc-type.facet.mincount=1&hl.fl=title&f.year.facet.range.gap=20&mm=1&hl.snippets=3&spellcheck=true&hl=true&facet=true&f.title_s.facet.limit=50&f.year.facet.range.end=2020&json.=&f.collection.facet.mincount=1&wt=json&facet.sort=count&pf=title%5E2.0+author%5E1.0&f.title_s.facet.mincount=1&f.access-type.facet.mincount=1&q=%2A&f.content.hl.alternateField=teaser&start=0&rows=10&f.year.facet.limit=50&ps=15&f.access-type.facet.limit=50&f.content.hl.maxAlternateFieldLength=256&f.author_c.facet.mincount=1&facet.mincount=1&f.doc-type.facet.limit=50&facet.field=author_c&f.collection.facet.limit=50&fq=doc-type%3A%2A&fl=id%2Centity_type%2Cauthor_c%2Cauthor%2Ctitle%2Ctitle_s%2Ckeyword%2Cyear%2CIM_date%2CIM_signature%2CIM_call-number%2Carchive-path%2Cdoc-type%2Cmpiwg-dri%2Caccess-type%2Ccontent&hl.mergeContigious=true&f.author_c.facet.limit=50
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proxy/admin.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,5 @@
+from django.contrib import admin
+from proxy.models import Server
+
+# Register your models here.
+admin.site.register(Server)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proxy/models.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,13 @@
+from django.db import models
+
+# Create your models here.
+class Server(models.Model):
+    serverUrl=models.URLField()
+    title=models.CharField(max_length=100)
+    proxyId=models.CharField(max_length=10)
+    type=models.CharField(max_length=10,default="solr")
+    key=models.CharField(max_length=255,default="")
+    metaDataUrl=models.URLField(default="http://none")
+    providerLogo=models.URLField(default="http://none")
+    
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proxy/tests.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/proxy/views.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,494 @@
+from django.shortcuts import render
+from django.views.generic.base import View
+from proxy.models import Server
+import urllib
+from django.http.response import StreamingHttpResponse, HttpResponse,\
+    JsonResponse
+
+import json
+import mergedict
+
+
+class GetMD(View):
+    def get(self,request,objid="",proxyId="cl1"):
+        
+        #ret={'title':objid,'creator':'EP','date':''}
+        
+        srv=Server.objects.get(proxyId=proxyId)
+        
+        
+        objid=urllib.parse.unquote(objid)
+        
+        
+        url=srv.metaDataUrl%objid+"?wskey="+srv.key
+        
+    
+        
+        txt=urllib.request.urlopen(url)
+        
+        print(txt);
+        
+        obj = json.loads(txt.read().decode('utf-8'))['object']
+        
+        ret={}
+        ret['title']="\n".join(obj['title'])
+        ret['date']="\n".join(obj.get('year',[]))
+        ret['viewerurl']="http://europeana.eu/portal/record/%s.html"%objid
+        ret['thumburl']=obj['europeanaAggregation']['edmPreview']
+        
+        labels=[]
+        for agent in obj.get('agents',[]):
+            label=";".join(agent['prefLabel']['def'])
+            labels.append(label)
+        ret['creator']="\n".join(labels)
+        
+        
+        
+        
+        ret['accessType']="free"
+        ret['provider']=srv.type
+        ret['providerLogo']=srv.providerLogo
+        return JsonResponse(ret)
+        
+
+class SearchAllView(View):
+    
+    
+    
+   
+
+    def get(self,request,command=""):
+        #ret = mergedict.ConfigDict()
+        ret={}
+        
+        #params = dict(request.REQUEST.dicts[1])
+        #params = request.GET.copy()
+        #params['wt']="json"
+        jsRes={}
+        
+        params_full= dict(request.REQUEST.dicts[1])
+        
+        
+        for proxy in Server.objects.all():
+           
+            if proxy.type=="solr":
+                params = params_full
+                #params = request.GET.copy()
+                params['wt']="json"
+                
+                
+                #make surre that there is at minimum * for search in q
+                params['q']=params.get('q',['*'])# want at minimum a start
+                
+                #this should not be the case normally it is list
+                if params['q']=="":
+                    params['q']="*"
+                    
+                if isinstance(params['q'], list): #should normally always be true
+                    if len(params['q']) == 0:
+                        params['q']=['*']
+                    elif len(params['q']) == 1 and params['q'][0]=='':
+                        params['q']=['*']
+                    
+                    
+                
+                
+       
+                selected_facets=params.get("fq",[])
+             
+                facets_new=[]
+                
+                wrongFacet=False
+                for facets in selected_facets:
+                    if facets.startswith("provider:"):
+                        wrongFacet=True
+                    
+                    if facets.startswith("data_provider:"):
+                          wrongFacet=True
+                          
+                    if facets.startswith("type:"):
+                          wrongFacet=True
+                   
+                   
+                    facets_new.append(facets)
+                
+                params["fq"] = facets_new;
+                
+              
+                facetFields=params["facet.field"]
+                
+               
+                try:
+                    del facetFields[facetFields.index("provider")]
+                   
+                except:
+                    pass
+                
+                try:
+                    del facetFields[facetFields.index("data_provider")]
+                   
+                except:
+                    pass
+                
+                try:
+                    del facetFields[facetFields.index("type")]
+                   
+                except:
+                    pass
+                
+                params["facet.field"]=facetFields
+                
+                
+                #if (proxy.key!=None) and (proxy.key!=""):
+                #   params['oauth_consumer_key']=proxy.key
+                
+                searchUrl =proxy.serverUrl+"/"+command+"?"+urllib.parse.urlencode(params,True)
+                
+                print (searchUrl)
+                
+                #search = urllib.request.urlopen(searchUrl)
+                #ct = search.headers['content-type']
+                
+                
+                if wrongFacet:
+                    jsRes={} #keine ergebnis in dieser Suche
+                else:
+                    #print("load")
+                    #print (searchUrl)
+                    txt=str(urllib.request.urlopen(searchUrl).read().decode('utf-8'))
+                    #print(txt)
+                    jsRes = json.loads(txt)
+                   
+            elif proxy.type=="europeana":
+                params = request.GET.copy()
+                paramsNew = {}
+                
+                paramsNew['query']=params.get('q',"")
+                if (paramsNew['query'])=="":
+                     paramsNew['query']="*" #Europeana doesn't want empty strings
+                
+                
+                
+                #special queries author_c ---> who
+                paramsNew['query']= paramsNew['query'].replace("author_c","who")
+                paramsNew['query']= paramsNew['query'].replace("title_s:","")
+               
+                #europeana doesn't want '"'
+                paramsNew['query']= paramsNew['query'].replace('"','')
+                
+                
+                
+                     
+                selected_facets = params_full.get("fq",[])
+                
+                #wenn faceten aus gewaehlt werdeb und external nicht ausgewaehlt is dann muss er hier nicht machen
+                
+                #print ("SD")
+                #print (selected_facets)
+                
+                dt_selected=False
+                external=False
+                try:
+                    del selected_facets[selected_facets.index("doc-type:*")] # loesche den generischen aufruf, interssant nur wenn fasseten ausgesucht sind
+                except:
+                    pass
+                 
+                try:
+                    del selected_facets[selected_facets.index("access-type:free")] # loesche den access type free da nicht relevant fuer external
+                except:
+                    pass
+
+                
+                facets_new=[]
+                for facets in selected_facets:
+                   
+                     #facets_new.append(facets)
+                  
+                    
+                    if (facets=="doc-type:external"):
+                        external=True
+                        dt_selected=True
+                    elif facets.startswith("doc-type:"):
+                        dt_selected=True
+                    else:
+                        
+                        
+                        facets=facets.replace("data_provider:","DATA_PROVIDER:")
+                        facets=facets.replace("provider:","PROVIDER:")
+                        facets=facets.replace("type:","TYPE:")
+                        facets_new.append(facets)
+               
+                paramsNew["qf"]=facets_new
+#                 cont=True
+#                 
+
+#                 if (len(selected_facets)>0) and  "doc-type:external" not in selected_facets:
+#                         cont=False #external nicht ausgesucht
+#                 
+
+               
+                    
+                
+                
+                #print("SD2")
+                
+                if  (dt_selected and external) or not dt_selected:
+                    
+                    try:
+                        paramsNew['start']=int(params['start'][0])+1 #europeana starts with 1
+                    except:
+                        paramsNew['start']=1
+                    
+                    
+                    
+                    
+                    
+                    #print("start search proc")
+             
+                    searchUrl =proxy.serverUrl+"?wskey="+proxy.key+"&"+urllib.parse.urlencode(paramsNew,True)+"&profile=facets"
+                    
+                    
+                    try:
+                        #print ("asking europeana")
+                        search = urllib.request.urlopen(searchUrl)
+                    except:
+                        #print("SEARCH ERROR:"+searchUrl)
+                        continue #stope this part of the search if there is an error (normally a facet not supported)
+                    
+                    #print("got an answer")
+                    ct = search.headers['content-type']
+                    
+                    
+                    #print(searchUrl)
+        
+                    jsResOrig = json.loads(urllib.request.urlopen(searchUrl).read().decode('utf-8'))
+                    
+                    resNr = jsResOrig['totalResults']
+                    
+                    newitems=[]
+                    for item in jsResOrig.get("items",[]):
+                        newitem={}
+                        newitem['IM_title']=item['title']
+                        newitem['title']=item['title']
+                        newitem['year']=item.get('year',[''])
+                        #newitem['author']=item.get('dcCreator',[''])
+                        
+                        newitem['author']=[]
+                        agents = item.get('edmAgentLabel',[])
+                        for agent in agents:
+                            newitem['author'].append(agent['def'])
+                            
+                        
+                        
+                        
+                        newitem['url']=item.get("edmIsShownAt",[''])
+                        newitem['image']=item.get("edmPreview",[''])
+                        newitem['archive-path']=item['id']
+                        newitem['objid']=item['id']
+                        newitem['doc-type']=['external']
+                        newitem['mpiwg-dri']=item['id']
+                        newitem['dataSource']=proxy.title
+                        newitem['provider']=item.get("provider",[])
+                        
+                        newitems.append(newitem)
+                        
+                        
+                    response={}
+                    response['numFound']=resNr
+                    response['docs']=[]
+                    for item in newitems:
+                       
+                        response['docs'].append(item)
+        
+                        
+                         
+                
+                
+                
+                    jsRes={}
+                    jsRes['response']=response
+                    jsRes["facet_counts"]={}
+                    jsRes["facet_counts"]["facet_queries"]={}
+                    jsRes["facet_counts"]["facet_fields"]={"doc-type": {"external":resNr}}
+                    
+                    
+                    facets = jsResOrig.get("facets",[])
+                    
+                    
+                    facetsDict={}
+                    for facet in facets:
+                        facetsDict[facet['name']]=facet['fields']
+                    
+                    
+                    
+                    jsRes["facet_counts"]["facet_ranges"]={}
+                    
+                    jsRes["facet_counts"]["facet_fields"]["year_plain"]= self.remapFacetDict(facetsDict.get('YEAR',[]))
+                    jsRes["facet_counts"]["facet_ranges"]["year"]= {"counts":self.remapFacetDict(facetsDict.get('YEAR',[])),"gap":20,"start":1,"end":2021}
+                    
+                    
+                    jsRes["facet_counts"]["facet_fields"]["provider"]= self.remapFacetDict(facetsDict.get('PROVIDER',[]))
+                    jsRes["facet_counts"]["facet_fields"]["data_provider"]= self.remapFacetDict(facetsDict.get('DATA_PROVIDER',[]))
+                    jsRes["facet_counts"]["facet_fields"]["type"]= self.remapFacetDict(facetsDict.get('TYPE',[]))
+                   
+                   
+                
+                
+            #ret.merge(jsRes)
+            #ret.update(jsRes)
+            ret=self.add(ret,jsRes)
+            #print (ret)
+            #print(jsRes)
+        
+        return JsonResponse(ret,safe=False)
+        
+    
+        
+        
+        
+        
+    def remapFacetDict(self,facet):
+        
+        ret={}
+        for x in facet:
+           ret[x['label']]=x['count']
+            
+        return ret
+        #return [(x['label'],x['count']) for x in facet ]  
+        
+    def add(self,x,y):
+        if x=={}:
+            return y
+        x['response']['docs']=x['response']['docs']+(y['response']['docs'])
+        x['response']['numFound']=x['response']['numFound']+(y['response']['numFound'])
+            
+            
+        for ff in set(list(x['facet_counts']['facet_fields'].keys())+list(y['facet_counts']['facet_fields'].keys())):
+            #print (ff)
+            x1=x['facet_counts']['facet_fields'].get(ff,[])
+            y1=y['facet_counts']['facet_fields'].get(ff,[])
+            
+            #print(x1)
+            #print(y1)
+            try:
+                nw = x['facet_counts']['facet_fields'].get(ff,[])+y['facet_counts']['facet_fields'].get(ff,[])
+            except:
+                
+                
+                
+               
+                x1=x['facet_counts']['facet_fields'].get(ff,{})
+                y1=y['facet_counts']['facet_fields'].get(ff,{})
+                #print(x1)
+                #print(y1)
+                
+                try:
+                    x1.update(y1)
+                    nw = x1
+                except:
+                    nw = y1
+                
+            x['facet_counts']['facet_fields'][ff]=nw
+            
+        
+        return x
+            
+            
+
+class SearchProxyView(View):
+    def get(self,request,proxyId="",command=""):
+        
+        
+       
+        
+       
+        proxy = Server.objects.get(proxyId=proxyId)
+        
+        
+        
+        
+        #fullpath = request.get_full_path();
+        
+            
+        #params = request.GET.copy()
+        params = dict(request.REQUEST.dicts[1])
+        #urlencode does not work correctly with a query dict.
+        
+        
+        if proxy.type=="solr":
+        
+            searchUrl =proxy.serverUrl+"/"+command+"?"+urllib.parse.urlencode(params,True)
+        
+            #print(searchUrl)
+        
+            search = urllib.request.urlopen(searchUrl)
+            ct = search.headers['content-type']
+        
+        
+            return StreamingHttpResponse(search,content_type=ct)
+        
+        
+        
+        else:
+            paramsNew = {}
+            paramsNew['query']=params['q']
+            
+            try:
+                paramsNew['start']=int(params['start'][0])+1 #europeana starts with 1
+            except:
+                paramsNew['start']=1
+                
+            searchUrl =proxy.serverUrl+"?wskey="+proxy.key+"&"+urllib.parse.urlencode(paramsNew,True)
+            
+            search = urllib.request.urlopen(searchUrl)
+            ct = search.headers['content-type']
+        
+           
+
+            jsRes = json.loads(urllib.request.urlopen(searchUrl).read().decode('utf-8'))
+            
+            resNr = jsRes['totalResults']
+            
+            newitems=[]
+            for item in jsRes['items']:
+                newitem={}
+                newitem['IM_title']=item['title']
+                newitem['title']=item['title']
+                newitem['year']=item.get('year',[''])
+                newitem['author']=item.get('dcCreator',[''])
+                newitem['url']=item.get("edmIsShownAt",[''])
+                newitem['image']=item.get("edmPreview",[''])
+                newitem['archive-path']=item['id']
+                newitem['doc-type']=['external']
+                newitem['mpiwg-dri']=item['id']
+                newitem['provider']=item.get("provider",[])
+                
+                newitems.append(newitem)
+                
+                
+            response={}
+            response['numFound']=resNr
+            response['docs']=[]
+            for item in newitems:
+               
+                response['docs'].append(item)
+                #for key,values in item.items():
+                #    xml+="""<arr name="%s">"""%key
+                #    
+                #    for val in values:
+                #        xml+="<str>%s</str>"%val
+                #    xml+="</arr>"
+               # 
+                
+               # xml+="</doc>"
+                
+            
+            
+        res={}
+        res['response']=response
+        res["facet_counts"]={}
+        res["facet_counts"]["facet_queries"]={}
+        res["facet_counts"]["facet_fields"]={"doc-type": {"external":100000}}
+          
+        return JsonResponse(res)
+        return HttpResponse(res,content_type="application/json")# Create your views here.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchProxy/settings.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,95 @@
+"""
+Django settings for searchProxy project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.7/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'p5ej6v$t4*+4$9)mu=^&makp8r=gri8wkx8!2hhfin3-9old*%'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+TEMPLATE_DEBUG = True
+
+SETTINGS_PATH = os.path.normpath(os.path.dirname(__file__))
+# Find templates in the same folder as settings.py.
+TEMPLATE_DIRS = (
+    os.path.join(SETTINGS_PATH, 'templates'),
+    os.path.join(SETTINGS_PATH, '../ttools/templates'),
+)
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+    'django.contrib.admin',
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.messages',
+    'django.contrib.staticfiles',
+    'proxy',
+    'corsheaders',  
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'corsheaders.middleware.CorsMiddleware',    
+    'django.middleware.common.CommonMiddleware',
+    #'django.middleware.csrf.CsrfViewMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
+    'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
+ROOT_URLCONF = 'searchProxy.urls'
+
+WSGI_APPLICATION = 'searchProxy.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+    }
+}
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.7/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.7/howto/static-files/
+
+STATIC_URL = '/static/'
+
+CORS_ORIGIN_ALLOW_ALL = True
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchProxy/urls.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,22 @@
+from django.conf.urls import patterns, include, url
+from django.contrib import admin
+import proxy.views
+import ttools.views
+from django.views.decorators.csrf import csrf_protect
+from django.views.generic import TemplateView
+
+
+
+
+urlpatterns = patterns('',
+    # Examples:
+    # url(r'^$', 'searchProxy.views.home', name='home'),
+    # url(r'^blog/', include('blog.urls')),
+
+    url(r'^admin/', include(admin.site.urls)),
+    url(r'^search/(?P<proxyId>.*)/(?P<command>.*)$',proxy.views.SearchProxyView.as_view(), name='showSource'),
+    url(r'^searchall/(?P<command>.*)$',proxy.views.SearchAllView.as_view(), name='showallSource'),
+    url(r'^getMD/(?P<objid>.*)$',proxy.views.GetMD.as_view(), name='getMD '),
+    url(r'^tt$',ttools.views.TextToolAnalyse.as_view()),
+    url(r'^tt/api$',TemplateView.as_view(template_name="api.html"))
+)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/searchProxy/wsgi.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,14 @@
+"""
+WSGI config for searchProxy project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "searchProxy.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttools/note.txt	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,46 @@
+{
+
+    "time": 2,
+    "annotations": 
+
+[
+
+{
+
+    "start": 4,
+    "end": 7,
+    "spot": "ist",
+    "confidence": 0.6438,
+    "id": 1025859,
+    "title": "Instituto Superior Técnico",
+    "uri": "http://en.wikipedia.org/wiki/Instituto_Superior_T%C3%A9cnico",
+    "label": "Instituto Superior Técnico"
+
+},
+{
+
+    "start": 8,
+    "end": 23,
+    "spot": "Albert Einstein",
+    "confidence": 0.9177,
+    "id": 736,
+    "title": "Albert Einstein",
+    "uri": "http://en.wikipedia.org/wiki/Albert_Einstein",
+    "label": "Albert Einstein"
+
+},
+
+    {
+        "start": 28,
+        "end": 34,
+        "spot": "Berlin",
+        "confidence": 0.7855,
+        "id": 308234,
+        "title": "Humboldt University of Berlin",
+        "uri": "http://en.wikipedia.org/wiki/Humboldt_University_of_Berlin",
+        "label": "University of Berlin"
+    }
+
+],
+"lang": "en",
+"timestamp": "2015-02-02T18:08:55.061"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttools/templates/api.html	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,173 @@
+<h2>How to use the API</h2>
+
+This service implements a simpler versiom of the API defined at
+ <a href="https://dandelion.eu/docs/api/datatxt/nex/v1/">Dandelion.eu for text extraction</a> and was
+ mainly designed to serve the needs of Pundit (<a href="https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-content/wiki/pundit">https://it-dev.mpiwg-berlin.mpg.de/tracs/mpdl-project-content/wiki/pundit</a>)
+ 
+ 
+ The call is
+ 
+ <a href="../tt?text=Ego+sum+in+horto&lang=lat">tt?text=Ego+sum+in+horto&lang=lat</a>
+ 
+ <h3>Text</h3>
+ 
+ Text expects plain text. 
+ 
+ <h3>lang</h3>
+ Lang can either be "lat" for latin, "gre" for greek or "ita" for (old) Italian.
+ 
+ 
+ It returns a JSON file with the annotated text as described at  <a href="https://dandelion.eu/docs/api/datatxt/nex/v1/">Dandelion.eu</a>,
+ while 
+ <ul>
+ <li><b>title=label</b> is the main form of the word as can be found in the attached dictionaries.</li>
+ 
+ <li><b>abstract</b> contains an explanation of the term, if available</li>
+<li> <b>uri</b> links to the dictionary service</li>
+<li><b>confidence</b> is currently an <b>arbitrary</b> value
+ </ul>
+ 
+ <p>Currently this service only gives one possible meaning of a word, while the underlying service at <a href="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/">
+ http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/
+ </a> gives you all know variant, this is due to the necessary compatibility with the current pundit version.</p>
+ 
+<pre>
+{
+
+    "time": 1,
+    "lang": "lat",
+    "annotations": 
+
+[
+
+{
+
+    "lod": 
+
+{
+
+    "word": "http://purl.org/linguistics/gold/OrthographicWord"
+
+},
+"image": { },
+"confidence": 0.8,
+"label": "Ego",
+"spot": "Ego",
+"type":
+[
+
+    "http://purl.org/linguistics/gold/OrthographicWord"
+
+],
+"title": "Ego",
+"abstract": "",
+"uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=Ego",
+"types":
+
+    [
+        "http://purl.org/linguistics/gold/OrthographicWord"
+    ],
+    "end": 3,
+    "start": 0
+
+},
+{
+
+    "lod": 
+
+{
+
+    "word": "http://purl.org/linguistics/gold/OrthographicWord"
+
+},
+"image": { },
+"confidence": 0.8,
+"label": "sum",
+"spot": "sum",
+"type":
+[
+
+    "http://purl.org/linguistics/gold/OrthographicWord"
+
+],
+"title": "sum",
+"abstract": "To be.",
+"uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=sum",
+"types":
+
+    [
+        "http://purl.org/linguistics/gold/OrthographicWord"
+    ],
+    "end": 7,
+    "start": 4
+
+},
+{
+
+    "lod": 
+
+{
+
+    "word": "http://purl.org/linguistics/gold/OrthographicWord"
+
+},
+"image": { },
+"confidence": 0.8,
+"label": "in",
+"spot": "in",
+"type":
+[
+
+    "http://purl.org/linguistics/gold/OrthographicWord"
+
+],
+"title": "in",
+"abstract": "To admit an accusation broughte against one as lawful.",
+"uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=in",
+"types":
+
+    [
+        "http://purl.org/linguistics/gold/OrthographicWord"
+    ],
+    "end": 10,
+    "start": 8
+
+},
+{
+
+    "lod": 
+
+{
+
+    "word": "http://purl.org/linguistics/gold/OrthographicWord"
+
+},
+"image": { },
+"confidence": 0.8,
+"label": "horto",
+"spot": "horto",
+"type":
+[
+
+    "http://purl.org/linguistics/gold/OrthographicWord"
+
+],
+"title": "horto",
+"abstract": "A knot gardÊ: a garden for pleasute: an ortharde.",
+"uri": "http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=lat&outputFormat=html&outputType=morphCompact&outputType=dictFull&query=horto",
+"types":
+
+            [
+                "http://purl.org/linguistics/gold/OrthographicWord"
+            ],
+            "end": 16,
+            "start": 11
+        }
+    ]
+
+}
+</pre>
+ 
+ 
+ 
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ttools/views.py	Tue Feb 17 12:44:40 2015 +0100
@@ -0,0 +1,247 @@
+from django.shortcuts import render, redirect
+from django.views.generic.base import View
+from proxy.models import Server
+import urllib
+from django.http.response import StreamingHttpResponse, HttpResponse,JsonResponse
+
+import json
+import mergedict
+from cgitb import text
+from lxml import  etree
+import token
+from django.template.base import Token
+from django.views.decorators.http import require_http_methods
+from django.template.context import RequestContext
+
+from django.views.decorators.csrf import csrf_protect
+
+
+class TextToolAnalyse(View):
+    
+    def getLabel(self,token,lang):
+        morphUrl="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=%s&outputFormat=xml&outputType=morphCompact"%lang
+        morphUrl+="&query=%s"%urllib.request.quote(token)
+        
+        search = urllib.request.urlopen(morphUrl)
+                   
+        #txt = urllib.request.urlopen(searchUrl).read().decode('utf-8')
+        
+        
+        
+        print(search)
+        dom = etree.parse(search).getroot()
+        
+        lem = dom.xpath("//lemma/name")[0].text
+        return lem
+        
+    
+    
+    
+    def post(self,request):
+        return self.get(request,method="post")
+    
+    def get(self,request,method="get"):
+      
+        #params_full= dict(request.REQUEST.dicts[1])
+        
+        if method=="get":
+            try:
+                text = request.GET['text']
+            
+            except:
+                return redirect("./tt/api")
+            try:
+                lang = request.GET['lang']
+            except:
+                lang="lat"
+        
+        else:
+            text = request.POST['text']
+        
+            
+                
+            try:
+                lang = request.POST['lang']
+            except:
+                lang="lat"
+                
+        url="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/text/Tokenize"
+        morphUrl="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=%s&outputFormat=xml&outputType=morphCompact"%lang
+        dictServUrl="http://mpdl-service.mpiwg-berlin.mpg.de/mpiwg-mpdl-lt-web/lt/GetDictionaryEntries?language=%s&outputFormat=html&outputType=morphCompact&outputType=dictFull"%lang
+        
+        
+
+
+       # query=preface&queryDisplay=Preface&language=en&outputFormat=html&outputType=morphCompact&outputType=dictFull
+        
+        
+        
+        
+        
+        params={}
+        
+        
+        #text=text[0:300]#dw for the time beeing
+        
+        
+        chunks = int(len(text)/300)+1 # zerlege den text in 300 schritte
+        ret = {}
+        annotations=[]
+            
+        for chunk in range(min(10,chunks)): #maximal 5 z.Z. otherwise to long
+            
+            currentText=text[chunk*300:min(len(text),(chunk+1)*300-1)]
+        
+            params["inputString"]=currentText
+            params["language"]=lang
+            params["outputFormat"]="xml"
+            #params["dictionary"]="Yes"
+            
+            
+            searchUrl =url+"?"+urllib.parse.urlencode(params,True)
+                        
+                        
+                       
+            search = urllib.request.urlopen(searchUrl)
+                       
+            #txt = urllib.request.urlopen(searchUrl).read().decode('utf-8')
+            
+            
+            
+            print(searchUrl)
+            
+            try:
+                dom = etree.parse(search)
+                root = dom.getroot()
+           
+            except: #go around a bug in mpiwg service where ulrs are not properly encoded
+                search = urllib.request.urlopen(searchUrl)
+                txt=search.read().decode("utf-8")
+                txt=txt.replace("&","&amp;")
+                root =etree.fromstring(txt)
+                
+            
+            time = str(root.xpath("./elapsed-time-ms")[0].text)
+            
+            print (time)
+            
+            
+            ret["time"]=ret.get("time",0)+int(time)
+            
+          
+            for token in root.xpath(".//token"):
+                annot={}
+               
+                
+                
+                
+                
+                annot["spot"]=token.xpath("./name")[0].text
+               
+                #annot['title'] = token.xpath(".//dictionary/entries/entry/form")[0].text
+                #annot['label'] = token.xpath(".//dictionary/entries/entry/form")[0].text
+                #annot['uri'] = token.xpath(".//dictionary/entries/entry/remoteUrl")[0].text
+                try:
+                    annot['label'] = self.getLabel(annot['spot'],lang)
+                    annot['title'] = self.getLabel(annot['spot'],lang)
+                    
+                    annot['uri'] = dictServUrl+"&query=%s"%annot['spot']
+                    annot['start']=3
+                    annot['end']=5
+                    annot['confidence']=0.8
+                    annot['image']={}
+                    #annot['type']="Web page"
+                    
+                    
+                    annot['abstract']=''
+                    if lang=="lat":
+                        
+                      
+                        for dicts in token.xpath(".//dictionary"):
+                            dictName=dicts.xpath("./name")[0].text
+                            if dictName == "cooper": #choose liddle sctt
+                                ctsStr=[]
+                               
+                                try:
+                                    annot['abstract']=dicts.xpath("./entries/entry/content/sense/trans")[0].text
+                                except:
+                                
+                                    annot['abstract']=""    
+                                    
+                    elif lang=="ita":
+                        
+                      
+                        for dicts in token.xpath(".//dictionary"):
+                            dictName=dicts.xpath("./name")[0].text
+                            if dictName == "baretti": #choose liddle sctt
+                                ctsStr=[]
+                               
+                                try:
+                                    #annot['abstract']=""    
+                                    annot['abstract']=dicts.xpath("./entries/entry/content/i")[0].text
+                                except:
+                                
+                                    annot['abstract']=""    
+                    elif lang=="grc":
+                        
+                      
+                        for dicts in token.xpath(".//dictionary"):
+                            dictName=dicts.xpath("./name")[0].text
+                            if dictName == "lsj": #choose liddle sctt
+                                ctsStr=[]
+                               
+                                try:
+                                    #annot['abstract']=""    
+                                    annot['abstract']=dicts.xpath("./entries/entry/content/tr")[0].text
+                                except:
+                                
+                                    annot['abstract']=""    
+                    
+                    
+                   
+                    annot['lod']={"word":"http://purl.org/linguistics/gold/OrthographicWord"}
+                    annot['type']=["http://purl.org/linguistics/gold/OrthographicWord"]
+                    annot['types']=["http://purl.org/linguistics/gold/OrthographicWord"]
+                    annotations.append(annot)
+                    
+                   
+                   
+                except RuntimeError as err:
+                    print (err)
+                    pass
+                    
+            
+        cn = 0
+        cs = text
+        wps=[]
+        for an in annotations:
+            t=an['spot']
+            ps = cs.find(t)
+            wps.append((t,ps+cn))
+            an['start']=ps+cn
+            an['end']=ps+cn+len(t)
+        
+            cn=ps+cn+len(t)
+            cs=cs[ps+len(t):]
+           
+        
+        
+        #print (wps)
+        print ("Lenght wordlist:")
+        print (len(wps))
+        
+            
+        
+        
+                
+        ret['annotations']=annotations
+        ret['lang']=lang
+        
+        return JsonResponse(ret)
+   
+        #for token in dom.getroot().result.tokens:
+        #    print (token)
+        
+        
+        
+