commit 5a372910e57619779e151fac51e5d06d60e6c1d5 Author: unknown Date: Thu Jan 24 16:39:44 2013 +0000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..317a4d820 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +atlassian-ide-plugin.xml +.svn/ +data/ +spring-data-elasticsearch.iml +spring-data-elasticsearch.ipr +spring-data-elasticsearch.iws +target/ \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..c2972dae5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,464 @@ + + + 4.0.0 + org.springframework.data + spring-data-elasticsearch + 1.0.0.BUILD-SNAPSHOT + jar + 2012 + http://github.com/biomedcentral/spring-data-elasticsearch + Spring Data Elasticsearch + Spring Data module providing support for Elasticsearch repositories + + BioMed Central + http://www.biomedcentral.com + + + + UTF-8 + 4.11 + 3.1.2.RELEASE + 1.7.1 + 2.6 + 0.20.2 + 4.2.2 + 1.4.0.RELEASE + 2.1 + 1.0.7 + 1.9.5 + 1.3 + 1.0-SP4 + 1.1.5 + ${project.artifactId}-${project.version} + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + Copyright 2010 the original author or authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied. + See the License for the specific language governing permissions and + limitations under the License. + + + + + + + + https://github.com/biomedcentral/spring-data-elasticsearch + scm:git:git://github.com/biomedcentral/spring-data-elasticsearch.git + scm:git:ssh://git@github.com:biomedcentral/spring-data-elasticsearch.git + + + + + + + + + org.springframework + spring-context + ${spring.version} + + + commons-logging + commons-logging + + + + + org.springframework + spring-tx + ${spring.version} + + + + + cglib + cglib + 2.2.2 + test + + + + + org.springframework.data + spring-data-commons-core + ${spring.data-commons.version} + + + + + commons-lang + commons-lang + ${commons-lang.version} + + + commons-collections + commons-collections + 3.2.1 + + + org.apache.httpcomponents + httpclient + ${apache.httpcomponents.version} + + + commons-logging + commons-logging + + + + + org.apache.httpcomponents + httpmime + ${apache.httpcomponents.version} + + + org.apache.httpcomponents + httpclient-cache + ${apache.httpcomponents.version} + + + commons-logging + commons-logging + + + + + + + joda-time + joda-time + ${joda-time.version} + + + + + org.elasticsearch + elasticsearch + ${elasticsearch.version} + + + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.2 + + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + org.slf4j + jcl-over-slf4j + ${slf4j.version} + test + + + ch.qos.logback + logback-classic + ${logback-classic.version} + test + + + + + javax.enterprise + cdi-api + ${cdi.version} + provided + true + + + + + org.springframework + spring-test + ${spring.version} + test + + + junit + junit + ${junit.version} + test + + + org.mockito + mockito-core + ${mockito.version} + + + org.hamcrest + hamcrest-core + + + test + + + org.hamcrest + hamcrest-all + ${hamcrest.version} + test + + + org.apache.openwebbeans.test + cditest-owb + ${webbeans.version} + test + + + org.springframework + spring-jdbc + ${spring.version} + test + + + com.h2database + h2 + 1.3.168 + test + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.6 + 1.6 + + + + org.apache.maven.plugins + maven-jar-plugin + 2.3.1 + + true + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 2.12 + + + integration-test + + integration-test + + + + verify + + verify + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + org.sonatype.maven.plugin + emma-maven-plugin + 1.2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/docbkx/index.xml b/src/docbkx/index.xml new file mode 100644 index 000000000..57fb60946 --- /dev/null +++ b/src/docbkx/index.xml @@ -0,0 +1,72 @@ + + + + + Spring Data Solr + + + Christoph + Strobl + + + Oliver + Gierke + + + Mark + Pollack + + + Thomas + Risberg + + + + + Copies of this document may be made for your own use and for + distribution to others, provided that you do not + charge any fee for + such copies and further provided that each copy + contains this + Copyright Notice, whether + distributed in print or electronically. + + + + + 2012 + The original author(s) + + + + + + + + + Reference Documentation + + + + + + + + + + + Appendix + + + + + + + + + \ No newline at end of file diff --git a/src/docbkx/preface.xml b/src/docbkx/preface.xml new file mode 100644 index 000000000..056adf7e2 --- /dev/null +++ b/src/docbkx/preface.xml @@ -0,0 +1,72 @@ + + + + Preface + The Spring Data Solr project applies core Spring concepts to + the + development of solutions using the Apache Solr Search Engine. + We + provide a "template" as a high-level abstraction for storing and + querying documents. You will notice similarities to the mongodb + support in the Spring Framework. + +
+ Project Metadata + + + + Version Control - + git://github.com/SpringSource/spring-data-solr.git + + + + + + Bugtacker - + https://jira.springsource.org/browse/DATASOLR + + + + + + Release repository - + http://repo.springsource.org/libs-release + + + + + + Milestone repository - + http://repo.springsource.org/libs-milestone + + + + + + Snapshot repository - + http://repo.springsource.org/libs-snapshot + + + +
+
+ Requirements + + Requires + Apache Solr + 3.5 and above or optional dependency + <dependency> + <groupId>org.apache.solr</groupId> + <artifactId>solr-core</artifactId> + <version>${solr.version}</version> +</dependency> + + If you tend to use the Embedded Version of Solr + Server 4.x you will also have to add a version of servlet-api and + check your <lockType> as well as <unlockOnStartup> + settings. + + +
+
\ No newline at end of file diff --git a/src/docbkx/reference/data-solr.xml b/src/docbkx/reference/data-solr.xml new file mode 100644 index 000000000..a5659e0ad --- /dev/null +++ b/src/docbkx/reference/data-solr.xml @@ -0,0 +1,501 @@ + + + + Solr Repositories + + This chapter includes details of the Solr repository + implementation. + + +
+ Introduction + +
+ Spring Namespace + + + The Spring Data Solr module contains a custom namespace allowing + definition of repository beans as well as elements for instantiating + a + SolrServer + . + + + + Using the + repositories + element looks up Spring Data repositories as described in + + . + + + + Setting up Solr repositories using Namespace + <?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:solr="http://www.springframework.org/schema/data/solr" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/data/solr + http://www.springframework.org/schema/data/solr/spring-solr-1.0.xsd"> + + <solr:repositories base-package="com.acme.repositories" /> +</beans> + + + + Using the + solr-server + or + embedded-solr-server + element registers an instance of + SolrServer + in the context. + + + HttpSolrServer using Namespace + <?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:solr="http://www.springframework.org/schema/data/solr" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/data/solr + http://www.springframework.org/schema/data/solr/spring-solr-1.0.xsd"> + + <solr:solr-server id="solrServer" url="http://locahost:8983/solr" /> +</beans> + + + + EmbeddedSolrServer using Namespace + <?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:solr="http://www.springframework.org/schema/data/solr" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/data/solr + http://www.springframework.org/schema/data/solr/spring-solr-1.0.xsd"> + + <solr:embedded-solr-server id="solrServer" solrHome="classpath:com/acme/solr" /> +</beans> + + +
+
+ Annotation based configuration + The Spring Data Solr repositories support cannot only be + activated through an XML namespace but also using an annotation + through JavaConfig. + + + Spring Data Solr repositories using JavaConfig + @Configuration +@EnableSolrRepositories +class ApplicationConfig { + + @Bean + public SolrServer solrServer() { + EmbeddedSolrServerFactory factory = new EmbeddedSolrServerFactory("classpath:com/acme/solr"); + return factory.getSolrServer(); + } + + @Bean + public SolrOperations solrTemplate() { + return new SolrTemplate(solrServer()); + } +} + + The configuration above sets up an + EmbeddedSolrServer + which is used by the + SolrTemplate + . Spring Data Solr Repositories are activated using the + @EnableSolrRepositories + annotation, which + essentially carries the same attributes as the XML + namespace does. If no + base package is configured, it will use the + one + the configuration class + resides in. + + +
+
+ Solr Repositores using CDI + The Spring Data Solr repositories can also be set up using CDI + functionality. + + + Spring Data Solr repositories using JavaConfig + class SolrTemplateProducer { + + @Produces + @ApplicationScoped + public SolrOperations createSolrTemplate() { + return new SolrTemplate(new EmbeddedSolrServerFactory("classpath:com/acme/solr")); + } +} + +class ProductService { + + private ProductRepository repository; + + public Page<Product> findAvailableProductsByName(String name, Pageable pageable) { + return repository.findByAvailableTrueAndNameStartingWith(name, pageable); + } + + @Inject + public void setRepository(ProductRepository repository) { + this.repository = repository; + } +} + +
+
+
+ Query methods +
+ Query lookup strategies + + The Solr module supports defining a query manually as String or + have + it being derived from the method name. + + There is no QueryDSL Support present at this time. + + + + + Declared queries + + Deriving the query from the method name is not always sufficient + and/or may result in unreadable method names. In this case one + might make either use of Solr named queries (see + + ) or use the + @Query + annotation (see + + ). + + +
+ +
+ Query creation + + + Generally the query creation mechanism for Solr works as described + in + + . Here's a short example + of what a Solr query method translates into: + + Query creation from method names + public interface ProductRepository extends Repository<Product, String> { + List<Product> findByNameAndPopularity(String name, Integer popularity); +} + + The method name above will be translated into the following + solr query + + q=name:?0 AND popularity:?1 + + + + A list of supported keywords for Solr is shown below. + + Supported keywords inside method names + + + + + + + Keyword + Sample + Solr Query String + + + + + + And + + + findByNameAndPopularity + + + q=name:?0 AND popularity:?1 + + + + + Or + + + findByNameOrPopularity + + + q=name:?0 OR popularity:?1 + + + + + Is + + + findByName + + + q=name:?0 + + + + + Not + + + findByNameNot + + + q=-name:?0 + + + + + Between + + + findByPopularityBetween + + + q=popularity:[?0 TO ?1] + + + + + LessThanEqual + + + findByPopularityLessThan + + + q=popularity:[* TO ?0] + + + + + GreaterThanEqual + + + findByPopularityGreaterThan + + + q=popularity:[?0 TO *] + + + + + Before + + + findByLastModifiedBefore + + + q=last_modified:[* TO ?0] + + + + + After + + + findByLastModifiedAfter + + + q=last_modified:[?0 TO *] + + + + + Like + + + findByNameLike + + + q=name:?0* + + + + + StartingWith + + + findByNameStartingWith + + + q=name:?0* + + + + + EndingWith + + + findByNameEndingWith + + + q=name:*?0 + + + + + Containing + + + findByNameContaining + + + q=name:*?0* + + + + + In + + + findByNameIn(Collection<String> + names) + + + + q=name:(?0... ) + + + + + NotIn + + + findByNameNotIn(Collection<String> + names) + + + + q=-name:(?0... ) + + + + + Near + + + findByStoreNear + + + q={!geofilt pt=?0.latitude,?0.longitude sfield=store + d=?1} + + + + + + True + + + findByAvailableTrue + + + q=inStock:true + + + + + False + + + findByAvailableFalse + + + q=inStock:false + + + + + OrderBy + + + findByAvailableTrueOrderByNameDesc + + + q=inStock:true&sort=name desc + + + + +
+
+
+
+ Using @Query Annotation + + Using named queries ( + + ) to declare queries for entities is a valid + approach and works fine + for a small number of queries. As the + queries themselves are tied to + the Java method that executes them, + you actually can bind them + directly using the Spring Data Solr + @Query + annotation. + + + + Declare query at the method using the + <interfacename>@Query</interfacename> + annotation. + + + public interface ProductRepository extends SolrRepository<Product, String> { + @Query("inStock:?0") + List<Product> findByAvailable(Boolean available); +} + +
+
+ Using NamedQueries + + Named queries can be kept in a properties file and wired to the + accroding method. Please mind the naming convention described in + + or use + @Query + . + + + + Declare named query in properites file + + Product.findByNamedQuery=popularity:?0 +Product.findByName=name:?0 + public interface ProductRepository extends SolrCrudRepository<Product, String> { + + List<Product> findByNamedQuery(Integer popularity); + + @Query(name = "Product.findByName") + List<Product> findByAnnotatedNamedQuery(String name); + +} + +
+
+
\ No newline at end of file diff --git a/src/docbkx/reference/misc.xml b/src/docbkx/reference/misc.xml new file mode 100644 index 000000000..c7a303183 --- /dev/null +++ b/src/docbkx/reference/misc.xml @@ -0,0 +1,99 @@ + + + + Miscellaneous Solr Operation Support + + + This chapter covers additional support for Solr operations (such as + faceting) that cannot be directly accessed via the repository + interface. + It is recommended to add those operations as custom + implementation as + described in + + . + + +
+ Partial Updates + + PartialUpdates can be done using + PartialUpdate + which implements + Update + . + + With Solr 4.0.0 it is not possible to update mulitvalue fields. + + + + PartialUpdate update = new PartialUpdate("id", "123"); +update.add("name", "updated-name"); +solrTemplate.saveBean(update); + +
+
+ Projection + + Projections can be applied via + @Query + using the fields value. + + + @Query(fields = { "name", "id" }) +List<ProductBean> findByNameStartingWith(String name); + +
+
+ Faceting + + Faceting cannot be directly applied using the + SolrRepository + but the + SolrTemplate + holds support for this feature. + + + FacetQuery query = new SimpleFacetQuery(new Criteria(Criteria.WILDCARD).expression(Criteria.WILDCARD)) + .setFacetOptions(new FacetOptions().addFacetOnField("name").setFacetLimit(5)); +FacetPage<Product> page = solrTemplate.queryForFacetPage(query, Product.class); + + + Facets on fields can also be defined using + @Facet + . Please mind that the result will be a + FacetPage + . + @Query(value = "*:*") +@Facet(fields = { "name" }, limit = 5) +FacetPage<Product> findAllFacetOnPopularity(Pageable page); + +
+
+ Filter Query + + Filter Queries improve query speed. It is recommended to + implement + geospatial search as filter query. + + Please note that in solr, unless otherwise specified, all units of + distance are kilometers and points are in degrees of + latitude,longitude. + + + + Query query = new SimpleQuery(new Criteria("category").is("supercalifragilisticexpialidocious")); +FilterQuery fq = new SimpleFilterQuery(new Criteria("store") + .near(new GeoLocation(48.305478, 14.286699), new Distance(5))); +query.addFilterQuery(fq); + + + Simple filter queries can also be defined using + @Query + . + + @Query(value = "*:*", filters = { "inStock:true", "popularity:[* TO 3]" }) +List<ProductBean> findAllFilterAvailableTrueAndPopularityLessThanEqual3(); +
+
\ No newline at end of file diff --git a/src/docbkx/resources/css/highlight.css b/src/docbkx/resources/css/highlight.css new file mode 100644 index 000000000..b1727f354 --- /dev/null +++ b/src/docbkx/resources/css/highlight.css @@ -0,0 +1,36 @@ +/* + borrowed from: https://raw.github.com/SpringSource/spring-data-jpa/master/src/docbkx/resources/css/highlight.css + code highlight CSS resemblign the Eclipse IDE default color schema + @author Costin Leau +*/ + +.hl-keyword { + color: #7F0055; + font-weight: bold; +} + +.hl-comment { + color: #3F5F5F; + font-style: italic; +} + +.hl-multiline-comment { + color: #3F5FBF; + font-style: italic; +} + +.hl-tag { + color: #3F7F7F; +} + +.hl-attribute { + color: #7F007F; +} + +.hl-value { + color: #2A00FF; +} + +.hl-string { + color: #2A00FF; +} \ No newline at end of file diff --git a/src/docbkx/resources/css/html.css b/src/docbkx/resources/css/html.css new file mode 100644 index 000000000..de5467a5c --- /dev/null +++ b/src/docbkx/resources/css/html.css @@ -0,0 +1,114 @@ +/* + borrowed from: https://raw.github.com/SpringSource/spring-data-jpa/master/src/docbkx/resources/css/html.css +*/ + +@IMPORT url("highlight.css"); + +html { + padding: 0pt; + margin: 0pt; +} + +body { + margin-left: 15%; + margin-right: 15%; + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; +} + +div { + margin: 0pt; +} + +p { + text-align: justify; + line-height: 1.3em; +} + +hr { + border: 1px solid gray; + background: gray; +} + +h1,h2,h3,h4,h5 { + color: #234623; + font-weight: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + margin-bottom: 0em; + margin-top: 2em; +} + +pre { + line-height: 1.0; + color: black; +} + +table code { + font-size: 110%; +} + +pre.programlisting { + font-size: 1em; + padding: 3pt 3pt; + border: 1pt solid black; + background: #eeeeee; + clear: both; +} + +div.table { + margin: 1em; + padding: 0.5em; + text-align: center; +} + +div.table table { + display: table; + width: 100%; +} + +div.table td { + padding-left: 7px; + padding-right: 7px; +} + +.sidebar { + float: right; + margin: 10px 0 10px 30px; + padding: 10px 20px 20px 20px; + width: 33%; + border: 1px solid black; + background-color: #F4F4F4; + font-size: 14px; +} + +.mediaobject { + padding-top: 30px; + padding-bottom: 30px; +} + +.legalnotice { + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + font-size: 12px; + font-style: italic; +} + +p.releaseinfo { + font-size: 100%; + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; + padding-top: 10px; +} + +p.pubdate { + font-size: 120%; + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; +} + +span.productname { + font-size: 200%; + font-weight: bold; + font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; +} + +code { + font-size: 125%; +} \ No newline at end of file diff --git a/src/docbkx/resources/images/admons/blank.png b/src/docbkx/resources/images/admons/blank.png new file mode 100644 index 000000000..764bf4f0c Binary files /dev/null and b/src/docbkx/resources/images/admons/blank.png differ diff --git a/src/docbkx/resources/images/admons/caution.gif b/src/docbkx/resources/images/admons/caution.gif new file mode 100644 index 000000000..d9f5e5b1b Binary files /dev/null and b/src/docbkx/resources/images/admons/caution.gif differ diff --git a/src/docbkx/resources/images/admons/caution.png b/src/docbkx/resources/images/admons/caution.png new file mode 100644 index 000000000..5b7809ca4 Binary files /dev/null and b/src/docbkx/resources/images/admons/caution.png differ diff --git a/src/docbkx/resources/images/admons/caution.tif b/src/docbkx/resources/images/admons/caution.tif new file mode 100644 index 000000000..4a282948c Binary files /dev/null and b/src/docbkx/resources/images/admons/caution.tif differ diff --git a/src/docbkx/resources/images/admons/draft.png b/src/docbkx/resources/images/admons/draft.png new file mode 100644 index 000000000..0084708c9 Binary files /dev/null and b/src/docbkx/resources/images/admons/draft.png differ diff --git a/src/docbkx/resources/images/admons/home.gif b/src/docbkx/resources/images/admons/home.gif new file mode 100644 index 000000000..6784f5bb0 Binary files /dev/null and b/src/docbkx/resources/images/admons/home.gif differ diff --git a/src/docbkx/resources/images/admons/home.png b/src/docbkx/resources/images/admons/home.png new file mode 100644 index 000000000..cbb711de7 Binary files /dev/null and b/src/docbkx/resources/images/admons/home.png differ diff --git a/src/docbkx/resources/images/admons/important.gif b/src/docbkx/resources/images/admons/important.gif new file mode 100644 index 000000000..6795d9a81 Binary files /dev/null and b/src/docbkx/resources/images/admons/important.gif differ diff --git a/src/docbkx/resources/images/admons/important.png b/src/docbkx/resources/images/admons/important.png new file mode 100644 index 000000000..ad57f6f72 Binary files /dev/null and b/src/docbkx/resources/images/admons/important.png differ diff --git a/src/docbkx/resources/images/admons/important.tif b/src/docbkx/resources/images/admons/important.tif new file mode 100644 index 000000000..184de6371 Binary files /dev/null and b/src/docbkx/resources/images/admons/important.tif differ diff --git a/src/docbkx/resources/images/admons/next.gif b/src/docbkx/resources/images/admons/next.gif new file mode 100644 index 000000000..aa1516e69 Binary files /dev/null and b/src/docbkx/resources/images/admons/next.gif differ diff --git a/src/docbkx/resources/images/admons/next.png b/src/docbkx/resources/images/admons/next.png new file mode 100644 index 000000000..45835bf89 Binary files /dev/null and b/src/docbkx/resources/images/admons/next.png differ diff --git a/src/docbkx/resources/images/admons/note.gif b/src/docbkx/resources/images/admons/note.gif new file mode 100644 index 000000000..f329d359e Binary files /dev/null and b/src/docbkx/resources/images/admons/note.gif differ diff --git a/src/docbkx/resources/images/admons/note.png b/src/docbkx/resources/images/admons/note.png new file mode 100644 index 000000000..ad57f6f72 Binary files /dev/null and b/src/docbkx/resources/images/admons/note.png differ diff --git a/src/docbkx/resources/images/admons/note.tif b/src/docbkx/resources/images/admons/note.tif new file mode 100644 index 000000000..08644d6b5 Binary files /dev/null and b/src/docbkx/resources/images/admons/note.tif differ diff --git a/src/docbkx/resources/images/admons/prev.gif b/src/docbkx/resources/images/admons/prev.gif new file mode 100644 index 000000000..64ca8f3c7 Binary files /dev/null and b/src/docbkx/resources/images/admons/prev.gif differ diff --git a/src/docbkx/resources/images/admons/prev.png b/src/docbkx/resources/images/admons/prev.png new file mode 100644 index 000000000..cf24654f8 Binary files /dev/null and b/src/docbkx/resources/images/admons/prev.png differ diff --git a/src/docbkx/resources/images/admons/tip.gif b/src/docbkx/resources/images/admons/tip.gif new file mode 100644 index 000000000..823f2b417 Binary files /dev/null and b/src/docbkx/resources/images/admons/tip.gif differ diff --git a/src/docbkx/resources/images/admons/tip.png b/src/docbkx/resources/images/admons/tip.png new file mode 100644 index 000000000..ad57f6f72 Binary files /dev/null and b/src/docbkx/resources/images/admons/tip.png differ diff --git a/src/docbkx/resources/images/admons/tip.tif b/src/docbkx/resources/images/admons/tip.tif new file mode 100644 index 000000000..4a3d8c75f Binary files /dev/null and b/src/docbkx/resources/images/admons/tip.tif differ diff --git a/src/docbkx/resources/images/admons/toc-blank.png b/src/docbkx/resources/images/admons/toc-blank.png new file mode 100644 index 000000000..6ffad17a0 Binary files /dev/null and b/src/docbkx/resources/images/admons/toc-blank.png differ diff --git a/src/docbkx/resources/images/admons/toc-minus.png b/src/docbkx/resources/images/admons/toc-minus.png new file mode 100644 index 000000000..abbb020c8 Binary files /dev/null and b/src/docbkx/resources/images/admons/toc-minus.png differ diff --git a/src/docbkx/resources/images/admons/toc-plus.png b/src/docbkx/resources/images/admons/toc-plus.png new file mode 100644 index 000000000..941312ce0 Binary files /dev/null and b/src/docbkx/resources/images/admons/toc-plus.png differ diff --git a/src/docbkx/resources/images/admons/up.gif b/src/docbkx/resources/images/admons/up.gif new file mode 100644 index 000000000..aabc2d016 Binary files /dev/null and b/src/docbkx/resources/images/admons/up.gif differ diff --git a/src/docbkx/resources/images/admons/up.png b/src/docbkx/resources/images/admons/up.png new file mode 100644 index 000000000..07634de26 Binary files /dev/null and b/src/docbkx/resources/images/admons/up.png differ diff --git a/src/docbkx/resources/images/admons/warning.gif b/src/docbkx/resources/images/admons/warning.gif new file mode 100644 index 000000000..c6acdec60 Binary files /dev/null and b/src/docbkx/resources/images/admons/warning.gif differ diff --git a/src/docbkx/resources/images/admons/warning.png b/src/docbkx/resources/images/admons/warning.png new file mode 100644 index 000000000..ef3e10f40 Binary files /dev/null and b/src/docbkx/resources/images/admons/warning.png differ diff --git a/src/docbkx/resources/images/admons/warning.tif b/src/docbkx/resources/images/admons/warning.tif new file mode 100644 index 000000000..7b6611ec7 Binary files /dev/null and b/src/docbkx/resources/images/admons/warning.tif differ diff --git a/src/docbkx/resources/images/callouts/1.png b/src/docbkx/resources/images/callouts/1.png new file mode 100644 index 000000000..7d473430b Binary files /dev/null and b/src/docbkx/resources/images/callouts/1.png differ diff --git a/src/docbkx/resources/images/callouts/10.png b/src/docbkx/resources/images/callouts/10.png new file mode 100644 index 000000000..997bbc824 Binary files /dev/null and b/src/docbkx/resources/images/callouts/10.png differ diff --git a/src/docbkx/resources/images/callouts/11.png b/src/docbkx/resources/images/callouts/11.png new file mode 100644 index 000000000..ce47dac3f Binary files /dev/null and b/src/docbkx/resources/images/callouts/11.png differ diff --git a/src/docbkx/resources/images/callouts/12.png b/src/docbkx/resources/images/callouts/12.png new file mode 100644 index 000000000..31daf4e2f Binary files /dev/null and b/src/docbkx/resources/images/callouts/12.png differ diff --git a/src/docbkx/resources/images/callouts/13.png b/src/docbkx/resources/images/callouts/13.png new file mode 100644 index 000000000..14021a89c Binary files /dev/null and b/src/docbkx/resources/images/callouts/13.png differ diff --git a/src/docbkx/resources/images/callouts/14.png b/src/docbkx/resources/images/callouts/14.png new file mode 100644 index 000000000..64014b75f Binary files /dev/null and b/src/docbkx/resources/images/callouts/14.png differ diff --git a/src/docbkx/resources/images/callouts/15.png b/src/docbkx/resources/images/callouts/15.png new file mode 100644 index 000000000..0d65765fc Binary files /dev/null and b/src/docbkx/resources/images/callouts/15.png differ diff --git a/src/docbkx/resources/images/callouts/2.png b/src/docbkx/resources/images/callouts/2.png new file mode 100644 index 000000000..5d09341b2 Binary files /dev/null and b/src/docbkx/resources/images/callouts/2.png differ diff --git a/src/docbkx/resources/images/callouts/3.png b/src/docbkx/resources/images/callouts/3.png new file mode 100644 index 000000000..ef7b70047 Binary files /dev/null and b/src/docbkx/resources/images/callouts/3.png differ diff --git a/src/docbkx/resources/images/callouts/4.png b/src/docbkx/resources/images/callouts/4.png new file mode 100644 index 000000000..adb8364eb Binary files /dev/null and b/src/docbkx/resources/images/callouts/4.png differ diff --git a/src/docbkx/resources/images/callouts/5.png b/src/docbkx/resources/images/callouts/5.png new file mode 100644 index 000000000..4d7eb4600 Binary files /dev/null and b/src/docbkx/resources/images/callouts/5.png differ diff --git a/src/docbkx/resources/images/callouts/6.png b/src/docbkx/resources/images/callouts/6.png new file mode 100644 index 000000000..0ba694af6 Binary files /dev/null and b/src/docbkx/resources/images/callouts/6.png differ diff --git a/src/docbkx/resources/images/callouts/7.png b/src/docbkx/resources/images/callouts/7.png new file mode 100644 index 000000000..472e96f8a Binary files /dev/null and b/src/docbkx/resources/images/callouts/7.png differ diff --git a/src/docbkx/resources/images/callouts/8.png b/src/docbkx/resources/images/callouts/8.png new file mode 100644 index 000000000..5e60973c2 Binary files /dev/null and b/src/docbkx/resources/images/callouts/8.png differ diff --git a/src/docbkx/resources/images/callouts/9.png b/src/docbkx/resources/images/callouts/9.png new file mode 100644 index 000000000..a0676d26c Binary files /dev/null and b/src/docbkx/resources/images/callouts/9.png differ diff --git a/src/docbkx/resources/images/logo.png b/src/docbkx/resources/images/logo.png new file mode 100644 index 000000000..a9f6d959e Binary files /dev/null and b/src/docbkx/resources/images/logo.png differ diff --git a/src/docbkx/resources/images/xdev-spring_logo.jpg b/src/docbkx/resources/images/xdev-spring_logo.jpg new file mode 100644 index 000000000..622962ee3 Binary files /dev/null and b/src/docbkx/resources/images/xdev-spring_logo.jpg differ diff --git a/src/docbkx/resources/xsl/fopdf.xsl b/src/docbkx/resources/xsl/fopdf.xsl new file mode 100644 index 000000000..a251cf636 --- /dev/null +++ b/src/docbkx/resources/xsl/fopdf.xsl @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + Copyright © 2012 + + + + + + + + + + + + + + + + + + + + + + + + + + + + -5em + -5em + + + + + + + + + + + Spring Data Solr () + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + 1 + 1 + 0 + + + + + + book toc + + + + 2 + + + + + + + + + + 0 + 0 + 0 + + + 5mm + 10mm + 10mm + + 15mm + 10mm + 0mm + + 18mm + 18mm + + + 0pc + + + + + justify + false + + + 11 + 8 + + + 1.4 + + + + + + + 0.8em + + + + + + 17.4cm + + + + 4pt + 4pt + 4pt + 4pt + + + + 0.1pt + 0.1pt + + + + + 1 + + + + + + + + left + bold + + + pt + + + + + + + + + + + + + + + 0.8em + 0.8em + 0.8em + + + pt + + 0.1em + 0.1em + 0.1em + + + 0.6em + 0.6em + 0.6em + + + pt + + 0.1em + 0.1em + 0.1em + + + 0.4em + 0.4em + 0.4em + + + pt + + 0.1em + 0.1em + 0.1em + + + + + bold + + + pt + + false + 0.4em + 0.6em + 0.8em + + + + + + + + + pt + + + + + 1em + 1em + 1em + #444444 + solid + 0.1pt + 0.5em + 0.5em + 0.5em + 0.5em + 0.5em + 0.5em + + + + 1 + + #F0F0F0 + + + + + + 0 + 1 + + + 90 + + + + + '1' + src/docbkx/resources/images/admons/ + + + + + + figure after + example before + equation before + table before + procedure before + + + + 1 + + + + 0.8em + 0.8em + 0.8em + 0.1em + 0.1em + 0.1em + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/docbkx/resources/xsl/highlight-fo.xsl b/src/docbkx/resources/xsl/highlight-fo.xsl new file mode 100644 index 000000000..ffc7ab447 --- /dev/null +++ b/src/docbkx/resources/xsl/highlight-fo.xsl @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/docbkx/resources/xsl/highlight.xsl b/src/docbkx/resources/xsl/highlight.xsl new file mode 100644 index 000000000..5f84a82fa --- /dev/null +++ b/src/docbkx/resources/xsl/highlight.xsl @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/docbkx/resources/xsl/html.xsl b/src/docbkx/resources/xsl/html.xsl new file mode 100644 index 000000000..c7cccdc0d --- /dev/null +++ b/src/docbkx/resources/xsl/html.xsl @@ -0,0 +1,108 @@ + + + + + + + + + + + 0 + 0 + 1 + + + + + + book toc + + + + 3 + + + + + 1 + + + + + + + 1 + + + 90 + + + + + 1 + images/admons/ + + + + figure after + example before + equation before + table before + procedure before + + + + , + + + + + + + + +
+

Authors

+

+ +

+
+ + + + + + +
+ diff --git a/src/docbkx/resources/xsl/html_chunk.xsl b/src/docbkx/resources/xsl/html_chunk.xsl new file mode 100644 index 000000000..b42481db5 --- /dev/null +++ b/src/docbkx/resources/xsl/html_chunk.xsl @@ -0,0 +1,222 @@ + + + + + + + + + + '5' + '1' + 0 + 0 + 1 + + + + book toc + qandaset toc + + + 3 + + + 1 + + + + + 1 + 90 + + + + + 1 + images/admons/ + + + + figure after + example before + equation before + table before + procedure before + + + + , + + + + () + + + + + +
+

Authors

+

+ +

+
+ + + + + + + + 1 + + + + + + + + + + + + + +
diff --git a/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension b/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension new file mode 100644 index 000000000..03c2c5192 --- /dev/null +++ b/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension @@ -0,0 +1 @@ +org.springframework.data.elasticsearch.repository.cdi.ElasticsearchRepositoryExtension \ No newline at end of file diff --git a/src/main/resources/META-INF/spring.handlers b/src/main/resources/META-INF/spring.handlers new file mode 100644 index 000000000..c1a6976fc --- /dev/null +++ b/src/main/resources/META-INF/spring.handlers @@ -0,0 +1 @@ +http\://www.springframework.org/schema/data/elasticsearch=org.springframework.data.elasticsearch.config.ElasticsearchNamespaceHandler diff --git a/src/main/resources/META-INF/spring.schemas b/src/main/resources/META-INF/spring.schemas new file mode 100644 index 000000000..f99a37bab --- /dev/null +++ b/src/main/resources/META-INF/spring.schemas @@ -0,0 +1,2 @@ +http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-1.0.xsd +http\://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd=org/springframework/data/elasticsearch/config/spring-elasticsearch-1.0.xsd diff --git a/src/main/resources/META-INF/spring.tooling b/src/main/resources/META-INF/spring.tooling new file mode 100644 index 000000000..2c6778dfd --- /dev/null +++ b/src/main/resources/META-INF/spring.tooling @@ -0,0 +1,4 @@ +# Tooling related information for the Elasticsearch namespace +http\://www.springframework.org/schema/data/elasticsearch@name=Solr Namespace +http\://www.springframework.org/schema/data/elasticsearch@prefix=elasticsearch +http\://www.springframework.org/schema/data/elasticsearch@icon=org/springframework/jdbc/config/spring-jdbc.gif diff --git a/src/main/resources/changelog.txt b/src/main/resources/changelog.txt new file mode 100644 index 000000000..e69de29bb diff --git a/src/main/resources/license.txt b/src/main/resources/license.txt new file mode 100644 index 000000000..7584e2dfe --- /dev/null +++ b/src/main/resources/license.txt @@ -0,0 +1,216 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +======================================================================= + +To the extent any open source subcomponents are licensed under the EPL and/or other +similar licenses that require the source code and/or modifications to +source code to be made available (as would be noted above), you may obtain a +copy of the source code corresponding to the binaries for such open source +components and modifications thereto, if any, (the "Source Files"), by +downloading the Source Files from http://www.springsource.org/download, +or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview +Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All +such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General +Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent +physical medium. This offer to obtain a copy of the Source Files is valid for three +years from the date you acquired this Software product. \ No newline at end of file diff --git a/src/main/resources/notice.txt b/src/main/resources/notice.txt new file mode 100644 index 000000000..18aca5bcb --- /dev/null +++ b/src/main/resources/notice.txt @@ -0,0 +1,10 @@ +Spring Data Solr 1.0 +Copyright (c) [2012] SpringSource, a division of VMware, Inc. + +This product is licensed to you under the Apache License, Version 2.0 (the "License"). +You may not use this product except in compliance with the License. + +This product may include a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the subcomponent's license, as noted in the LICENSE file. \ No newline at end of file diff --git a/src/test/resources/custom-method-repository-test.xml b/src/test/resources/custom-method-repository-test.xml new file mode 100644 index 000000000..f9e221394 --- /dev/null +++ b/src/test/resources/custom-method-repository-test.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/elasticsearch-template-test.xml b/src/test/resources/elasticsearch-template-test.xml new file mode 100644 index 000000000..1ac063b0a --- /dev/null +++ b/src/test/resources/elasticsearch-template-test.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/logback.xml b/src/test/resources/logback.xml new file mode 100644 index 000000000..bccb2dc4f --- /dev/null +++ b/src/test/resources/logback.xml @@ -0,0 +1,14 @@ + + + + + + %d %5p %40.40c:%4L - %m%n + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/repository-test.xml b/src/test/resources/repository-test.xml new file mode 100644 index 000000000..f128c99c3 --- /dev/null +++ b/src/test/resources/repository-test.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file