diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 143c7e9cc43..6afe532fd41 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -277,7 +277,7 @@ New Features which blends RPT indexes for speed with serialized geometry for accuracy. Includes a Lucene segment based in-memory shape cache. (David Smiley) -* SOLR-7465: New file indexing example, under example/files. (Esther Quansah, Erik Hatcher) +* SOLR-7465, SOLR-7610: New file indexing example, under example/files. (Esther Quansah, Erik Hatcher) * SOLR-7468: Kerberos authenticaion plugin for Solr. This would allow running a Kerberized Solr. (Noble Paul, Ishan Chattopadhyaya, Gregory Chanan, Anshum Gupta) diff --git a/solr/example/files/README.txt b/solr/example/files/README.txt index 12affd119a1..680d94e8da3 100644 --- a/solr/example/files/README.txt +++ b/solr/example/files/README.txt @@ -40,7 +40,7 @@ For further explanations, see the frequently asked questions at the end of the g bin/solr create -c files -d example/files/conf -* Now you’ve created a core called “files” using a configuration tuned for indexing and query rich text files. +* Now you’ve created a core called “files” using a configuration tuned for indexing and querying rich text files. * You should see the following response: @@ -65,6 +65,10 @@ For further explanations, see the frequently asked questions at the end of the g files indexed. COMMITting Solr index changes to http://localhost:8983/solr/files/update... Time spent: + +* To see a list of accepted file types, do: + bin/post -h +
##BROWSING DOCUMENTS @@ -73,7 +77,7 @@ For further explanations, see the frequently asked questions at the end of the g * To view your document information in the HTML interface view, adjust the URL in your address bar to [http://localhost:8983/solr/files/browse](http://localhost:8983/solr/files/browse) -* To view your document information in XML or other formats, add &wt (for writer type) to the end of that URL. i.e.: +* To view your document information in XML or other formats, add &wt (for writer type) to the end of that URL. i.e. To view your results in xml format direct your browser to: [http://localhost:8983/solr/files/browse?&wt=xml](http://localhost:8983/solr/files/browse?&wt=xml)
@@ -81,9 +85,9 @@ For further explanations, see the frequently asked questions at the end of the g * Another way to verify that your core has been created is to view it in the Admin User Interface. -You can use the Admin_UI as a visual tool for most of the things you’ll be doing with your cores/collections in Solr. + - The Admin_UI serves as a visual tool for indexing and querying your index in Solr. -* To access the Admin UI, go to your browser visit : +* To access the Admin UI, go to your browser and visit : [http://localhost:8983/solr/](http://localhost:8983/solr/) - The Admin UI is only accessible when Solr is running @@ -92,13 +96,14 @@ You can use the Admin_UI as a visual tool for most of the things you’ll be doi * Alternatively, you could just go to the core page directly by visiting : [http://localhost:8983/solr/#/files](http://localhost:8983/solr/#/files) * Now you’ve opened the core page. On this page there are a multitude of different tools you can use to analyze and search your core. You will make use of these features after indexing your documents. +* Take note of the "Num Docs" field in your core Statistics. If after indexing your documents, it shows Num Docs to be 0, that means there was a problem indexing.
##QUERYING INDEX * In the Admin UI, enter a term in the query box to see which documents contain the word. -* You can filter the results by switching between the different content type tabs. +* You can filter the results by switching between the different content type tabs. To view an international version of this interface, hover over the globe icon in the top right hand section of the page. * Notice the tag cloud on the right side, which facets by top phrases extracted during indexing. Click on the phrases to see which documents contain them. @@ -130,27 +135,18 @@ You can use the Admin_UI as a visual tool for most of the things you’ll be doi * How can I change the /browse UI? - The primary templates are under example/files/conf/velocity. In order to edit those files in place (without having to - re-create or patch a core/collection with an updated configuration), Solr can be started with a special system property - set to the _absolute_ path to the conf/velocity directory, like this: - - - bin/solr start -Dvelocity.template.base.dir=/example/files/conf/velocity/ + The primary templates are under example/files/conf/velocity. **In order to edit those files in place (without having to + re-create or patch a core/collection with an updated configuration)**, Solr can be started with a special system property + set to the _absolute_ path to the conf/velocity directory, like this: + bin/solr start -Dvelocity.template.base.dir=/example/files/conf/velocity/ -bin/solr stop -rm -Rf server/solr/files/ + If you want to adjust the browse templates for an existing collection, edit the core’s configuration + under server/solr/files/conf/velocity. -# templates extracted with: -# unzip -j dist/solr-velocity-*.jar velocity/* -x *.properties -d example/files/templates/ -bin/solr start -Dvelocity.template.base.dir= -# TODO: make it so an install dir relative path can be used somehow? -bin/solr create_core -c files -bin/post -c files ~/Documents -curl http://localhost:8983/solr/files/config/params -H 'Content-type:application/json' -d '{ -"update" : { - "facets": { - "facet.field":"content_type" - } - } -}' \ No newline at end of file + +======= + +* Provenance of free images used in this example: + - Globe icon: visualpharm.com + - Flag icons: freeflagicons.com \ No newline at end of file diff --git a/solr/example/files/browse-resources/velocity/resources.properties b/solr/example/files/browse-resources/velocity/resources.properties new file mode 100644 index 00000000000..4397bacb610 --- /dev/null +++ b/solr/example/files/browse-resources/velocity/resources.properties @@ -0,0 +1,24 @@ +# Title: " Powered File Search" +powered_file_search=Powered File Search + +# Search box and results +find=Find +submit=Submit +page_of=Page {0} of {1} +previous=previous +next=next +results_found_in=results found in {0}ms +results_found=results found + +# Facets +top_phrases=Top Phrases + +# Type labels +type.all=All Types +type.doc.label=Document +type.html.label=HTML +type.pdf.label=PDF +type.presentation.label=Presentation +type.spreadsheet.label=Spreadsheet +type.text.label=text +type.unknown=unknown diff --git a/solr/example/files/browse-resources/velocity/resources_de_DE.properties b/solr/example/files/browse-resources/velocity/resources_de_DE.properties new file mode 100644 index 00000000000..bc5f72ccdc9 --- /dev/null +++ b/solr/example/files/browse-resources/velocity/resources_de_DE.properties @@ -0,0 +1,17 @@ +find=Durchsuchen +page_of=Page {0} von {1} +previous=vorherige Seite +next=n\u00e4chste Seite +results_found_in=Ergebnisse in {0}ms gefunden +results_found=Ergebnisse gefunden +powered_file_search= betriebene Dateisuche +type.text.label=Text +type.pdf.label=PDF +type.html.label=HTML +type.presentation.label=Pr\u00e4sentation +type.doc.label=Dokument +type.spreadsheet.label=Kalkulationstabelle +type.unknown=unbekannt +type.all=alle Arten +top_phrases=Schl\u00fcssels\u00e4tze +submit=einreichen \ No newline at end of file diff --git a/solr/example/files/browse-resources/velocity/resources_fr_FR.properties b/solr/example/files/browse-resources/velocity/resources_fr_FR.properties new file mode 100644 index 00000000000..049c2596f16 --- /dev/null +++ b/solr/example/files/browse-resources/velocity/resources_fr_FR.properties @@ -0,0 +1,19 @@ +find=Recherche +page_of=Page {0} de {1} +previous=pr\u00e9c\u00e9dent +next=suivant +results_found_in=resultas ficher en {0}ms +results_found=resultas ficher +powered_file_search=Recherches de Fichiers +type.text.label=Texte +type.pdf.label=PDF +type.html.label=HTML +type.presentation.label=Pr\u00e9sentation +type.doc.label=Documents +type.spreadsheet.label=Tableur +type.unknown=inconnu +type.all=Tous les Types +top_phrases=Phrases Cl\u00e9s +submit=Recherche + + diff --git a/solr/example/files/conf/email_url_types.txt b/solr/example/files/conf/email_url_types.txt new file mode 100644 index 00000000000..622b193e0a3 --- /dev/null +++ b/solr/example/files/conf/email_url_types.txt @@ -0,0 +1,2 @@ + + diff --git a/solr/example/files/conf/managed-schema b/solr/example/files/conf/managed-schema index 61c5c1c9767..9b1b820ea71 100644 --- a/solr/example/files/conf/managed-schema +++ b/solr/example/files/conf/managed-schema @@ -398,6 +398,13 @@ + + + + + + + diff --git a/solr/example/files/conf/params.json b/solr/example/files/conf/params.json index 2c608b2376a..d8986cca125 100644 --- a/solr/example/files/conf/params.json +++ b/solr/example/files/conf/params.json @@ -18,6 +18,7 @@ "type_fq":"{!field f=doc_type v=$type}", "hl":"on", "hl.fl":"content", + "v.locale":"${locale}", "debug":"true", "":{"v":0}}, "velocity":{ diff --git a/solr/example/files/conf/solrconfig.xml b/solr/example/files/conf/solrconfig.xml index 1ea64848928..875996c044d 100644 --- a/solr/example/files/conf/solrconfig.xml +++ b/solr/example/files/conf/solrconfig.xml @@ -82,6 +82,7 @@ +