You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2015/01/04 15:53:21 UTC
svn commit: r1649347 [27/31] - in /lucene/dev/branches/lucene6005: ./
dev-tools/ dev-tools/idea/solr/contrib/dataimporthandler-extras/
dev-tools/idea/solr/contrib/extraction/
dev-tools/idea/solr/contrib/map-reduce/
dev-tools/idea/solr/contrib/velocity/...
Modified: lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/solrconfig.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/solrconfig.xml Sun Jan 4 14:53:12 2015
@@ -142,7 +142,7 @@
index format, but hooks into the schema to provide per-field customization of
the postings lists and per-document values in the fieldType element
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
- are experimental, so if you choose to customize the index format, its a good
+ are experimental, so if you choose to customize the index format, it's a good
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
before upgrading to a newer version to avoid unnecessary reindexing.
-->
@@ -156,7 +156,7 @@
</schemaFactory>
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
- he resource named in 'managedSchemaResourceName', rather than from schema.xml.
+ the resource named in 'managedSchemaResourceName', rather than from schema.xml.
Note that the managed schema resource CANNOT be named schema.xml. If the managed
schema does not exist, Solr will create it after reading schema.xml, then rename
'schema.xml' to 'schema.xml.bak'.
@@ -914,9 +914,9 @@
</lst>
</requestHandler>
-
- <!-- A Robust Example
-
+
+ <!-- A Robust Example
+
This example SearchHandler declaration shows off usage of the
SearchHandler with many defaults declared
@@ -925,95 +925,34 @@
names (and different init parameters)
-->
<requestHandler name="/browse" class="solr.SearchHandler">
- <lst name="defaults">
- <str name="echoParams">explicit</str>
-
- <!-- VelocityResponseWriter settings -->
- <str name="wt">velocity</str>
- <str name="v.template">browse</str>
- <str name="v.layout">layout</str>
- <str name="title">Solritas</str>
-
- <!-- Query settings -->
- <str name="defType">edismax</str>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="df">text</str>
- <str name="mm">100%</str>
- <str name="q.alt">*:*</str>
- <str name="rows">10</str>
- <str name="fl">*,score</str>
-
- <str name="mlt.qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
- <int name="mlt.count">3</int>
-
- <!-- Faceting defaults -->
- <str name="facet">on</str>
- <str name="facet.field">cat</str>
- <str name="facet.field">manu_exact</str>
- <str name="facet.field">content_type</str>
- <str name="facet.field">author_s</str>
- <str name="facet.query">ipod</str>
- <str name="facet.query">GB</str>
- <str name="facet.mincount">1</str>
- <str name="facet.pivot">cat,inStock</str>
- <str name="facet.range.other">after</str>
- <str name="facet.range">price</str>
- <int name="f.price.facet.range.start">0</int>
- <int name="f.price.facet.range.end">600</int>
- <int name="f.price.facet.range.gap">50</int>
- <str name="facet.range">popularity</str>
- <int name="f.popularity.facet.range.start">0</int>
- <int name="f.popularity.facet.range.end">10</int>
- <int name="f.popularity.facet.range.gap">3</int>
- <str name="facet.range">manufacturedate_dt</str>
- <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
- <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
- <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
- <str name="f.manufacturedate_dt.facet.range.other">before</str>
- <str name="f.manufacturedate_dt.facet.range.other">after</str>
-
- <!-- Highlighting defaults -->
- <str name="hl">on</str>
- <str name="hl.fl">content features title name</str>
- <str name="hl.encoder">html</str>
- <str name="hl.simple.pre"><b></str>
- <str name="hl.simple.post"></b></str>
- <str name="f.title.hl.fragsize">0</str>
- <str name="f.title.hl.alternateField">title</str>
- <str name="f.name.hl.fragsize">0</str>
- <str name="f.name.hl.alternateField">name</str>
- <str name="f.content.hl.snippets">3</str>
- <str name="f.content.hl.fragsize">200</str>
- <str name="f.content.hl.alternateField">content</str>
- <str name="f.content.hl.maxAlternateFieldLength">750</str>
-
- <!-- Spell checking defaults -->
- <str name="spellcheck">on</str>
- <str name="spellcheck.extendedResults">false</str>
- <str name="spellcheck.count">5</str>
- <str name="spellcheck.alternativeTermCount">2</str>
- <str name="spellcheck.maxResultsForSuggest">5</str>
- <str name="spellcheck.collate">true</str>
- <str name="spellcheck.collateExtendedResults">true</str>
- <str name="spellcheck.maxCollationTries">5</str>
- <str name="spellcheck.maxCollations">3</str>
- </lst>
+ <lst name="defaults">
+ <str name="echoParams">explicit</str>
- <!-- append spellchecking to our list of components -->
- <arr name="last-components">
- <str>spellcheck</str>
- </arr>
+ <!-- VelocityResponseWriter settings -->
+ <str name="wt">velocity</str>
+ <str name="v.template">browse</str>
+ <str name="v.layout">layout</str>
+
+ <!-- Query settings -->
+ <str name="defType">edismax</str>
+ <str name="q.alt">*:*</str>
+ <str name="rows">10</str>
+ <str name="fl">*,score</str>
+
+ <!-- Faceting defaults -->
+ <str name="facet">on</str>
+ <str name="facet.mincount">1</str>
+ </lst>
</requestHandler>
- <!-- Update Request Handler.
+ <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
+ <lst name="defaults">
+ <str name="df">text</str>
+ </lst>
+ </initParams>
+
+ <!-- Update Request Handler.
http://wiki.apache.org/solr/UpdateXmlMessages
Modified: lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/xslt/luke.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/xslt/luke.xsl?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/xslt/luke.xsl (original)
+++ lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/solr/conf/xslt/luke.xsl Sun Jan 4 14:53:12 2015
@@ -39,8 +39,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="solr-admin.css"/>
- <link rel="icon" href="favicon.ico" type="image/ico"/>
- <link rel="shortcut icon" href="favicon.ico" type="image/ico"/>
+ <link rel="icon" href="favicon.ico" type="image/x-icon"/>
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<title>
<xsl:value-of select="$title"/>
</title>
Modified: lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/schema.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/schema.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/schema.xml Sun Jan 4 14:53:12 2015
@@ -108,9 +108,6 @@
<field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="author" type="text_general" indexed="true" stored="true"/>
-
- <!-- catchall field, containing all other searchable text fields (implemented
- via copyField further on in this schema -->
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
@@ -272,7 +269,7 @@
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
- <fieldtype name="binary" class="solr.BinaryField"/>
+ <fieldType name="binary" class="solr.BinaryField"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
@@ -314,15 +311,6 @@
</analyzer>
</fieldType>
- <!-- A text type for English text where stopwords and synonyms are managed using the REST API -->
- <fieldType name="managed_en" class="solr.TextField" positionIncrementGap="100">
- <analyzer>
- <tokenizer class="solr.StandardTokenizerFactory"/>
- <filter class="solr.ManagedStopFilterFactory" managed="english" />
- <filter class="solr.ManagedSynonymFilterFactory" managed="english" />
- </analyzer>
- </fieldType>
-
<!-- A general text field that has reasonable, generic
cross-language defaults: it tokenizes with StandardTokenizer,
and down cases. -->
@@ -457,14 +445,14 @@
</analyzer>
</fieldType>
- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="phonetic" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
</analyzer>
- </fieldtype>
+ </fieldType>
- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="payloads" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!--
@@ -480,7 +468,7 @@
-->
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
</analyzer>
- </fieldtype>
+ </fieldType>
<!-- lowercases the entire field value, keeping it as a single token. -->
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
@@ -517,7 +505,7 @@
<!-- since fields of this type are by default not stored or indexed,
any data added to them will be ignored outright. -->
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+ <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
<!-- This point type indexes the coordinates as separate fields (subFields)
If subFieldType is defined, it references a type, and a dynamic field
Modified: lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/solrconfig.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/solrconfig.xml Sun Jan 4 14:53:12 2015
@@ -143,7 +143,7 @@
index format, but hooks into the schema to provide per-field customization of
the postings lists and per-document values in the fieldType element
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
- are experimental, so if you choose to customize the index format, its a good
+ are experimental, so if you choose to customize the index format, it's a good
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
before upgrading to a newer version to avoid unnecessary reindexing.
-->
@@ -157,7 +157,7 @@
</schemaFactory>
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
- he resource named in 'managedSchemaResourceName', rather than from schema.xml.
+ the resource named in 'managedSchemaResourceName', rather than from schema.xml.
Note that the managed schema resource CANNOT be named schema.xml. If the managed
schema does not exist, Solr will create it after reading schema.xml, then rename
'schema.xml' to 'schema.xml.bak'.
@@ -928,93 +928,31 @@
names (and different init parameters)
-->
<requestHandler name="/browse" class="solr.SearchHandler">
- <lst name="defaults">
- <str name="echoParams">explicit</str>
-
- <!-- VelocityResponseWriter settings -->
- <str name="wt">velocity</str>
- <str name="v.template">browse</str>
- <str name="v.layout">layout</str>
- <str name="title">Solritas</str>
-
- <!-- Query settings -->
- <str name="defType">edismax</str>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="df">text</str>
- <str name="mm">100%</str>
- <str name="q.alt">*:*</str>
- <str name="rows">10</str>
- <str name="fl">*,score</str>
-
- <str name="mlt.qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
- <int name="mlt.count">3</int>
-
- <!-- Faceting defaults -->
- <str name="facet">on</str>
- <str name="facet.field">cat</str>
- <str name="facet.field">manu_exact</str>
- <str name="facet.field">content_type</str>
- <str name="facet.field">author_s</str>
- <str name="facet.query">ipod</str>
- <str name="facet.query">GB</str>
- <str name="facet.mincount">1</str>
- <str name="facet.pivot">cat,inStock</str>
- <str name="facet.range.other">after</str>
- <str name="facet.range">price</str>
- <int name="f.price.facet.range.start">0</int>
- <int name="f.price.facet.range.end">600</int>
- <int name="f.price.facet.range.gap">50</int>
- <str name="facet.range">popularity</str>
- <int name="f.popularity.facet.range.start">0</int>
- <int name="f.popularity.facet.range.end">10</int>
- <int name="f.popularity.facet.range.gap">3</int>
- <str name="facet.range">manufacturedate_dt</str>
- <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
- <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
- <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
- <str name="f.manufacturedate_dt.facet.range.other">before</str>
- <str name="f.manufacturedate_dt.facet.range.other">after</str>
-
- <!-- Highlighting defaults -->
- <str name="hl">on</str>
- <str name="hl.fl">content features title name</str>
- <str name="hl.encoder">html</str>
- <str name="hl.simple.pre"><b></str>
- <str name="hl.simple.post"></b></str>
- <str name="f.title.hl.fragsize">0</str>
- <str name="f.title.hl.alternateField">title</str>
- <str name="f.name.hl.fragsize">0</str>
- <str name="f.name.hl.alternateField">name</str>
- <str name="f.content.hl.snippets">3</str>
- <str name="f.content.hl.fragsize">200</str>
- <str name="f.content.hl.alternateField">content</str>
- <str name="f.content.hl.maxAlternateFieldLength">750</str>
-
- <!-- Spell checking defaults -->
- <str name="spellcheck">on</str>
- <str name="spellcheck.extendedResults">false</str>
- <str name="spellcheck.count">5</str>
- <str name="spellcheck.alternativeTermCount">2</str>
- <str name="spellcheck.maxResultsForSuggest">5</str>
- <str name="spellcheck.collate">true</str>
- <str name="spellcheck.collateExtendedResults">true</str>
- <str name="spellcheck.maxCollationTries">5</str>
- <str name="spellcheck.maxCollations">3</str>
- </lst>
+ <lst name="defaults">
+ <str name="echoParams">explicit</str>
- <!-- append spellchecking to our list of components -->
- <arr name="last-components">
- <str>spellcheck</str>
- </arr>
+ <!-- VelocityResponseWriter settings -->
+ <str name="wt">velocity</str>
+ <str name="v.template">browse</str>
+ <str name="v.layout">layout</str>
+
+ <!-- Query settings -->
+ <str name="defType">edismax</str>
+ <str name="q.alt">*:*</str>
+ <str name="rows">10</str>
+ <str name="fl">*,score</str>
+
+ <!-- Faceting defaults -->
+ <str name="facet">on</str>
+ <str name="facet.mincount">1</str>
+ </lst>
</requestHandler>
+ <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
+ <lst name="defaults">
+ <str name="df">text</str>
+ </lst>
+ </initParams>
<!-- Update Request Handler.
Modified: lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/tika-data-config.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/tika-data-config.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/tika-data-config.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/example-DIH/solr/tika/conf/tika-data-config.xml Sun Jan 4 14:53:12 2015
@@ -2,7 +2,7 @@
<dataSource type="BinFileDataSource" />
<document>
<entity name="tika-test" processor="TikaEntityProcessor"
- url="exampledocs/solr-word.pdf" format="text">
+ url="${solr.install.dir}/example/exampledocs/solr-word.pdf" format="text">
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/gb18030-example.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/gb18030-example.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
Binary files - no diff available.
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/hd.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/hd.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/hd.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/hd.xml Sun Jan 4 14:53:12 2015
@@ -26,7 +26,7 @@
<field name="cat">hard drive</field>
<field name="features">7200RPM, 8MB cache, IDE Ultra ATA-133</field>
<field name="features">NoiseGuard, SilentSeek technology, Fluid Dynamic Bearing (FDB) motor</field>
- <field name="price">92</field>
+ <field name="price">92.0</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
<field name="manufacturedate_dt">2006-02-13T15:26:37Z</field>
@@ -45,7 +45,7 @@
<field name="features">SATA 3.0Gb/s, NCQ</field>
<field name="features">8.5ms seek</field>
<field name="features">16MB cache</field>
- <field name="price">350</field>
+ <field name="price">350.0</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
<!-- Buffalo store -->
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/ipod_other.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/ipod_other.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/ipod_other.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/ipod_other.xml Sun Jan 4 14:53:12 2015
@@ -26,7 +26,7 @@
<field name="cat">electronics</field>
<field name="cat">connector</field>
<field name="features">car power adapter, white</field>
- <field name="weight">4</field>
+ <field name="weight">4.0</field>
<field name="price">19.95</field>
<field name="popularity">1</field>
<field name="inStock">false</field>
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/monitor.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/monitor.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/monitor.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/monitor.xml Sun Jan 4 14:53:12 2015
@@ -25,7 +25,7 @@
<field name="features">30" TFT active matrix LCD, 2560 x 1600, .25mm dot pitch, 700:1 contrast</field>
<field name="includes">USB cable</field>
<field name="weight">401.6</field>
- <field name="price">2199</field>
+ <field name="price">2199.0</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
<!-- Buffalo store -->
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/mp500.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/mp500.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/mp500.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/mp500.xml Sun Jan 4 14:53:12 2015
@@ -33,7 +33,7 @@
<field name="features">Printing speed up to 29ppm black, 19ppm color</field>
<field name="features">Hi-Speed USB</field>
<field name="features">memory card: CompactFlash, Micro Drive, SmartMedia, Memory Stick, Memory Stick Pro, SD Card, and MultiMediaCard</field>
- <field name="weight">352</field>
+ <field name="weight">352.0</field>
<field name="price">179.99</field>
<field name="popularity">6</field>
<field name="inStock">true</field>
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/solr.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/solr.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/solr.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/solr.xml Sun Jan 4 14:53:12 2015
@@ -29,7 +29,7 @@
<field name="features">Scalability - Efficient Replication to other Solr Search Servers</field>
<field name="features">Flexible and Adaptable with XML configuration and Schema</field>
<field name="features">Good unicode support: héllo (hello with an accent over the e)</field>
- <field name="price">0</field>
+ <field name="price">0.0</field>
<field name="popularity">10</field>
<field name="inStock">true</field>
<field name="incubationdate_dt">2006-01-17T00:00:00.000Z</field>
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/utf8-example.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/utf8-example.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/utf8-example.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/utf8-example.xml Sun Jan 4 14:53:12 2015
@@ -35,7 +35,7 @@
<field name="features">tag with escaped chars: <nicetag/></field>
<field name="features">escaped ampersand: Bonnie & Clyde</field>
<field name="features">Outside the BMP:ð codepoint=10308, a circle with an x inside. UTF8=f0908c88 UTF16=d800 df08</field>
- <field name="price">0</field>
+ <field name="price">0.0</field>
<field name="inStock">true</field>
</doc>
</add>
Modified: lucene/dev/branches/lucene6005/solr/example/exampledocs/vidcard.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/example/exampledocs/vidcard.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/example/exampledocs/vidcard.xml (original)
+++ lucene/dev/branches/lucene6005/solr/example/exampledocs/vidcard.xml Sun Jan 4 14:53:12 2015
@@ -30,7 +30,7 @@
<field name="features">PCI Express x16</field>
<field name="features">Dual DVI connectors, HDTV out, video input</field>
<field name="features">OpenGL 2.0, DirectX 9.0</field>
- <field name="weight">16</field>
+ <field name="weight">16.0</field>
<field name="price">479.95</field>
<field name="popularity">7</field>
<field name="store">40.7143,-74.006</field>
@@ -51,7 +51,7 @@
<field name="features">PCI Express x16</field>
<field name="features">dual DVI, HDTV, svideo, composite out</field>
<field name="features">OpenGL 2.0, DirectX 9.0</field>
- <field name="weight">48</field>
+ <field name="weight">48.0</field>
<field name="price">649.99</field>
<field name="popularity">7</field>
<field name="inStock">false</field>
Modified: lucene/dev/branches/lucene6005/solr/server/etc/webdefault.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/etc/webdefault.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/etc/webdefault.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/etc/webdefault.xml Sun Jan 4 14:53:12 2015
@@ -27,7 +27,7 @@
<description>
Default web.xml file.
- This file is applied to a Web application before it's own WEB_INF/web.xml file
+ This file is applied to a Web application before its own WEB_INF/web.xml file
</description>
<!-- ==================================================================== -->
Modified: lucene/dev/branches/lucene6005/solr/server/resources/log4j.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/resources/log4j.properties?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/resources/log4j.properties (original)
+++ lucene/dev/branches/lucene6005/solr/server/resources/log4j.properties Sun Jan 4 14:53:12 2015
@@ -1,5 +1,5 @@
# Logging level
-solr.log=logs/
+solr.log=logs
log4j.rootLogger=INFO, file, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/schema.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/schema.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/schema.xml Sun Jan 4 14:53:12 2015
@@ -257,7 +257,7 @@
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
- <fieldtype name="binary" class="solr.BinaryField"/>
+ <fieldType name="binary" class="solr.BinaryField"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
@@ -481,7 +481,7 @@
<!-- since fields of this type are by default not stored or indexed,
any data added to them will be ignored outright. -->
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+ <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
<!-- This point type indexes the coordinates as separate fields (subFields)
If subFieldType is defined, it references a type, and a dynamic field
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/basic_configs/conf/solrconfig.xml Sun Jan 4 14:53:12 2015
@@ -70,7 +70,7 @@
index format, but hooks into the schema to provide per-field customization of
the postings lists and per-document values in the fieldType element
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
- are experimental, so if you choose to customize the index format, its a good
+ are experimental, so if you choose to customize the index format, it's a good
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
before upgrading to a newer version to avoid unnecessary reindexing.
-->
@@ -118,13 +118,6 @@
this is enabled here, and controlled through log4j.properties.
-->
<infoStream>true</infoStream>
-
- <!--
- Use true to enable this safety check, which can help
- reduce the risk of propagating index corruption from older segments
- into new ones, at the expense of slower merging.
- -->
- <checkIntegrityAtMerge>false</checkIntegrityAtMerge>
</indexConfig>
@@ -461,25 +454,8 @@
</arr>
</requestHandler>
- <!-- Update Request Handler.
-
- http://wiki.apache.org/solr/UpdateXmlMessages
-
- The canonical Request Handler for Modifying the Index through
- commands specified using XML, JSON, CSV, or JAVABIN
- Note: Since solr1.1 requestHandlers requires a valid content
- type header if posted in the body. For example, curl now
- requires: -H 'Content-type:text/xml; charset=utf-8'
-
- To override the request content type and force a specific
- Content-type, use the request parameter:
- ?update.contentType=text/csv
-
- This handler will pick a response format to match the input
- if the 'wt' parameter is not explicit
- -->
- <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
+ <initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell">
<lst name="defaults">
<str name="df">text</str>
</lst>
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/schema.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/schema.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/schema.xml Sun Jan 4 14:53:12 2015
@@ -243,6 +243,7 @@
single-valued and either required or have a default value.
-->
<fieldType name="string" class="solr.StrField" sortMissingLast="true" />
+ <fieldType name="strings" class="solr.StrField" sortMissingLast="true" multiValued="true"/>
<!-- boolean type: "true" or "false" -->
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"/>
@@ -327,7 +328,7 @@
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
- <fieldtype name="binary" class="solr.BinaryField"/>
+ <fieldType name="binary" class="solr.BinaryField"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
@@ -551,14 +552,14 @@
</analyzer>
</fieldType>
- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="phonetic" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
</analyzer>
- </fieldtype>
+ </fieldType>
- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="payloads" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!--
@@ -574,7 +575,7 @@
-->
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
</analyzer>
- </fieldtype>
+ </fieldType>
<!-- lowercases the entire field value, keeping it as a single token. -->
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
@@ -611,7 +612,7 @@
<!-- since fields of this type are by default not stored or indexed,
any data added to them will be ignored outright. -->
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+ <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
<!-- This point type indexes the coordinates as separate fields (subFields)
If subFieldType is defined, it references a type, and a dynamic field
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/data_driven_schema_configs/conf/solrconfig.xml Sun Jan 4 14:53:12 2015
@@ -123,7 +123,7 @@
index format, but hooks into the schema to provide per-field customization of
the postings lists and per-document values in the fieldType element
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
- are experimental, so if you choose to customize the index format, its a good
+ are experimental, so if you choose to customize the index format, it's a good
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
before upgrading to a newer version to avoid unnecessary reindexing.
-->
@@ -134,7 +134,7 @@
<schemaFactory class="ClassicIndexSchemaFactory"/>
When ManagedIndexSchemaFactory is specified instead, Solr will load the schema from
- he resource named in 'managedSchemaResourceName', rather than from schema.xml.
+ the resource named in 'managedSchemaResourceName', rather than from schema.xml.
Note that the managed schema resource CANNOT be named schema.xml. If the managed
schema does not exist, Solr will create it after reading schema.xml, then rename
'schema.xml' to 'schema.xml.bak'.
@@ -877,84 +877,19 @@
<str name="wt">velocity</str>
<str name="v.template">browse</str>
<str name="v.layout">layout</str>
- <str name="title">Solritas</str>
<!-- Query settings -->
<str name="defType">edismax</str>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="mm">100%</str>
<str name="q.alt">*:*</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
- <str name="mlt.qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
- </str>
- <str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
- <int name="mlt.count">3</int>
-
<!-- Faceting defaults -->
<str name="facet">on</str>
- <str name="facet.field">cat</str>
- <str name="facet.field">manu_exact</str>
- <str name="facet.field">content_type</str>
- <str name="facet.field">author_s</str>
- <str name="facet.query">ipod</str>
- <str name="facet.query">GB</str>
<str name="facet.mincount">1</str>
- <str name="facet.pivot">cat,inStock</str>
- <str name="facet.range.other">after</str>
- <str name="facet.range">price</str>
- <int name="f.price.facet.range.start">0</int>
- <int name="f.price.facet.range.end">600</int>
- <int name="f.price.facet.range.gap">50</int>
- <str name="facet.range">popularity</str>
- <int name="f.popularity.facet.range.start">0</int>
- <int name="f.popularity.facet.range.end">10</int>
- <int name="f.popularity.facet.range.gap">3</int>
- <str name="facet.range">manufacturedate_dt</str>
- <str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
- <str name="f.manufacturedate_dt.facet.range.end">NOW</str>
- <str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
- <str name="f.manufacturedate_dt.facet.range.other">before</str>
- <str name="f.manufacturedate_dt.facet.range.other">after</str>
-
- <!-- Highlighting defaults -->
- <str name="hl">on</str>
- <str name="hl.fl">content features title name</str>
- <str name="hl.encoder">html</str>
- <str name="hl.simple.pre"><b></str>
- <str name="hl.simple.post"></b></str>
- <str name="f.title.hl.fragsize">0</str>
- <str name="f.title.hl.alternateField">title</str>
- <str name="f.name.hl.fragsize">0</str>
- <str name="f.name.hl.alternateField">name</str>
- <str name="f.content.hl.snippets">3</str>
- <str name="f.content.hl.fragsize">200</str>
- <str name="f.content.hl.alternateField">content</str>
- <str name="f.content.hl.maxAlternateFieldLength">750</str>
-
- <!-- Spell checking defaults -->
- <str name="spellcheck">on</str>
- <str name="spellcheck.extendedResults">false</str>
- <str name="spellcheck.count">5</str>
- <str name="spellcheck.alternativeTermCount">2</str>
- <str name="spellcheck.maxResultsForSuggest">5</str>
- <str name="spellcheck.collate">true</str>
- <str name="spellcheck.collateExtendedResults">true</str>
- <str name="spellcheck.maxCollationTries">5</str>
- <str name="spellcheck.maxCollations">3</str>
</lst>
-
- <!-- append spellchecking to our list of components -->
- <arr name="last-components">
- <str>spellcheck</str>
- </arr>
</requestHandler>
+
<initParams path="/update/**,/query,/select,/tvrh,/elevate,/spell,/browse">
<lst name="defaults">
<str name="df">_text</str>
@@ -977,12 +912,8 @@
class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<str name="lowernames">true</str>
- <str name="uprefix">ignored_</str>
-
- <!-- capture link hrefs but ignore div attributes -->
- <str name="captureAttr">true</str>
- <str name="fmap.a">links</str>
- <str name="fmap.div">ignored_</str>
+ <str name="fmap.meta">ignored_</str>
+ <str name="fmap.content">_text</str>
</lst>
</requestHandler>
@@ -1496,7 +1427,7 @@
</arr>
</processor>
<processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
- <str name="defaultFieldType">text_general</str>
+ <str name="defaultFieldType">strings</str>
<lst name="typeMapping">
<str name="valueClass">java.lang.Boolean</str>
<str name="fieldType">booleans</str>
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/schema.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/schema.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/schema.xml Sun Jan 4 14:53:12 2015
@@ -156,7 +156,7 @@
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="last_modified" type="date" indexed="true" stored="true"/>
<field name="links" type="string" indexed="true" stored="true" multiValued="true"/>
- <field name="_src" type="string" indexed="false" stored="true"/>
+ <field name="_src_" type="string" indexed="false" stored="true"/>
<!-- Main body of document extracted by SolrCell.
NOTE: This field is not indexed by default, since it is also copied to "text"
@@ -391,7 +391,7 @@
<!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
- <fieldtype name="binary" class="solr.BinaryField"/>
+ <fieldType name="binary" class="solr.BinaryField"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
@@ -624,14 +624,14 @@
</analyzer>
</fieldType>
- <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="phonetic" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
</analyzer>
- </fieldtype>
+ </fieldType>
- <fieldtype name="payloads" stored="false" indexed="true" class="solr.TextField" >
+ <fieldType name="payloads" stored="false" indexed="true" class="solr.TextField" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!--
@@ -647,7 +647,7 @@
-->
<filter class="solr.DelimitedPayloadTokenFilterFactory" encoder="float"/>
</analyzer>
- </fieldtype>
+ </fieldType>
<!-- lowercases the entire field value, keeping it as a single token. -->
<fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100">
@@ -684,7 +684,7 @@
<!-- since fields of this type are by default not stored or indexed,
any data added to them will be ignored outright. -->
- <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+ <fieldType name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
<!-- This point type indexes the coordinates as separate fields (subFields)
If subFieldType is defined, it references a type, and a dynamic field
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml Sun Jan 4 14:53:12 2015
@@ -72,17 +72,17 @@
The examples below can be used to load some solr-contribs along
with their external dependencies.
-->
- <lib dir="${solr.install.dir:../../..}/contrib/extraction/lib" regex=".*\.jar" />
- <lib dir="${solr.install.dir:../../..}/dist/" regex="solr-cell-\d.*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
- <lib dir="${solr.install.dir:../../..}/contrib/clustering/lib/" regex=".*\.jar" />
- <lib dir="${solr.install.dir:../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/contrib/clustering/lib/" regex=".*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-clustering-\d.*\.jar" />
- <lib dir="${solr.install.dir:../../..}/contrib/langid/lib/" regex=".*\.jar" />
- <lib dir="${solr.install.dir:../../..}/dist/" regex="solr-langid-\d.*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/contrib/langid/lib/" regex=".*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-langid-\d.*\.jar" />
- <lib dir="${solr.install.dir:../../..}/contrib/velocity/lib" regex=".*\.jar" />
- <lib dir="${solr.install.dir:../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
<!-- an exact 'path' can be used instead of a 'dir' to specify a
specific jar file. This will cause a serious error to be logged
@@ -140,7 +140,7 @@
index format, but hooks into the schema to provide per-field customization of
the postings lists and per-document values in the fieldType element
(postingsFormat/docValuesFormat). Note that most of the alternative implementations
- are experimental, so if you choose to customize the index format, its a good
+ are experimental, so if you choose to customize the index format, it's a good
idea to convert back to the official format e.g. via IndexWriter.addIndexes(IndexReader)
before upgrading to a newer version to avoid unnecessary reindexing.
-->
@@ -154,7 +154,7 @@
</schemaFactory>
When ManagedIndexSchemaFactory is specified, Solr will load the schema from
- he resource named in 'managedSchemaResourceName', rather than from schema.xml.
+ the resource named in 'managedSchemaResourceName', rather than from schema.xml.
Note that the managed schema resource CANNOT be named schema.xml. If the managed
schema does not exist, Solr will create it after reading schema.xml, then rename
'schema.xml' to 'schema.xml.bak'.
@@ -323,13 +323,6 @@
this is enabled here, and controlled through log4j.properties.
-->
<infoStream>true</infoStream>
-
- <!--
- Use true to enable this safety check, which can help
- reduce the risk of propagating index corruption from older segments
- into new ones, at the expense of slower merging.
- -->
- <checkIntegrityAtMerge>false</checkIntegrityAtMerge>
</indexConfig>
@@ -1054,7 +1047,7 @@
<initParams path="/update/json/docs">
<lst name="defaults">
<!--this ensures that the entire json doc will be stored verbatim into one field-->
- <str name="srcField">_src</str>
+ <str name="srcField">_src_</str>
<!--This means a the uniqueKeyField will be extracted from the fields and
all fields go into the 'df' field. In this config df is already configured to be 'text'
-->
@@ -1366,8 +1359,13 @@
</arr>
</requestHandler>
- <!-- This causes long startup times on big indexes, even when never used. See SOLR-6679
- <searchComponent name="suggest" class="solr.SuggestComponent">
+ <!-- This is disabled by default because it currently causes long startup times on
+ big indexes, even when never used. See SOLR-6679 for background.
+
+ To use this suggester, set the "solr.suggester.enabled=true" system property
+ -->
+ <searchComponent name="suggest" class="solr.SuggestComponent"
+ enable="${solr.suggester.enabled:false}" >
<lst name="suggester">
<str name="name">mySuggester</str>
<str name="lookupImpl">FuzzyLookupFactory</str>
@@ -1378,7 +1376,8 @@
</lst>
</searchComponent>
- <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
+ <requestHandler name="/suggest" class="solr.SearchHandler"
+ startup="lazy" enable="${solr.suggester.enabled:false}" >
<lst name="defaults">
<str name="suggest">true</str>
<str name="suggest.count">10</str>
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/facet_fields.vm Sun Jan 4 14:53:12 2015
@@ -13,7 +13,10 @@
<span class="facet-field">$field.name</span>
<ul>
#foreach($facet in $field.values)
- <li><a href="#url_for_facet_filter($field.name, $facet.name)">#if($facet.name!=$null)$facet.name#else<em>missing</em>#end</a> ($facet.count)</li>
+ <li>
+ <a href="#url_for_facet_filter($field.name, $facet.name)" title="$esc.html($facet.name)">
+ #if($facet.name!=$null)$esc.html($display.truncate($facet.name,20))#else<em>missing</em>#end</a> ($facet.count)
+ </li>
#end
</ul>
#end ## end if > 0
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/head.vm Sun Jan 4 14:53:12 2015
@@ -9,6 +9,8 @@
<script type="text/javascript" src="#{url_root}/js/lib/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="#{url_for_solr}/admin/file?file=/velocity/main.css&contentType=text/css"/>
<link rel="stylesheet" href="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.css&contentType=text/css" type="text/css" />
+ <link rel="icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
+ <link rel="shortcut icon" type="image/x-icon" href="#{url_root}/img/favicon.ico"/>
<script type="text/javascript" src="#{url_for_solr}/admin/file?file=/velocity/jquery.autocomplete.js&contentType=text/javascript"></script>
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/header.vm Sun Jan 4 14:53:12 2015
@@ -3,5 +3,5 @@
*#
<div id="head">
- <span ><a href="#url_for_home#if($request.params.get('debugQuery'))?debugQuery=true#end"><img src="#{url_root}/img/solr.png" id="logo"/></a></span>
+ <span ><a href="#url_for_home#if($request.params.get('debugQuery'))?debugQuery=true#end"><img src="#{url_root}/img/solr.svg" id="logo"/></a></span>
</div>
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/velocity/main.css Sun Jan 4 14:53:12 2015
@@ -160,7 +160,8 @@ a {
}
#logo {
- margin: 10px;
+ width: 115px;
+ margin: 0px 0px 20px 12px;
border-style: none;
}
Modified: lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl (original)
+++ lucene/dev/branches/lucene6005/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/luke.xsl Sun Jan 4 14:53:12 2015
@@ -39,8 +39,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="solr-admin.css"/>
- <link rel="icon" href="favicon.ico" type="image/ico"/>
- <link rel="shortcut icon" href="favicon.ico" type="image/ico"/>
+ <link rel="icon" href="favicon.ico" type="image/x-icon"/>
+ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<title>
<xsl:value-of select="$title"/>
</title>
Modified: lucene/dev/branches/lucene6005/solr/site/xsl/index.xsl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/site/xsl/index.xsl?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/site/xsl/index.xsl (original)
+++ lucene/dev/branches/lucene6005/solr/site/xsl/index.xsl Sun Jan 4 14:53:12 2015
@@ -34,13 +34,15 @@
<html>
<head>
<title><xsl:text>Apache Solr </xsl:text><xsl:value-of select="$version"/><xsl:text> Documentation</xsl:text></title>
+ <link rel="icon" type="image/x-icon" href="/solr/assets/images/favicon.ico"/>
+ <link rel="shortcut icon" type="image/x-icon" href="/solr/assets/images/favicon.ico"/>
</head>
<body>
<div>
<a href="http://lucene.apache.org/solr/">
- <img src="solr.png" title="Apache Solr Logo" alt="Solr" border="0"/>
+ <img src="solr.svg" style="width:210px; margin:22px 0px 7px 20px; border:none;" title="Apache Solr Logo" alt="Solr" />
</a>
- <div style="z-index:100;position:absolute;top:25px;left:252px">
+ <div style="z-index:100;position:absolute;top:25px;left:226px">
<span style="font-size: x-small">TM</span>
</div>
</div>
Modified: lucene/dev/branches/lucene6005/solr/solrj/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/build.xml?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/build.xml (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/build.xml Sun Jan 4 14:53:12 2015
@@ -22,7 +22,7 @@
<!-- violates the servlet-api restrictions, but it is safe to do so in this test: -->
<property name="forbidden-tests-excludes" value="
- org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest$DebugServlet.class
+ org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest$DebugServlet.class
"/>
<import file="../common-build.xml"/>
@@ -66,7 +66,7 @@
<!-- Specialized to use lucene's classpath too, because it refs e.g. qp syntax
(even though it doesnt compile with it)
- TODO: would be nice to fix this up better, but its hard because of
+ TODO: would be nice to fix this up better, but it's hard because of
the different ways solr links to lucene javadocs -->
<target name="-ecj-javadoc-lint-src" depends="-ecj-resolve">
<ecj-macro srcdir="${src.dir}" configuration="${common.dir}/tools/javadoc/ecj.javadocs.prefs">
Modified: lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/ResponseParser.java Sun Jan 4 14:53:12 2015
@@ -35,7 +35,7 @@ public abstract class ResponseParser
public abstract NamedList<Object> processResponse(Reader reader);
/**
- * A well behaved ResponseParser will return it's content-type.
+ * A well behaved ResponseParser will return its content-type.
*
* @return the content-type this parser expects to parse
*/
Modified: lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java Sun Jan 4 14:53:12 2015
@@ -730,7 +730,7 @@ public class SolrQuery extends Modifiabl
/**
* Updates or adds a single sort field specification to the current sort
* information. If the sort field already exist in the sort information map,
- * it's position is unchanged and the sort order is set; if it does not exist,
+ * its position is unchanged and the sort order is set; if it does not exist,
* it is appended at the end with the specified order..
*
* @return the modified SolrQuery object, for easy chaining
Modified: lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java Sun Jan 4 14:53:12 2015
@@ -109,5 +109,5 @@ public abstract class SolrRequest implem
public abstract SolrParams getParams();
public abstract Collection<ContentStream> getContentStreams() throws IOException;
- public abstract SolrResponse process( SolrServer server ) throws SolrServerException, IOException;
+ public abstract SolrResponse process( SolrClient server ) throws SolrServerException, IOException;
}
Modified: lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/AbstractUpdateRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/AbstractUpdateRequest.java?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/AbstractUpdateRequest.java (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/AbstractUpdateRequest.java Sun Jan 4 14:53:12 2015
@@ -17,7 +17,7 @@ package org.apache.solr.client.solrj.req
*/
import org.apache.solr.client.solrj.SolrRequest;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.response.UpdateResponse;
import org.apache.solr.common.params.ModifiableSolrParams;
@@ -117,11 +117,11 @@ public abstract class AbstractUpdateRequ
}
@Override
- public UpdateResponse process( SolrServer server ) throws SolrServerException, IOException
+ public UpdateResponse process(SolrClient client) throws SolrServerException, IOException
{
long startTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
UpdateResponse res = new UpdateResponse();
- res.setResponse( server.request( this ) );
+ res.setResponse(client.request(this));
long endTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
res.setElapsedTime(endTime - startTime);
return res;
Modified: lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java?rev=1649347&r1=1649346&r2=1649347&view=diff
==============================================================================
--- lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java (original)
+++ lucene/dev/branches/lucene6005/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java Sun Jan 4 14:53:12 2015
@@ -18,10 +18,11 @@
package org.apache.solr.client.solrj.request;
import org.apache.solr.client.solrj.SolrRequest;
-import org.apache.solr.client.solrj.SolrServer;
+import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.CollectionParams.CollectionAction;
import org.apache.solr.common.params.CoreAdminParams;
@@ -32,6 +33,9 @@ import org.apache.solr.common.util.Conte
import java.io.IOException;
import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
import java.util.concurrent.TimeUnit;
/**
@@ -39,13 +43,84 @@ import java.util.concurrent.TimeUnit;
*
* @since solr 4.5
*/
-public class CollectionAdminRequest extends SolrRequest
-{
- protected String collection = null;
+public class CollectionAdminRequest extends SolrRequest {
protected CollectionAction action = null;
- protected String asyncId = null;
- protected static class CollectionShardAdminRequest extends CollectionAdminRequest {
+ private static String PROPERTY_PREFIX = "property.";
+
+ protected void setAction( CollectionAction action ) {
+ this.action = action;
+ }
+
+ public CollectionAdminRequest()
+ {
+ super( METHOD.GET, "/admin/collections" );
+ }
+
+ public CollectionAdminRequest( String path )
+ {
+ super( METHOD.GET, path );
+ }
+
+ @Override
+ public SolrParams getParams() {
+ if( action == null ) {
+ throw new RuntimeException( "no action specified!" );
+ }
+ ModifiableSolrParams params = new ModifiableSolrParams();
+ params.set( CoreAdminParams.ACTION, action.toString() );
+ return params;
+ }
+
+ @Override
+ public Collection<ContentStream> getContentStreams() throws IOException {
+ return null;
+ }
+
+ @Override
+ public CollectionAdminResponse process(SolrClient server) throws SolrServerException, IOException
+ {
+ long startTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
+ CollectionAdminResponse res = new CollectionAdminResponse();
+ res.setResponse( server.request( this ) );
+ long endTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
+ res.setElapsedTime(endTime - startTime);
+ return res;
+ }
+
+ protected void addProperties(ModifiableSolrParams params, Properties props) {
+ Iterator<Map.Entry<Object, Object>> iter = props.entrySet().iterator();
+ while(iter.hasNext()) {
+ Map.Entry<Object, Object> prop = iter.next();
+ String key = (String) prop.getKey();
+ String value = (String) prop.getValue();
+ params.set(PROPERTY_PREFIX + key, value);
+ }
+ }
+
+ //---------------------------------------------------------------------------------------
+ //
+ //---------------------------------------------------------------------------------------
+
+ protected static class CollectionSpecificAdminRequest extends CollectionAdminRequest {
+ protected String collection = null;
+
+ public final void setCollectionName( String collectionName )
+ {
+ this.collection = collectionName;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set( CoreAdminParams.NAME, collection );
+ return params;
+ }
+
+
+ }
+
+ protected static class CollectionShardAdminRequest extends CollectionSpecificAdminRequest {
protected String shardName = null;
public void setShardName(String shard) { this.shardName = shard; }
@@ -53,10 +128,8 @@ public class CollectionAdminRequest exte
public ModifiableSolrParams getCommonParams() {
ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
- params.remove( "name" );
params.set( "collection", collection );
params.set( "shard", shardName);
- params.set( "async", asyncId);
return params;
}
@@ -65,9 +138,41 @@ public class CollectionAdminRequest exte
return getCommonParams();
}
}
+
+ protected static class CollectionAdminRoleRequest extends CollectionAdminRequest {
+ private String node;
+ private String role;
+
+ public void setNode(String node) {
+ this.node = node;
+ }
+
+ public String getNode() {
+ return this.node;
+ }
+
+ public void setRole(String role) {
+ this.role = role;
+ }
+
+ public String getRole() {
+ return this.role;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set("role", this.role);
+ params.set("node", this.node);
+ return params;
+ }
+
+ }
- //a create collection request
- public static class Create extends CollectionAdminRequest {
+ /** Specific Collection API call implementations **/
+
+ // CREATE request
+ public static class Create extends CollectionSpecificAdminRequest {
protected String configName = null;
protected String createNodeSet = null;
protected String routerName;
@@ -76,7 +181,11 @@ public class CollectionAdminRequest exte
protected Integer numShards;
protected Integer maxShardsPerNode;
protected Integer replicationFactor;
+
+ private Properties properties;
protected Boolean autoAddReplicas;
+ protected Integer stateFormat;
+ protected String asyncId;
public Create() {
@@ -92,6 +201,10 @@ public class CollectionAdminRequest exte
public void setMaxShardsPerNode(Integer numShards) { this.maxShardsPerNode = numShards; }
public void setAutoAddReplicas(boolean autoAddReplicas) { this.autoAddReplicas = autoAddReplicas; }
public void setReplicationFactor(Integer repl) { this.replicationFactor = repl; }
+ public void setStateFormat(Integer stateFormat) { this.stateFormat = stateFormat; }
+ public void setAsyncId(String asyncId) {
+ this.asyncId = asyncId;
+ }
public String getConfigName() { return configName; }
public String getCreateNodeSet() { return createNodeSet; }
@@ -101,67 +214,88 @@ public class CollectionAdminRequest exte
public Integer getMaxShardsPerNode() { return maxShardsPerNode; }
public Integer getReplicationFactor() { return replicationFactor; }
public Boolean getAutoAddReplicas() { return autoAddReplicas; }
+ public Integer getStateFormat() { return stateFormat; }
+ public String getAsyncId() {
+ return asyncId;
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
@Override
public SolrParams getParams() {
ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
- if (configName != null) {
- params.set( "collection.configName", configName);
- }
- if (createNodeSet != null) {
- params.set( "createNodeSet", createNodeSet);
- }
+ params.set( "collection.configName", configName);
+ params.set( "createNodeSet", createNodeSet);
if (numShards != null) {
params.set( ZkStateReader.NUM_SHARDS_PROP, numShards);
}
if (maxShardsPerNode != null) {
params.set( "maxShardsPerNode", maxShardsPerNode);
}
- if (routerName != null) {
- params.set( "router.name", routerName);
- }
- if (shards != null) {
- params.set("shards", shards);
- }
+ params.set( "router.name", routerName);
+ params.set("shards", shards);
if (routerField != null) {
params.set("router.field", routerField);
}
if (replicationFactor != null) {
- // OverseerCollectionProcessor.REPLICATION_FACTOR
params.set( "replicationFactor", replicationFactor);
}
- if (asyncId != null) {
- params.set("async", asyncId);
- }
+ params.set("async", asyncId);
if (autoAddReplicas != null) {
params.set(ZkStateReader.AUTO_ADD_REPLICAS, autoAddReplicas);
}
-
+ if(properties != null) {
+ addProperties(params, properties);
+ }
+ if (stateFormat != null) {
+ params.set(DocCollection.STATE_FORMAT, stateFormat);
+ }
return params;
}
+
}
- //a reload collection request
- public static class Reload extends CollectionAdminRequest {
+ // RELOAD request
+ public static class Reload extends CollectionSpecificAdminRequest {
public Reload() {
action = CollectionAction.RELOAD;
}
}
- //a delete collection request
- public static class Delete extends CollectionAdminRequest {
+ // DELETE request
+ public static class Delete extends CollectionSpecificAdminRequest {
public Delete() {
action = CollectionAction.DELETE;
}
}
- //a create shard collection request
+ // CREATESHARD request
public static class CreateShard extends CollectionShardAdminRequest {
protected String nodeSet;
+ private Properties properties;
- public void setNodeSet(String nodeSet) { this.nodeSet = nodeSet; }
- public String getNodeSet() { return nodeSet; }
+ public void setNodeSet(String nodeSet) {
+ this.nodeSet = nodeSet;
+ }
+
+ public String getNodeSet() {
+ return nodeSet;
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
public CreateShard() {
action = CollectionAction.CREATESHARD;
@@ -171,37 +305,77 @@ public class CollectionAdminRequest exte
public SolrParams getParams() {
ModifiableSolrParams params = getCommonParams();
params.set( "createNodeSet", nodeSet);
+ if(properties != null) {
+ addProperties(params, properties);
+ }
return params;
}
}
- //a split shard collection request
+ // SPLITSHARD request
public static class SplitShard extends CollectionShardAdminRequest {
protected String ranges;
+ protected String splitKey;
+ protected String asyncId;
+
+ private Properties properties;
+
+ public SplitShard() {
+ action = CollectionAction.SPLITSHARD;
+ }
public void setRanges(String ranges) { this.ranges = ranges; }
public String getRanges() { return ranges; }
- public SplitShard() {
- action = CollectionAction.SPLITSHARD;
+ public void setSplitKey(String splitKey) {
+ this.splitKey = splitKey;
+ }
+
+ public String getSplitKey() {
+ return this.splitKey;
+ }
+
+ public Properties getProperties() {
+ return properties;
}
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
+
+ public void setAsyncId(String asyncId) {
+ this.asyncId = asyncId;
+ }
+
+ public String getAsyncId() {
+ return asyncId;
+ }
+
@Override
public SolrParams getParams() {
ModifiableSolrParams params = getCommonParams();
params.set( "ranges", ranges);
+
+ if(splitKey != null)
+ params.set("split.key", this.splitKey);
+
+ if(properties != null) {
+ addProperties(params, properties);
+ }
+
+ params.set("async", asyncId);
return params;
}
}
- //a delete shard collection request
+ // DELETESHARD request
public static class DeleteShard extends CollectionShardAdminRequest {
public DeleteShard() {
action = CollectionAction.DELETESHARD;
}
}
- //a request status collection request
+ // REQUESTSTATUS request
public static class RequestStatus extends CollectionAdminRequest {
protected String requestId = null;
@@ -213,56 +387,88 @@ public class CollectionAdminRequest exte
public String getRequestId() { return this.requestId; }
@Override
- public void setAsyncId(String asyncId) {
- throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "You can not set async id for " +
- "a REQUESTSTATUS call. Try setRequestId()." );
- }
-
- @Override
public SolrParams getParams() {
ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
params.set("requestid", requestId);
return params;
}
}
-
- //a collection alias create request
+
+ // CREATEALIAS request
public static class CreateAlias extends CollectionAdminRequest {
- protected String aliasedCollections = null;
+ protected String aliasName;
+ protected String aliasedCollections;
+
+ public CreateAlias() {
+ action = CollectionAction.CREATEALIAS;
+ }
+ public void setAliasName(String aliasName) {
+ this.aliasName = aliasName;
+ }
+
+ public String getAliasName() {
+ return aliasName;
+ }
+
public void setAliasedCollections(String alias) { this.aliasedCollections = alias; }
public String getAliasedCollections() { return this.aliasedCollections; }
-
+
+ @Deprecated
+ public void setCollectionName(String aliasName) {
+ this.aliasName = aliasName;
+ }
+
@Override
public SolrParams getParams() {
ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
+ params.set("name", aliasName);
params.set( "collections", aliasedCollections );
return params;
}
-
-
- public CreateAlias() {
- action = CollectionAction.CREATEALIAS;
- }
}
- //a collection alias delete request
+ // DELETEALIAS request
public static class DeleteAlias extends CollectionAdminRequest {
+ protected String aliasName;
+
public DeleteAlias() {
action = CollectionAction.DELETEALIAS;
}
+
+ public void setAliasName(String aliasName) {
+ this.aliasName = aliasName;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set("name", aliasName);
+ return params;
+ }
}
+ // ADDREPLICA request
public static class AddReplica extends CollectionShardAdminRequest {
private String node;
private String routeKey;
private String instanceDir;
private String dataDir;
+ private Properties properties;
+ private String asyncId;
public AddReplica() {
action = CollectionAction.ADDREPLICA;
}
+ public Properties getProperties() {
+ return properties;
+ }
+
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
+
public String getNode() {
return node;
}
@@ -305,6 +511,7 @@ public class CollectionAdminRequest exte
}
params.add(ShardParams._ROUTE_, routeKey);
}
+ params.set("async", asyncId);
if (node != null) {
params.add("node", node);
}
@@ -314,71 +521,343 @@ public class CollectionAdminRequest exte
if (dataDir != null) {
params.add("dataDir", dataDir);
}
+ if (properties != null) {
+ addProperties(params, properties);
+ }
return params;
}
+
+ public void setAsyncId(String asyncId) {
+ this.asyncId = asyncId;
+ }
+
+ public String getAsyncId() {
+ return asyncId;
+ }
}
- public CollectionAdminRequest()
- {
- super( METHOD.GET, "/admin/collections" );
+ // DELETEREPLICA request
+ public static class DeleteReplica extends CollectionShardAdminRequest {
+ private String replica;
+ private Boolean onlyIfDown;
+
+ public DeleteReplica() {
+ action = CollectionAction.DELETEREPLICA;
+ }
+
+ public void setReplica(String replica) {
+ this.replica = replica;
+ }
+
+ public String getReplica() {
+ return this.replica;
+ }
+
+ public void setOnlyIfDown(boolean onlyIfDown) {
+ this.onlyIfDown = onlyIfDown;
+ }
+
+ public Boolean getOnlyIfDown() {
+ return this.onlyIfDown;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set(ZkStateReader.REPLICA_PROP, this.replica);
+
+ if(onlyIfDown != null) {
+ params.set("onlyIfDown", this.onlyIfDown);
+ }
+ return params;
+ }
}
+
+ // CLUSTERPROP request
+ public static class ClusterProp extends CollectionAdminRequest {
+ private String propertyName;
+ private String propertyValue;
+
+ public ClusterProp() {
+ this.action = CollectionAction.CLUSTERPROP;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
- public CollectionAdminRequest( String path )
- {
- super( METHOD.GET, path );
+ public String getPropertyName() {
+ return this.propertyName;
+ }
+
+ public void setPropertyValue(String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+ public String getPropertyValue() {
+ return this.propertyValue;
+ }
+
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.add("name", propertyName);
+ params.add("val", propertyValue);
+
+ return params;
+ }
+
}
+
+ // MIGRATE request
+ public static class Migrate extends CollectionSpecificAdminRequest {
+ private String targetCollection;
+ private String splitKey;
+ private Integer forwardTimeout;
+ private Properties properties;
+ private String asyncId;
+
+ public Migrate() {
+ action = CollectionAction.MIGRATE;
+ }
+
+ public void setTargetCollection(String targetCollection) {
+ this.targetCollection = targetCollection;
+ }
+
+ public String getTargetCollection() {
+ return this.targetCollection;
+ }
+
+ public void setSplitKey(String splitKey) {
+ this.splitKey = splitKey;
+ }
+
+ public String getSplitKey() {
+ return this.splitKey;
+ }
+
+ public void setForwardTimeout(int forwardTimeout) {
+ this.forwardTimeout = forwardTimeout;
+ }
+
+ public Integer getForwardTimeout() {
+ return this.forwardTimeout;
+ }
+
+ public void setProperties(Properties properties) {
+ this.properties = properties;
+ }
+
+ public Properties getProperties() {
+ return this.properties;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set( "collection", collection );
+ params.set("target.collection", targetCollection);
+ params.set("split.key", splitKey);
+ if(forwardTimeout != null) {
+ params.set("forward.timeout", forwardTimeout);
+ }
+ params.set("async", asyncId);
+
+ if(properties != null) {
+ addProperties(params, properties);
+ }
+
+ return params;
+ }
- public final void setCollectionName( String collectionName )
- {
- this.collection = collectionName;
+ public void setAsyncId(String asyncId) {
+ this.asyncId = asyncId;
+ }
+
+ public String getAsyncId() {
+ return asyncId;
+ }
+ }
+
+ // ADDROLE request
+ public static class AddRole extends CollectionAdminRoleRequest {
+ public AddRole() {
+ action = CollectionAction.ADDROLE;
+ }
}
- //---------------------------------------------------------------------------------------
- //
- //---------------------------------------------------------------------------------------
+ // REMOVEROLE request
+ public static class RemoveRole extends CollectionAdminRoleRequest {
+ public RemoveRole() {
+ action = CollectionAction.REMOVEROLE;
+ }
+ }
+
+ // OVERSEERSTATUS request
+ public static class OverseerStatus extends CollectionAdminRequest {
+ public OverseerStatus () {
+ action = CollectionAction.OVERSEERSTATUS;
+ }
+ }
- public void setAction( CollectionAction action )
- {
- this.action = action;
+ // CLUSTERSTATUS request
+ public static class ClusterStatus extends CollectionShardAdminRequest {
+
+ public ClusterStatus () {
+ action = CollectionAction.CLUSTERSTATUS;
+ }
+
}
- public void setAsyncId(String asyncId) {
- this.asyncId = asyncId;
+ // LIST request
+ public static class List extends CollectionAdminRequest {
+ public List () {
+ action = CollectionAction.LIST;
+ }
}
+
+ // ADDREPLICAPROP request
+ public static class AddReplicaProp extends CollectionShardAdminRequest {
+ private String replica;
+ private String propertyName;
+ private String propertyValue;
+ private Boolean shardUnique;
+
+ public AddReplicaProp() {
+ action = CollectionAction.ADDREPLICAPROP;
+ }
- //---------------------------------------------------------------------------------------
- //
- //---------------------------------------------------------------------------------------
+ public String getReplica() {
+ return replica;
+ }
- @Override
- public SolrParams getParams()
- {
- if( action == null ) {
- throw new RuntimeException( "no action specified!" );
+ public void setReplica(String replica) {
+ this.replica = replica;
}
- ModifiableSolrParams params = new ModifiableSolrParams();
- params.set( CoreAdminParams.ACTION, action.toString() );
- params.set( CoreAdminParams.NAME, collection );
- return params;
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ public void setPropertyValue(String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+ public Boolean getShardUnique() {
+ return shardUnique;
+ }
+
+ public void setShardUnique(Boolean shardUnique) {
+ this.shardUnique = shardUnique;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set("replica", replica);
+ params.set("property", propertyName);
+ params.set("property.value", propertyValue);
+
+ if(shardUnique != null)
+ params.set("shardUnique", shardUnique);
+
+ return params;
+ }
+
}
+
+ // DELETEREPLICAPROP request
+ public static class DeleteReplicaProp extends CollectionShardAdminRequest {
+ private String replica;
+ private String propertyName;
- //---------------------------------------------------------------------------------------
- //
- //---------------------------------------------------------------------------------------
+ public DeleteReplicaProp() {
+ this.action = CollectionAction.DELETEREPLICAPROP;
+ }
+
+ public String getReplica() {
+ return replica;
+ }
- @Override
- public Collection<ContentStream> getContentStreams() throws IOException {
- return null;
+ public void setReplica(String replica) {
+ this.replica = replica;
+ }
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set("replica", replica);
+ params.set("property", propertyName);
+ return params;
+ }
}
+
+ // BALANCESHARDUNIQUE request
+ public static class BalanceShardUnique extends CollectionAdminRequest {
+ private String collection;
+ private String propertyName;
+ private Boolean onlyActiveNodes;
+ private Boolean shardUnique;
+
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ public Boolean getOnlyActiveNodes() {
+ return onlyActiveNodes;
+ }
+
+ public void setOnlyActiveNodes(Boolean onlyActiveNodes) {
+ this.onlyActiveNodes = onlyActiveNodes;
+ }
+
+ public Boolean getShardUnique() {
+ return shardUnique;
+ }
+
+ public void setShardUnique(Boolean shardUnique) {
+ this.shardUnique = shardUnique;
+ }
+
+ public void setCollection(String collection) {
+ this.collection = collection;
+ }
+
+ public String getCollection() {
+ return collection;
+ }
+
+ @Override
+ public SolrParams getParams() {
+ ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
+ params.set("collection", collection);
+ params.set("property", propertyName);
+ if(onlyActiveNodes != null)
+ params.set("onlyactivenodes", onlyActiveNodes);
+ if(shardUnique != null)
+ params.set("shardUnique", shardUnique);
+ return params;
+ }
- @Override
- public CollectionAdminResponse process(SolrServer server) throws SolrServerException, IOException
- {
- long startTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
- CollectionAdminResponse res = new CollectionAdminResponse();
- res.setResponse( server.request( this ) );
- long endTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
- res.setElapsedTime(endTime - startTime);
- return res;
}
}