You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2011/01/24 15:32:04 UTC
svn commit: r1062798 [3/3] - in /lucene/dev/branches/bulkpostings: ./
dev-tools/eclipse/ dev-tools/maven/ dev-tools/maven/lucene/
dev-tools/maven/lucene/contrib/ dev-tools/maven/lucene/contrib/ant/
dev-tools/maven/lucene/contrib/db/ dev-tools/maven/luc...
Modified: lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/rss/conf/solrconfig.xml?rev=1062798&r1=1062797&r2=1062798&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/rss/conf/solrconfig.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/rss/conf/solrconfig.xml Mon Jan 24 14:31:59 2011
@@ -17,18 +17,17 @@
-->
<config>
+
+ <!--
+ Controls what version of Lucene various components of Solr adhere to. Generally, you want
+ to use the latest version to get all bug fixes and improvements. It is highly recommended
+ that you fully re-index after changing this setting as it can affect both how text is indexed
+ and queried.
+ -->
+ <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<jmx />
- <!-- Set this to 'false' if you want solr to continue working after it has
- encountered an severe configuration error. In a production environment,
- you may want solr to keep working even if one handler is mis-configured.
-
- You may also set this to false using by setting the system property:
- -Dsolr.abortOnConfigurationError=false
- -->
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
-
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->
<useCompoundFile>false</useCompoundFile>
@@ -350,112 +349,6 @@
</lst>
</requestHandler>
-
- <!-- DisMaxRequestHandler allows easy searching across multiple fields
- for simple user-entered phrases.
- see http://wiki.apache.org/solr/DisMaxRequestHandler
- -->
- <requestHandler name="dismax" class="solr.DisMaxRequestHandler" >
- <lst name="defaults">
- <str name="echoParams">explicit</str>
- <float name="tie">0.01</float>
- <str name="qf">
- text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
- </str>
- <str name="pf">
- text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9
- </str>
- <str name="bf">
- ord(popularity)^0.5 recip(rord(price),1,1000,1000)^0.3
- </str>
- <str name="fl">
- id,name,price,score
- </str>
- <str name="mm">
- 2<-1 5<-2 6<90%
- </str>
- <int name="ps">100</int>
- <str name="q.alt">*:*</str>
- <!-- example highlighter config, enable per-query with hl=true -->
- <str name="hl.fl">text features name</str>
- <!-- for this field, we want no fragmenting, just highlighting -->
- <str name="f.name.hl.fragsize">0</str>
- <!-- instructs Solr to return the field itself if no query terms are
- found -->
- <str name="f.name.hl.alternateField">name</str>
- <str name="f.text.hl.fragmenter">regex</str> <!-- defined below -->
- </lst>
- </requestHandler>
-
- <!-- Note how you can register the same handler multiple times with
- different names (and different init parameters)
- -->
- <requestHandler name="partitioned" class="solr.DisMaxRequestHandler" >
- <lst name="defaults">
- <str name="echoParams">explicit</str>
- <str name="qf">text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0</str>
- <str name="mm">2<-1 5<-2 6<90%</str>
- <!-- This is an example of using Date Math to specify a constantly
- moving date range in a config...
- -->
- <str name="bq">incubationdate_dt:[* TO NOW/DAY-1MONTH]^2.2</str>
- </lst>
- <!-- In addition to defaults, "appends" params can be specified
- to identify values which should be appended to the list of
- multi-val params from the query (or the existing "defaults").
-
- In this example, the param "fq=instock:true" will be appended to
- any query time fq params the user may specify, as a mechanism for
- partitioning the index, independent of any user selected filtering
- that may also be desired (perhaps as a result of faceted searching).
-
- NOTE: there is *absolutely* nothing a client can do to prevent these
- "appends" values from being used, so don't use this mechanism
- unless you are sure you always want it.
- -->
- <lst name="appends">
- <str name="fq">inStock:true</str>
- </lst>
- <!-- "invariants" are a way of letting the Solr maintainer lock down
- the options available to Solr clients. Any params values
- specified here are used regardless of what values may be specified
- in either the query, the "defaults", or the "appends" params.
-
- In this example, the facet.field and facet.query params are fixed,
- limiting the facets clients can use. Faceting is not turned on by
- default - but if the client does specify facet=true in the request,
- these are the only facets they will be able to see counts for;
- regardless of what other facet.field or facet.query params they
- may specify.
-
- NOTE: there is *absolutely* nothing a client can do to prevent these
- "invariants" values from being used, so don't use this mechanism
- unless you are sure you always want it.
- -->
- <lst name="invariants">
- <str name="facet.field">cat</str>
- <str name="facet.field">manu_exact</str>
- <str name="facet.query">price:[* TO 500]</str>
- <str name="facet.query">price:[500 TO *]</str>
- </lst>
- </requestHandler>
-
- <requestHandler name="instock" class="solr.DisMaxRequestHandler" >
- <!-- for legacy reasons, DisMaxRequestHandler will assume all init
- params are "defaults" if you don't explicitly specify any defaults.
- -->
- <str name="fq">
- inStock:true
- </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
- </str>
- <str name="mm">
- 2<-1 5<-2 6<90%
- </str>
- </requestHandler>
-
-
<!-- SpellCheckerRequestHandler takes in a word (or several words) as the
value of the "q" parameter and returns a list of alternative spelling
suggestions. If invoked with a ...&cmd=rebuild, it will rebuild the
@@ -489,7 +382,7 @@
</lst>
</requestHandler>
-<requestHandler name="/dataimport"
+ <requestHandler name="/dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">rss-data-config.xml</str>
@@ -574,16 +467,6 @@
-->
</requestHandler>
- <!--
- Analysis request handler. Since Solr 1.3. Use to returnhow a document is analyzed. Useful
- for debugging and as a token server for other types of applications
- -->
- <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" >
- <!--
- <str name="update.processor.class">org.apache.solr.handler.UpdateRequestProcessor</str>
- -->
- </requestHandler>
-
<!-- CSV update handler, loaded on demand -->
<requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
@@ -643,7 +526,7 @@
<!-- allow 50% slop on fragment sizes -->
<float name="hl.regex.slop">0.5</float>
<!-- a basic sentence pattern -->
- <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
+ <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
</lst>
</fragmenter>
Modified: lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/tika/conf/solrconfig.xml?rev=1062798&r1=1062797&r2=1062798&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/tika/conf/solrconfig.xml (original)
+++ lucene/dev/branches/bulkpostings/solr/example/example-DIH/solr/tika/conf/solrconfig.xml Mon Jan 24 14:31:59 2011
@@ -17,14 +17,14 @@
-->
<config>
- <!-- Set this to 'false' if you want solr to continue working after it has
- encountered an severe configuration error. In a production environment,
- you may want solr to keep working even if one handler is mis-configured.
-
- You may also set this to false using by setting the system property:
- -Dsolr.abortOnConfigurationError=false
- -->
- <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
+
+ <!--
+ Controls what version of Lucene various components of Solr adhere to. Generally, you want
+ to use the latest version to get all bug fixes and improvements. It is highly recommended
+ that you fully re-index after changing this setting as it can affect both how text is indexed
+ and queried.
+ -->
+ <luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<lib dir="../../../../contrib/extraction/lib" />
<lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.jar" />
Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/CoreContainer.java?rev=1062798&r1=1062797&r2=1062798&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/CoreContainer.java Mon Jan 24 14:31:59 2011
@@ -879,7 +879,7 @@ public class CoreContainer
/** Write the cores configuration through a writer.*/
void persist(Writer w) throws IOException {
- w.write("<?xml version='1.0' encoding='UTF-8'?>");
+ w.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
w.write("<solr");
if (this.libDir != null) {
writeAttribute(w,"sharedLib",libDir);
@@ -888,9 +888,9 @@ public class CoreContainer
w.write(">\n");
if (containerProperties != null && !containerProperties.isEmpty()) {
- writeProperties(w, containerProperties);
+ writeProperties(w, containerProperties, " ");
}
- w.write("<cores");
+ w.write(" <cores");
writeAttribute(w, "adminPath",adminPath);
if(adminHandler != null) writeAttribute(w, "adminHandler",adminHandler);
if(shareSchema) writeAttribute(w, "shareSchema","true");
@@ -903,7 +903,7 @@ public class CoreContainer
}
}
- w.write("</cores>\n");
+ w.write(" </cores>\n");
w.write("</solr>\n");
}
@@ -918,8 +918,8 @@ public class CoreContainer
/** Writes the cores configuration node for a given core. */
void persist(Writer w, CoreDescriptor dcore) throws IOException {
- w.write(" <core");
- writeAttribute(w,"name",dcore.name);
+ w.write(" <core");
+ writeAttribute(w,"name",dcore.name.equals("") ? defaultCoreName : dcore.name);
writeAttribute(w,"instanceDir",dcore.getInstanceDir());
//write config (if not default)
String opt = dcore.getConfigName();
@@ -953,14 +953,14 @@ public class CoreContainer
w.write("/>\n"); // core
else {
w.write(">\n");
- writeProperties(w, dcore.getCoreProperties());
- w.write("</core>");
+ writeProperties(w, dcore.getCoreProperties(), " ");
+ w.write(" </core>\n");
}
}
- private void writeProperties(Writer w, Properties props) throws IOException {
+ private void writeProperties(Writer w, Properties props, String indent) throws IOException {
for (Map.Entry<Object, Object> entry : props.entrySet()) {
- w.write("<property");
+ w.write(indent + "<property");
writeAttribute(w,"name",entry.getKey());
writeAttribute(w,"value",entry.getValue());
w.write("/>\n");