1 | Introduction
|
---|
2 | ------------
|
---|
3 | Solr Search Velocity Templates
|
---|
4 |
|
---|
5 | A quick demo of using Solr using http://wiki.apache.org/solr/VelocityResponseWriter
|
---|
6 |
|
---|
7 | You typically access these templates via:
|
---|
8 | http://localhost:8983/solr/collection1/browse
|
---|
9 |
|
---|
10 | It's called "browse" because you can click around with your mouse
|
---|
11 | without needing to type any search terms. And of course it
|
---|
12 | also works as a standard search app as well.
|
---|
13 |
|
---|
14 | Known Limitations
|
---|
15 | -----------------
|
---|
16 | * The /browse and the VelocityResponseWriter component
|
---|
17 | serve content directly from Solr, which usually requires
|
---|
18 | Solr's HTTP API to be exposed. Advanced users could
|
---|
19 | potentially access other parts of Solr directly.
|
---|
20 | * There are some hard coded fields in these templates.
|
---|
21 | Since these templates live under conf, they should be
|
---|
22 | considered part of the overall configuration, and
|
---|
23 | must be coordinated with schema.xml and solrconfig.xml
|
---|
24 |
|
---|
25 | Velocity Info
|
---|
26 | -------------
|
---|
27 | Java-based template language.
|
---|
28 |
|
---|
29 | It's nice in this context because change to the templates
|
---|
30 | are immediately visible in browser on the next visit.
|
---|
31 |
|
---|
32 | Links:
|
---|
33 | http://velocity.apache.org
|
---|
34 | http://wiki.apache.org/velocity/
|
---|
35 | http://velocity.apache.org/engine/releases/velocity-1.7/user-guide.html
|
---|
36 |
|
---|
37 |
|
---|
38 | File List
|
---|
39 | ---------
|
---|
40 |
|
---|
41 | System and Misc:
|
---|
42 | VM_global_library.vm - Macros used other templates,
|
---|
43 | exact filename is important for Velocity to see it
|
---|
44 | error.vm - shows errors, if any
|
---|
45 | debug.vm - includes toggle links for "explain" and "all fields"
|
---|
46 | activated by debug link in footer.vm
|
---|
47 | README.txt - this file
|
---|
48 |
|
---|
49 | Overall Page Composition:
|
---|
50 | browse.vm - Main entry point into templates
|
---|
51 | layout.vm - overall HTML page layout
|
---|
52 | head.vm - elements in the <head> section of the HTML document
|
---|
53 | header.vm - top section of page visible to users
|
---|
54 | footer.vm - bottom section of page visible to users,
|
---|
55 | includes debug and help links
|
---|
56 | main.css - CSS style for overall pages
|
---|
57 | see also jquery.autocomplete.css
|
---|
58 |
|
---|
59 | Query Form and Options:
|
---|
60 | query_form.vm - renders query form
|
---|
61 | query_group.vm - group by fields
|
---|
62 | e.g.: Manufacturer or Poplularity
|
---|
63 | query_spatial.vm - select box for location based Geospacial search
|
---|
64 |
|
---|
65 | Spelling Suggestions:
|
---|
66 | did_you_mean.vm - hyperlinked spelling suggestions in results
|
---|
67 | suggest.vm - dynamic spelling suggestions
|
---|
68 | as you type in the search form
|
---|
69 | jquery.autocomplete.js - supporting files for dynamic suggestions
|
---|
70 | jquery.autocomplete.css - Most CSS is defined in main.css
|
---|
71 |
|
---|
72 |
|
---|
73 | Search Results, General:
|
---|
74 | (see also browse.vm)
|
---|
75 | tabs.vm - provides navigation to advanced search options
|
---|
76 | pagination_top.vm - paging and staticis at top of results
|
---|
77 | pagination_bottom.vm - paging and staticis at bottom of results
|
---|
78 | results_list.vm
|
---|
79 | hit.vm - called for each matching doc,
|
---|
80 | decides which template to use
|
---|
81 | hit_grouped.vm - display results grouped by field values
|
---|
82 | product_doc.vm - display a Product
|
---|
83 | join_doc.vm - display a joined document
|
---|
84 | richtext_doc.vm - display a complex/misc. document
|
---|
85 | hit_plain.vm - basic display of all fields,
|
---|
86 | edit results_list.vm to enable this
|
---|
87 |
|
---|
88 |
|
---|
89 | Search Results, Facets & Clusters:
|
---|
90 | facets.vm - calls the 4 facet and 1 cluster template
|
---|
91 | facet_fields.vm - display facets based on field values
|
---|
92 | e.g.: fields specified by &facet.field=
|
---|
93 | facet_queries.vm - display facets based on specific facet queries
|
---|
94 | e.g.: facets specified by &facet.query=
|
---|
95 | facet_ranges.vm - display facets based on ranges
|
---|
96 | e.g.: ranges specified by &facet.range=
|
---|
97 | facet_pivot.vm - display pivot based facets
|
---|
98 | e.g.: facets specified by &facet.pivot=
|
---|
99 | cluster.vm - if clustering is available
|
---|
100 | then call cluster_results.vm
|
---|
101 | cluster_results.vm - actual rendering of clusters
|
---|