You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2013/03/10 16:05:21 UTC
svn commit: r1454862 [32/49] - in /lucene/dev/branches/lucene4258: ./
dev-tools/ dev-tools/eclipse/ dev-tools/idea/.idea/
dev-tools/idea/.idea/libraries/ dev-tools/idea/lucene/demo/
dev-tools/idea/lucene/facet/ dev-tools/idea/lucene/highlighter/ dev-to...
Modified: lucene/dev/branches/lucene4258/lucene/tools/junit4/tests.policy
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/lucene/tools/junit4/tests.policy?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/lucene/tools/junit4/tests.policy (original)
+++ lucene/dev/branches/lucene4258/lucene/tools/junit4/tests.policy Sun Mar 10 15:04:57 2013
@@ -48,7 +48,7 @@ grant {
permission java.lang.reflect.ReflectPermission "*";
permission java.lang.RuntimePermission "*";
- // These two *have* to be spelled out a seperate
+ // These two *have* to be spelled out a separate
permission java.lang.management.ManagementPermission "control";
permission java.lang.management.ManagementPermission "monitor";
@@ -67,4 +67,7 @@ grant {
permission java.security.SecurityPermission "getProperty.networkaddress.cache.ttl";
permission java.security.SecurityPermission "getProperty.networkaddress.cache.negative.ttl";
+ // SSL related properties for Solr tests
+ permission java.security.SecurityPermission "getProperty.ssl.*";
+
};
Modified: lucene/dev/branches/lucene4258/lucene/tools/src/java/lucene-solr.antlib.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/lucene/tools/src/java/lucene-solr.antlib.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/lucene/tools/src/java/lucene-solr.antlib.xml (original)
+++ lucene/dev/branches/lucene4258/lucene/tools/src/java/lucene-solr.antlib.xml Sun Mar 10 15:04:57 2013
@@ -18,7 +18,4 @@
<taskdef
name="licenses"
classname="org.apache.lucene.validation.LicenseCheckTask" />
- <taskdef
- name="forbidden-apis"
- classname="org.apache.lucene.validation.ForbiddenApisCheckTask" />
</antlib>
Modified: lucene/dev/branches/lucene4258/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/CHANGES.txt?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene4258/solr/CHANGES.txt Sun Mar 10 15:04:57 2013
@@ -22,22 +22,323 @@ $Id$
================== 5.0.0 ==================
-(No changes)
+Versions of Major Components
+---------------------
+Apache Tika 1.3
+Carrot2 3.6.2
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.5
+
+Upgrading from Solr 4.x
+----------------------
+
+TBD...
+
+Detailed Change List
+----------------------
+
+================== 4.3.0 ==================
+
+Versions of Major Components
+---------------------
+Apache Tika 1.3
+Carrot2 3.6.2
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.5
+
+Upgrading from Solr 4.2.0
+----------------------
+
+(No upgrade instructions yet)
+
+Detailed Change List
+----------------------
+
+New Features
+----------------------
+
+Bug Fixes
+----------------------
+
+Other Changes
+----------------------
+
+* SOLR-4537: Clean up schema information REST API. (Steve Rowe)
+
+================== 4.2.0 ==================
+
+Versions of Major Components
+---------------------
+Apache Tika 1.3
+Carrot2 3.6.2
+Velocity 1.7 and Velocity Tools 2.0
+Apache UIMA 2.3.1
+Apache ZooKeeper 3.4.5
+
+Upgrading from Solr 4.1.0
+----------------------
+
+(No upgrade instructions yet)
+
+Detailed Change List
+----------------------
+
+New Features
+----------------------
+
+* SOLR-4043: Add ability to get success/failure responses from Collections API.
+ (Raintung Li, Mark Miller)
+
+* SOLR-2827: RegexpBoost Update Processor (janhoy)
+
+* SOLR-4370: Allow configuring commitWithin to do hard commits.
+ (Mark Miller, Senthuran Sivananthan)
+
+* SOLR-4451: SolrJ, and SolrCloud internals, now use SystemDefaultHttpClient
+ under the covers -- allowing many HTTP connection related properties to be
+ controlled via 'standard' java system properties. (hossman)
+
+* SOLR-3855, SOLR-4490: Doc values support. (Adrien Grand, Robert Muir)
+
+* SOLR-4417: Reopen the IndexWriter on SolrCore reload. (Mark Miller)
+
+* SOLR-4477: Add support for queries (match-only) against docvalues fields.
+ (Robert Muir)
+
+* SOLR-4488: Return slave replication details for a master if the master has
+ also acted like a slave. (Mark Miller)
+
+* SOLR-4498: Add list command to ZkCLI that prints out the contents of
+ ZooKeeper. (Roman Shaposhnik via Mark Miller)
+
+* SOLR-4481: SwitchQParserPlugin registered by default as 'switch' using
+ syntax: {!switch case=XXX case.foo=YYY case.bar=ZZZ default=QQQ}foo
+ (hossman)
+
+* SOLR-4078: Allow custom naming of SolrCloud nodes so that a new host:port
+ combination can take over for a previous shard. (Mark Miller)
+
+* SOLR-4210: Requests to a Collection that does not exist on the receiving node
+ should be proxied to a suitable node. (Mark Miller, Po Rui, yonik)
+
+* SOLR-1365: New SweetSpotSimilarityFactory allows customizable TF/IDF based
+ Similarity when you know the optimal "Sweet Spot" of values for the field
+ length and TF scoring factors. (hossman)
+
+* SOLR-4138: CurrencyField fields can now be used in a ValueSources to
+ get the "raw" value (using the default number of fractional digits) in
+ the default currency of the field type. There is also a new
+ currency(field,[CODE]) function for generating a ValueSource of the
+ "natural" value, converted to an optionally specified currency to
+ override the default for the field type.
+ (hossman)
+
+* SOLR-4503: Add REST API methods, via Restlet integration, for reading schema
+ elements, at /schema/fields/, /schema/dynamicfields/, /schema/fieldtypes/,
+ and /schema/copyfields/. (Steve Rowe)
+
+Bug Fixes
+----------------------
+
+* SOLR-2850: Do not refine facets when minCount == 1
+ (Matt Smith, lundgren via Adrien Grand)
+
+* SOLR-4309: /browse: Improve JQuery autosuggest behavior (janhoy)
+
+* SOLR-4330: group.sort is ignored when using group.truncate and ex/tag
+ local params together (koji)
+
+* SOLR-4321: Collections API will sometimes use a node more than once, even
+ when more unused nodes are available.
+ (Eric Falcao, Brett Hoerner, Mark Miller)
+
+* SOLR-4345 : Solr Admin UI dosent work in IE 10 (steffkes)
+
+* SOLR-4349 : Admin UI - Query Interface does not work in IE
+ (steffkes)
+
+* SOLR-4359: The RecentUpdates#update method should treat a problem reading the
+ next record the same as a problem parsing the record - log the exception and
+ break. (Mark Miller)
+
+* SOLR-4225: Term info page under schema browser shows incorrect count of terms
+ (steffkes)
+
+* SOLR-3926: Solr should support better way of finding active sorts (Eirik Lygre via
+ Erick Erickson)
+
+* SOLR-4342: Fix DataImportHandler stats to be a proper Map (hossman)
+
+* SOLR-3967: langid.enforceSchema option checks source field instead of target field (janhoy)
+
+* SOLR-4380: Replicate after startup option would not replicate until the
+ IndexWriter was lazily opened. (Mark Miller, Gregg Donovan)
+
+* SOLR-4400: Deadlock can occur in a rare race between committing and
+ closing a SolrIndexWriter. (Erick Erickson, Mark Miller)
+
+* SOLR-3655: A restarted node can briefly appear live and active before it really
+ is in some cases. (Mark Miller)
+
+* SOLR-4426: NRTCachingDirectoryFactory does not initialize maxCachedMB and maxMergeSizeMB
+ if <directoryFactory> is not present in solrconfig.xml (Jack Krupansky via shalin)
+
+* SOLR-4463: Fix SolrCoreState reference counting. (Mark Miller)
+
+* SOLR-4459: The Replication 'index move' rather than copy optimization doesn't
+ kick in when using NRTCachingDirectory or the rate limiting feature.
+ (Mark Miller)
+
+* SOLR-4421,SOLR-4165: On CoreContainer shutdown, all SolrCores should publish their
+ state as DOWN. (Mark Miller, Markus Jelsma)
+
+* SOLR-4467: Ephemeral directory implementations may not recover correctly
+ because the code to clear the tlog files on startup is off. (Mark Miller)
+
+* SOLR-4413: Fix SolrCore#getIndexDir() to return the current index directory.
+ (Gregg Donovan, Mark Miller)
+
+* SOLR-4469: A new IndexWriter must be opened on SolrCore reload when the index
+ directory has changed and the previous SolrCore's state should not be
+ propagated. (Mark Miller, Gregg Donovan)
+
+* SOLR-4471: Replication occurs even when a slave is already up to date.
+ (Mark Miller, Andre Charton)
+
+* SOLR-4484: ReplicationHandler#loadReplicationProperties still uses Files
+ rather than the Directory to try and read the replication properties files.
+ (Mark Miller)
+
+* SOLR-4352: /browse pagination now supports and preserves sort context
+ (Eric Spiegelberg, Erik Hatcher)
+
+* LUCENE-4796, SOLR-4373: Fix concurrency issue in NamedSPILoader and
+ AnalysisSPILoader when doing concurrent core loads in multicore
+ Solr configs. (Uwe Schindler, Hossman)
+
+* SOLR-4504: Fixed CurrencyField range queries to correctly exclude
+ documents w/o values (hossman)
+
+* SOLR-4480: A trailing + or - caused the edismax parser to throw
+ an exception. (Fiona Tay, Jan Høydahl, yonik)
+
+* SOLR-4507: The Cloud tab does not show up in the Admin UI if you
+ set zkHost in solr.xml. (Alfonso Presa, Mark Miller)
+
+* SOLR-4505: Possible deadlock around SolrCoreState update lock.
+ (Erick Erickson, Mark Miller)
+
+* SOLR-4511: When a new index is replicated into place, we need
+ to update the most recent replicatable index point without
+ doing a commit. This is important for repeater use cases, as
+ well as when nodes may switch master/slave roles.
+ (Mark Miller, Raúl Grande)
+
+* SOLR-4515: CurrencyField's OpenExchangeRatesOrgProvider now requires
+ a ratesFileLocation init param, since the previous global default
+ no longer works (hossman)
+
+* SOLR-4518: Improved CurrencyField error messages when attempting to
+ use a Currency that is not supported by the current JVM. (hossman)
+
+* SOLR-3798: Fix copyField implementation in IndexSchema to handle
+ dynamic field references that aren't string-equal to the name of
+ the referenced dynamic field. (Steve Rowe)
+
+* SOLR-4497: Collection Aliasing. (Mark Miller)
+
+Optimizations
+----------------------
+
+* SOLR-4339: Admin UI - Display Field-Flags on Schema-Browser
+ (steffkes)
+
+* SOLR-4340: Admin UI - Analysis's Button Spinner goes wild
+ (steffkes)
+
+* SOLR-4341: Admin UI - Plugins/Stats Page contains loooong
+ Values which result in horizontal Scrollbar (steffkes)
+
+* SOLR-3915: Color Legend for Cloud UI (steffkes)
+
+* SOLR-4306: Utilize indexInfo=false when gathering core names in UI
+ (steffkes)
+
+* SOLR-4284: Admin UI - make core list scrollable separate from the rest of
+ the UI (steffkes)
+
+* SOLR-4364: Admin UI - Locale based number formatting (steffkes)
+
+* SOLR-4521: Stop using the 'force' option for recovery replication. This
+ will keep some less common unnecessary replications from happening.
+ (Mark Miller, Simon Scofield)
+
+* SOLR-4529: Improve Admin UI Dashboard legibility (Felix Buenemann via
+ steffkes)
+
+* SOLR-4526: Admin UI depends on optional system info (Felix Buenemann via
+ steffkes)
+
+Other Changes
+----------------------
+
+* SOLR-4259: Carrot2 dependency should be declared on the mini version, not the core.
+ (Dawid Weiss).
+
+* SOLR-4348: Make the lock type configurable by system property by default.
+ (Mark Miller)
+
+* SOLR-4353: Renamed example jetty context file to reduce confusion (hossman)
+
+* SOLR-4384: Make post.jar report timing information (Upayavira via janhoy)
+
+* SOLR-4415: Add 'state' to shards (default to 'active') and read/write them to
+ ZooKeeper (Anshum Gupta via shalin)
+
+* SOLR-4394: Tests and example configs demonstrating SSL with both server
+ and client certs (hossman)
+
+* SOLR-3060: SurroundQParserPlugin highlighting tests
+ (Ahmet Arslan via hossman)
+
+* SOLR-2470: Added more tests for VelocityResponseWriter
+
+* SOLR-4471: Improve and clean up TestReplicationHandler.
+ (Amit Nithian via Mark Miller)
+
+* SOLR-3843: Include lucene codecs jar and enable per-field postings and docvalues
+ support in the schema.xml (Robert Muir, Steve Rowe)
+
+* SOLR-4511: Add new test for 'repeater' replication node. (Mark Miller)
+
+* SOLR-4458: Sort directions (asc, desc) are now case insensitive
+ (Shawn Heisey via hossman)
+
+* SOLR-2996: A bare * without a field specification is treated as *:*
+ by the lucene and edismax query paesers.
+ (hossman, Jan Høydahl, Alan Woodward, yonik)
+
+* SOLR-4416: Upgrade to Tika 1.3. (Markus Jelsma via Mark Miller)
+
+* SOLR-4200: Reduce INFO level logging from CachingDirectoryFactory
+ (Shawn Heisey via hossman)
================== 4.1.0 ==================
Versions of Major Components
---------------------
Apache Tika 1.2
-Carrot2 3.5.0
-Velocity 1.6.4 and Velocity Tools 2.0
+Carrot2 3.6.2
+Velocity 1.7 and Velocity Tools 2.0
Apache UIMA 2.3.1
Apache ZooKeeper 3.4.5
Upgrading from Solr 4.0.0
----------------------
-Custom java parsing plugins need to migrade from throwing the internal
+Custom java parsing plugins need to migrate from throwing the internal
ParseException to throwing SyntaxError.
BaseDistributedSearchTestCase now randomizes the servlet context it uses when
@@ -83,10 +384,6 @@ New Features
- SOLR-4144: Replication using too much RAM. (yonik, Markus Jelsma)
- SOLR-4187: NPE on Directory release (Mark Miller, Markus Jelsma)
-* SOLR-1972: Add extra statistics to RequestHandlers - 5 & 15-minute reqs/sec
- rolling averages; median, 75th, 95th, 99th, 99.9th percentile request times
- (Alan Woodward, Shawn Heisey, Adrien Grand)
-
* SOLR-4051: Add <propertyWriter /> element to DIH's data-config.xml file,
allowing the user to specify the location, filename and Locale for
the "data-config.properties" file. Alternatively, users can specify their
@@ -134,7 +431,7 @@ New Features
CoreAdmin API the same way as the data directory. (Mark Miller)
* SOLR-4028: When using ZK chroot, it would be nice if Solr would create the
- initial path when it doesn't exist. (Tomas Fernandez Lobbe via Mark Miller)
+ initial path when it doesn't exist. (Tomás Fernández Löbbe via Mark Miller)
* SOLR-3948: Calculate/display deleted documents in admin interface.
(Shawn Heisey via Mark Miller)
@@ -156,6 +453,69 @@ New Features
* SOLR-4110: Configurable Content-Type headers for PHPResponseWriters and
PHPSerializedResponseWriter. (Dominik Siebel via Mark Miller)
+
+* SOLR-1028: The ability to specify "transient" and "loadOnStartup" as a new properties of
+ <core> tags in solr.xml. Can specify "transientCacheSize" in the <cores> tag. Together
+ these allow cores to be loaded only when needed and only transientCacheSize transient
+ cores will be loaded at a time, the rest aged out on an LRU basis.
+
+* SOLR-4246: When update.distrib is set to skip update processors before
+ the distributed update processor, always include the log update processor
+ so forwarded updates will still be logged. (yonik)
+
+* SOLR-4230: The new Solr 4 spatial fields now work with the {!geofilt} and
+ {!bbox} query parsers. The score local-param works too. (David Smiley)
+
+* SOLR-1972: Add extra statistics to RequestHandlers - 5 & 15-minute reqs/sec
+ rolling averages; median, 75th, 95th, 99th, 99.9th percentile request times
+ (Alan Woodward, Shawn Heisey, Adrien Grand, Uwe Schindler)
+
+* SOLR-4271: Add support for PostingsHighlighter. (Robert Muir)
+
+* SOLR-4255: The new Solr 4 spatial fields now have a 'filter' boolean local-param
+ that can be set to false to not filter. Its useful when there is already a spatial
+ filter query but you also need to sort or boost by distance. (David Smiley)
+
+* SOLR-4265, SOLR-4283: Solr now parses request parameters (in URL or sent with POST
+ using content-type application/x-www-form-urlencoded) in its dispatcher code. It no
+ longer relies on special configuration settings in Tomcat or other web containers
+ to enable UTF-8 encoding, which is mandatory for correct Solr behaviour. Query
+ strings passed in via the URL need to be properly-%-escaped, UTF-8 encoded
+ bytes, otherwise Solr refuses to handle the request. The maximum length of
+ x-www-form-urlencoded POST parameters can now be configured through the
+ requestDispatcher/requestParsers/@formdataUploadLimitInKB setting in
+ solrconfig.xml (defaults to 2 MiB). Solr now works out of the box with
+ e.g. Tomcat, JBoss,... (Uwe Schindler, Dawid Weiss, Alex Rocher)
+
+* SOLR-2201: DIH's "formatDate" function now supports a timezone as an optional
+ fourth parameter (James Dyer, Mark Waddle)
+
+* SOLR-4302: New parameter 'indexInfo' (defaults to true) in CoreAdmin STATUS
+ command can be used to omit index specific information (Shahar Davidson via shalin)
+
+* SOLR-2592: Collection specific document routing. The "compositeId"
+ router is the default for collections with hash based routing (i.e. when
+ numShards=N is specified on collection creation). Documents with ids sharing
+ the same domain (prefix) will be routed to the same shard, allowing for
+ efficient querying.
+
+ Example:
+ The following two documents will be indexed to the same shard
+ since they share the same domain "customerB!".
+ <code>
+ {"id" : "customerB!doc1" [...] }
+ {"id" : "customerB!doc2" [...] }
+ </code>
+ At query time, one can specify a "shard.keys" parameter that lists what
+ shards the query should cover.
+ http://.../query?q=my_query&shard.keys=customerB!
+
+ Collections that do not specify numShards at collection creation time
+ use custom sharding and default to the "implicit" router. Document updates
+ received by a shard will be indexed to that shard, unless a "_shard_" parameter
+ or document field names a different shard.
+ (Michael Garski, Dan Rosher, yonik)
+
Optimizations
----------------------
@@ -174,18 +534,40 @@ Optimizations
dynamicField's (steffkes)
* SOLR-3941: The "commitOnLeader" part of distributed recovery can use
- openSearcher=false. (Tomas Fernandez Lobbe via Mark Miller)
+ openSearcher=false. (Tomás Fernández Löbbe via Mark Miller)
* SOLR-4063: Allow CoreContainer to load multiple SolrCores in parallel rather
than just serially. (Mark Miller)
-* SOLR-4199: When doing zk retries due to connectionloss, rather than just
+* SOLR-4199: When doing zk retries due to connection loss, rather than just
retrying for 2 minutes, retry in proportion to the session timeout.
(Mark Miller)
+* SOLR-4262: Replication Icon on Dashboard does not reflect Master-/Slave-
+ State (steffkes)
+
+* SOLR-4264: Missing Error-Screen on UI's Cloud-Page (steffkes)
+
+* SOLR-4261: Percentage Infos on Dashboard have a fixed width (steffkes)
+
+* SOLR-3851: create a new core/delete an existing core should also update
+ the main/left list of cores on the admin UI (steffkes)
+
+* SOLR-3840: XML query response display is unreadable in Solr Admin Query UI
+ (steffkes)
+
+* SOLR-3982: Admin UI: Various Dataimport Improvements (steffkes)
+
+* SOLR-4296: Admin UI: Improve Dataimport Auto-Refresh (steffkes)
+
+* SOLR-3458: Allow multiple Items to stay open on Plugins-Page (steffkes)
+
Bug Fixes
----------------------
+* SOLR-4288: Improve logging for FileDataSource (basePath, relative
+ resources). (Dawid Weiss)
+
* SOLR-4007: Morfologik dictionaries not available in Solr field type
due to class loader lookup problems. (Lance Norskog, Dawid Weiss)
@@ -276,7 +658,7 @@ Bug Fixes
* SOLR-4064: When there is an unexpected exception while trying to run the new
leader process, the SolrCore will not correctly rejoin the election.
- (Po Rui Via Mark Miller)
+ (Po Rui via Mark Miller)
* SOLR-3989: SolrZkClient constructor dropped exception cause when throwing
a new RuntimeException. (Colin Bartolome, yonik)
@@ -295,7 +677,7 @@ Bug Fixes
* SOLR-4081: QueryParsing.toString, used during debugQuery=true, did not
correctly handle ExtendedQueries such as WrappedQuery
- (used when cache=false), spatial queries, and frange queires.
+ (used when cache=false), spatial queries, and frange queries.
(Eirik Lygre, yonik)
* SOLR-3959: Ensure the internal comma separator of poly fields is escaped
@@ -336,7 +718,7 @@ Bug Fixes
* SOLR-4162: ZkCli usage examples are not correct because the zkhost parameter
is not present and it is mandatory for all commands.
- (Tomas Fernandez Lobbe via Mark Miller)
+ (Tomás Fernández Löbbe via Mark Miller)
* SOLR-4071: Validate that name is pass to Collections API create, and behave the
same way as on startup when collection.configName is not explicitly passed.
@@ -378,9 +760,87 @@ Bug Fixes
* SOLR-3972: Fix ShowFileRequestHandler to not log a warning in the
(expected) situation of a file not found. (hossman)
+* SOLR-4133: Cannot "set" field to null with partial updates when using the
+ standard RequestWriter. (Will Butler, shalin)
+
+* SOLR-4223: "maxFormContentSize" in jetty.xml is not picked up by jetty 8
+ so set it via solr webapp context file. (shalin)
+
+* SOLR-4175:SearchComponent chain can't contain two components of the
+ same class and use debugQuery. (Tomás Fernández Löbbe via ehatcher)
+
+* SOLR-4244: When coming back from session expiration we should not wait for
+ the leader to see us in the down state if we are the node that must become
+ the leader. (Mark Miller)
+
+* SOLR-4245: When a core is registering with ZooKeeper, the timeout to find the
+ leader in the cluster state is 30 seconds rather than leaderVoteWait + extra
+ time. (Mark Miller)
+
+* SOLR-4238: Fix jetty example requestLog config (jm via hossman)
+
+* SOLR-4251: Fix SynonymFilterFactory when an optional tokenizerFactory is supplied.
+ (Chris Bleakley via rmuir)
+
+* SOLR-4253: Misleading resource loading warning from Carrot2 clustering
+ component fixed (StanisÅaw OsiÅski)
+
+* SOLR-4257: PeerSync updates and Log Replay updates should not wait for
+ a ZooKeeper connection in order to proceed. (yonik)
+
+* SOLR-4045: SOLR admin page returns HTTP 404 on core names containing
+ a '.' (dot) (steffkes)
+
+* SOLR-4176: analysis ui: javascript not properly handling URL decoding
+ of input (steffkes)
+
+* SOLR-4079: Long core names break web gui appearance and functionality
+ (steffkes)
+
+* SOLR-4263: Incorrect Link from Schema-Browser to Query From for Top-Terms
+ (steffkes)
+
+* SOLR-3829: Admin UI Logging events broken if schema.xml defines a catch-all
+ dynamicField with type ignored (steffkes)
+
+* SOLR-4275: Fix TrieTokenizer to no longer throw StringIndexOutOfBoundsException
+ in admin UI / AnalysisRequestHandler when you enter no number to tokenize.
+ (Uwe Schindler)
+
+* SOLR-4279: Wrong exception message if _version_ field is multivalued (shalin)
+
+* SOLR-4170: The 'backup' ReplicationHandler command can sometimes use a stale
+ index directory rather than the current one. (Mark Miller, Marcin Rzewucki)
+
+* SOLR-3876: Solr Admin UI is completely dysfunctional on IE 9 (steffkes)
+
+* SOLR-4112: Fixed DataImportHandler ZKAwarePropertiesWriter implementation so
+ import works fine with SolrCloud clusters (Deniz Durmus, James Dyer,
+ Erick Erickson, shalin)
+
+* SOLR-4291: Harden the Overseer work queue thread loop. (Mark Miller)
+
+* SOLR-3820: Solr Admin Query form is missing some edismax request parameters
+ (steffkes)
+
+* SOLR-4217: post.jar no longer ignores -Dparams when -Durl is used.
+ (Alexandre Rafalovitch, ehatcher)
+
+* SOLR-4303: On replication, if the generation of the master is lower than the
+ slave we need to force a full copy of the index. (Mark Miller, Gregg Donovan)
+
+* SOLR-4266: HttpSolrServer does not release connection properly on exception
+ when no response parser is used. (Steve Molloy via Mark Miller)
+
+* SOLR-2298: Updated JavaDoc for SolrDocument.addField and SolrInputDocument.addField
+ to have more information on name and value parameters. (Siva Natarajan)
+
Other Changes
----------------------
+* SOLR-4106: Javac/ ivy path warnings with morfologik fixed by
+ upgrading to Morfologik 1.5.5 (Robert Muir, Dawid Weiss)
+
* SOLR-3899: SolrCore should not log at warning level when the index directory
changes - it's an info event. (Tobias Bergman, Mark Miller)
@@ -438,6 +898,33 @@ Other Changes
* SOLR-4163: README improvements (Shawn Heisey via hossman)
+* SOLR-4248: "ant eclipse" should declare .svn directories as derived.
+ (Shawn Heisey via Mark Miller)
+
+* SOLR-3279: Upgrade Carrot2 to 3.6.2 (StanisÅaw OsiÅski)
+
+* SOLR-4254: Harden the 'leader requests replica to recover' code path.
+ (Mark Miller, yonik)
+
+* SOLR-4226: Extract fl parsing code out of ReturnFields constructor.
+ (Ryan Ernst via Robert Muir)
+
+* SOLR-4208: ExtendedDismaxQParserPlugin has been refactored to make
+ subclassing easier. (Tomás Fernández Löbbe, hossman)
+
+* SOLR-3735: Relocate the example mime-to-extension mapping, and
+ upgrade Velocity Engine to 1.7 (ehatcher)
+
+* SOLR-4287: Removed "apache-" prefix from Solr distribution and artifact
+ filenames. (Ryan Ernst, Robert Muir, Steve Rowe)
+
+* SOLR-4016: Deduplication does not work with atomic/partial updates so
+ disallow atomic update requests which change signature generating fields.
+ (Joel Nothman, yonik, shalin)
+
+* SOLR-4308: Remove the problematic and now unnecessary log4j-over-slf4j.
+ (Mark Miller)
+
================== 4.0.0 ==================
Versions of Major Components
@@ -649,7 +1136,7 @@ Bug Fixes
or SolrIndexWriter initialization. (hossman)
* SOLR-3518: Include final 'hits' in log information when aggregating a
- distibuted request (Markus Jelsma via hossman)
+ distributed request (Markus Jelsma via hossman)
* SOLR-3628: SolrInputField and SolrInputDocument are now consistently backed
by Collections passed in to setValue/setField, and defensively copy values
@@ -720,7 +1207,7 @@ Bug Fixes
* SOLR-3527: SolrCmdDistributor drops some of the important commit attributes
(maxOptimizeSegments, softCommit, expungeDeletes) when sending a commit to
- replicas. (Andy Laird, Tomas Fernandez Lobbe, Mark Miller)
+ replicas. (Andy Laird, Tomás Fernández Löbbe, Mark Miller)
* SOLR-3844: SolrCore reload can fail because it tries to remove the index
write lock while already holding it. (Mark Miller)
@@ -742,7 +1229,7 @@ Bug Fixes
(James Dyer)
* SOLR-3087: Fixed DOMUtil so that code doing attribute validation will
- automaticly ignore nodes in the resserved "xml" prefix - in particular this
+ automatically ignore nodes in the reserved "xml" prefix - in particular this
fixes some bugs related to xinclude and fieldTypes.
(Amit Nithian, hossman)
@@ -773,7 +1260,7 @@ Bug Fixes
Other Changes
----------------------
-* SOLR-3690: Fixed binary release packages to include dependencie needed for
+* SOLR-3690: Fixed binary release packages to include dependencies needed for
the solr-test-framework (hossman)
* SOLR-2857: The /update/json and /update/csv URLs were restored to aid
@@ -804,7 +1291,7 @@ Other Changes
replicas before running the leader process - or if they all do not come up,
N amount of time. (Jan Høydahl, Per Steffensen, Mark Miller)
-* SOLR-3750: Optionaly, on session expiration, we can explicitly wait some time before
+* SOLR-3750: Optionally, on session expiration, we can explicitly wait some time before
running the leader sync process so that we are sure every node participates.
(Per Steffensen, Mark Miller)
@@ -988,7 +1475,7 @@ Bug Fixes
For the example configuration, this means /browse now works with SolrCloud.
(janhoy, ehatcher)
-* SOLR-3677: Fixed missleading error message in web ui to distinguish between
+* SOLR-3677: Fixed misleading error message in web ui to distinguish between
no SolrCores loaded vs. no /admin/ handler available.
(hossman, steffkes)
@@ -1131,7 +1618,7 @@ New Features
* SOLR-571: The autowarmCount for LRUCaches (LRUCache and FastLRUCache) now
supports "percentages" which get evaluated relative the current size of
the cache when warming happens.
- (Tomas Fernandez Lobbe and hossman)
+ (Tomás Fernández Löbbe and hossman)
* SOLR-1932: New relevancy function queries: termfreq, tf, docfreq, idf
norm, maxdoc, numdocs. (yonik)
@@ -1206,7 +1693,7 @@ New Features
* SOLR-1298: Return FunctionQuery as pseudo field. The solr 'fl' param
now supports functions. For example: fl=id,sum(x,y) -- NOTE: only
- functions with fast random access are reccomended. (yonik, ryan)
+ functions with fast random access are recommended. (yonik, ryan)
* SOLR-705: Optionally return shard info with each document in distributed
search. Use fl=id,[shard] to return the shard url. (ryan)
@@ -1316,7 +1803,7 @@ New Features
chain. Serialization format is pluggable, and defaults to JSON. (ab)
* SOLR-3363: Consolidated Exceptions in Analysis Factories so they only throw
- InitalizationExceptions (Chris Male)
+ InitializationExceptions (Chris Male)
* SOLR-2690: New support for a "TZ" request param which overrides the TimeZone
used when rounding Dates in DateMath expressions for the entire request
@@ -1502,15 +1989,15 @@ Bug Fixes
down to it via acceptDocs since LUCENE-1536. (Mike Hugo, yonik)
* SOLR-3214: If you use multiple fl entries rather than a comma separated list, all but the first
- entry can be ignored if you are using distributed search. (Tomas Fernandez Lobbe via Mark Miller)
+ entry can be ignored if you are using distributed search. (Tomás Fernández Löbbe via Mark Miller)
* SOLR-3352: eDismax: pf2 should kick in for a query with 2 terms (janhoy)
* SOLR-3361: ReplicationHandler "maxNumberOfBackups" doesn't work if backups are triggered on commit
- (James Dyer, Tomas Fernandez Lobbe)
+ (James Dyer, Tomás Fernández Löbbe)
* SOLR-2605: fixed tracking of the 'defaultCoreName' in CoreContainer so that
- CoreAdminHandler could return consistent information regardless of wether
+ CoreAdminHandler could return consistent information regardless of whether
there is a a default core name or not. (steffkes, hossman)
* SOLR-3370: fixed CSVResponseWriter to respect globs in the 'fl' param
@@ -1540,7 +2027,7 @@ Bug Fixes
* SOLR-3522: fixed parsing of the 'literal()' function (hossman)
-* SOLR-3548: Fixed a bug in the cachability of queries using the {!join}
+* SOLR-3548: Fixed a bug in the cachability of queries using the {!join}
parser or the strdist() function, as well as some minor improvements to
the hashCode implementation of {!bbox} and {!geofilt} queries.
(hossman)
@@ -1555,6 +2042,8 @@ Bug Fixes
* SOLR-1958: When using the MailEntityProcessor, import would fail if
fetchMailsSince was not specified. (Max Lynch via James Dyer)
+* SOLR-4289: Admin UI - JVM memory bar - dark grey "used" width is too small
+ (steffkes, elyograg)
Other Changes
----------------------
@@ -1574,7 +2063,7 @@ Other Changes
more spread out (Erick Erickson via hossman)
* SOLR-2288: Small tweaks to eliminate compiler warnings. primarily
- using Generics where applicable in method/object declatations, and
+ using Generics where applicable in method/object declarations, and
adding @SuppressWarnings("unchecked") when appropriate (hossman)
* SOLR-2375: Suggester Lookup implementations now store trie data
@@ -1647,7 +2136,7 @@ Other Changes
(ehatcher)
* SOLR-3032: logOnce from SolrException logOnce and all the supporting
- structure is gone. abortOnConfugrationError is also gone as it is no longer referenced.
+ structure is gone. abortOnConfigurationError is also gone as it is no longer referenced.
Errors should be caught and logged at the top-most level or logged and NOT propagated up the
chain. (Erick Erickson)
@@ -1720,7 +2209,17 @@ Documentation
* SOLR-2232: Improved README info on solr.solr.home in examples
(Eric Pugh and hossman)
-
+
+================== 3.6.2 ==================
+
+Bug Fixes
+----------------------
+* SOLR-3790: ConcurrentModificationException could be thrown when using hl.fl=*.
+ (yonik, koji)
+
+* SOLR-3589: Edismax parser does not honor mm parameter if analyzer splits a token.
+ (Tom Burton-West, Robert Muir)
+
================== 3.6.1 ==================
More information about this release, including any errata related to the
release notes, upgrade instructions, or other changes may be found online at:
@@ -1733,7 +2232,7 @@ Bug Fixes
(Uwe Schindler, Mike McCandless, Robert Muir)
* SOLR-3361: ReplicationHandler "maxNumberOfBackups" doesn't work if backups are triggered on commit
- (James Dyer, Tomas Fernandez Lobbe)
+ (James Dyer, Tomás Fernández Löbbe)
* SOLR-3375: Fix charset problems with HttpSolrServer (Roger HÃ¥kansson, yonik, siren)
Modified: lucene/dev/branches/lucene4258/solr/NOTICE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/NOTICE.txt?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/NOTICE.txt (original)
+++ lucene/dev/branches/lucene4258/solr/NOTICE.txt Sun Mar 10 15:04:57 2013
@@ -1,6 +1,6 @@
==============================================================
Apache Solr
- Copyright 2006-2012 The Apache Software Foundation
+ Copyright 2006-2013 The Apache Software Foundation
==============================================================
This product includes software developed by
@@ -41,7 +41,7 @@ License: http://hsqldb.org/web/hsqlLicen
=========================================================================
Apache Lucene
-Copyright 2012 The Apache Software Foundation
+Copyright 2013 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
@@ -503,3 +503,15 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTI
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+=========================================================================
+== Restlet Notice ==
+=========================================================================
+
+Copyright (C) 2005-2013 Restlet S.A.S.
+
+Restlet is a registered trademark of Restlet S.A.S.
+
+This product contains software developed by the Restlet project.
+
+See http://www.restlet.org/
Modified: lucene/dev/branches/lucene4258/solr/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/README.txt?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/README.txt (original)
+++ lucene/dev/branches/lucene4258/solr/README.txt Sun Mar 10 15:04:57 2013
@@ -45,11 +45,11 @@ example/
Please see example/README.txt for information about running this
example.
-dist/apache-solr-XX.war
+dist/solr-XX.war
The Apache Solr Application. Deploy this WAR file to any servlet
container to run Apache Solr.
-dist/apache-solr-<component>-XX.jar
+dist/solr-<component>-XX.jar
The Apache Solr libraries. To compile Apache Solr Plugins,
one or more of these will be required. The core library is
required at a minimum. (see http://wiki.apache.org/solr/SolrPlugins
Modified: lucene/dev/branches/lucene4258/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/build.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/build.xml (original)
+++ lucene/dev/branches/lucene4258/solr/build.xml Sun Mar 10 15:04:57 2013
@@ -126,9 +126,11 @@
<!-- ========================================================================= -->
<!-- ========================== BUILD/TEST TASKS ============================= -->
<!-- ========================================================================= -->
-
+
+ <!-- solr/test-framework is excluded from compilation -->
<target name="compile" description="Compile the source code."
depends="compile-core, compile-contrib"/>
+
<target name="test" description="Validate, then run core, solrj, and contrib unit tests."
depends="test-core, test-contrib"/>
<!-- "-clover.load" is *not* a useless dependency. do not remove -->
@@ -136,7 +138,7 @@
depends="-clover.load, test-solr-core, test-solrj"/>
<target name="pitest" description="Validate, then run core, solrj, and contrib unit tests."
depends="pitest-core, pitest-contrib"/>
- <target name="compile-test" description="Compile unit tests."
+ <target name="compile-test" description="Compile core, solrj, and contrib unit tests, and solr-test-framework."
depends="compile-solr-test-framework, compile-test-solr-core, compile-test-solrj, compile-test-contrib"/>
<target name="javadocs" description="Calls javadocs-all, javadocs-solrj, and javadocs-test-framework"
depends="define-lucene-javadoc-url,javadocs-solr-core,javadocs-solrj,javadocs-test-framework,javadocs-contrib"/>
@@ -173,12 +175,21 @@
</copy>
</target>
+ <target name="jar" depends="jar-core,jar-solrj,jar-solr-test-framework,jar-contrib"
+ description="Jar solr core, solrj, solr-test-framework, and all contribs"/>
+
<!-- Solr core targets -->
<target name="test-solr-core" description="Test solr core">
<ant dir="core" target="test" inheritAll="false">
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
+
+ <target name="jar-core">
+ <ant dir="${common-solr.dir}/core" target="jar-core" inheritAll="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ </target>
<!-- Solrj targets -->
<target name="test-solrj" description="Test java client">
@@ -236,27 +247,39 @@
</license-check-macro>
</target>
- <target name="check-forbidden-apis" depends="compile-tools,compile-test,load-custom-tasks,-check-forbidden-java-apis,-check-forbidden-test-apis"
+ <target name="check-forbidden-apis" depends="compile-tools,compile-test,install-forbidden-apis,-forbidden-apis-classpath,-check-forbidden-java-apis,-check-forbidden-test-apis"
description="Check forbidden API calls in compiled class files."/>
+ <!-- TODO: Make the forbidden API checks per module! Also remove failOnMissingClasses="false" below!!! -->
+ <target name="-forbidden-apis-classpath">
+ <path id="forbidden-apis.classpath">
+ <fileset dir="${basedir}" includes="**/lib/*.jar"/>
+ <dirset dir="${basedir}/build" includes="**/classes/*"/>
+ <path refid="solr.lucene.libs"/>
+ <path refid="classpath"/>
+ <path refid="test.classpath"/>
+ </path>
+ </target>
+
<target name="-check-forbidden-java-apis">
- <forbidden-apis>
- <classpath refid="additional.dependencies"/>
- <apiFileSet dir="${custom-tasks.dir}/forbiddenApis">
- <include name="jdk.txt" />
- <include name="jdk-deprecated.txt" />
- <include name="commons-io.txt" />
+ <forbidden-apis internalRuntimeForbidden="true" classpathref="forbidden-apis.classpath" failOnMissingClasses="false">
+ <bundledSignatures name="jdk-unsafe-${javac.target}"/>
+ <bundledSignatures name="jdk-deprecated-${javac.target}"/>
+ <bundledSignatures name="commons-io-unsafe-${commons-io.version}"/>
+ <signaturesFileSet dir="${common.dir}/tools/forbiddenApis">
<include name="executors.txt" />
- </apiFileSet>
+ <include name="servlet-api.txt" />
+ </signaturesFileSet>
<fileset dir="${basedir}/build">
<include name="**/*.class" />
+ <!-- violates the servlet-api restrictions, but it is safe to do so in this test: -->
+ <exclude name="solr-solrj/classes/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest$DebugServlet.class"/>
</fileset>
</forbidden-apis>
</target>
<target name="-check-forbidden-test-apis">
- <forbidden-apis apiFile="${custom-tasks.dir}/forbiddenApis/tests.txt">
- <classpath refid="junit-path"/>
+ <forbidden-apis signaturesFile="${common.dir}/tools/forbiddenApis/tests.txt" classpathref="forbidden-apis.classpath" failOnMissingClasses="false">
<fileset dir="${basedir}/build">
<include name="**/classes/test/**/*.class"/>
<include name="solr-test-framework/**/*.class"/>
@@ -361,7 +384,20 @@
<target name="prepare-release" depends="prepare-release-no-sign, sign-artifacts"/>
<!-- make a distribution -->
- <target name="package" depends="package-src-tgz,create-package"/>
+ <target name="package" depends="package-src-tgz,create-package,-dist-changes,-dist-keys"/>
+
+ <!-- copy changes/ to the release folder -->
+ <target name="-dist-changes">
+ <copy todir="${package.dir}/changes">
+ <fileset dir="build/docs/changes"/>
+ </copy>
+ </target>
+
+ <!-- copy KEYS to the release folder -->
+ <target name="-dist-keys">
+ <get src="http://people.apache.org/keys/group/lucene.asc"
+ dest="${package.dir}/KEYS"/>
+ </target>
<!-- Makes a tarball from running "svn export" at the root level. -->
<!-- Copies NOTICE.txt and LICENSE.txt from solr/ to the root level. -->
@@ -529,12 +565,15 @@
</sequential>
</target>
- <target name="documentation-lint" depends="-ecj-javadoc-lint,-documentation-lint,-documentation-lint-unsupported"
- description="Validates the generated documentation (HTML errors, broken links,...)"/>
-
+ <target name="documentation-lint" depends="-ecj-javadoc-lint,-documentation-lint-unsupported" if="documentation-lint.supported"
+ description="Validates the generated documentation (HTML errors, broken links,...)">
+ <!-- we use antcall here, otherwise ANT will run all dependent targets: -->
+ <antcall target="-documentation-lint"/>
+ </target>
+
<!-- TODO: does solr have any other docs we should check? -->
<!-- TODO: also integrate checkJavaDocs.py, which does more checks -->
- <target name="-documentation-lint" if="documentation-lint.supported" depends="documentation">
+ <target name="-documentation-lint" depends="documentation">
<jtidy-macro>
<!-- NOTE: must currently exclude deprecated-list due to a javadocs bug (as of 1.7.0_09)
javadocs generates invalid XML if you deprecate a method that takes a parameter
@@ -544,20 +583,11 @@
<echo message="Checking for broken links..."/>
<check-broken-links dir="${javadoc.dir}"/>
<echo message="Checking for malformed docs..."/>
- <!-- TODO: add missing package.htmls and bump this to level=package -->
- <check-missing-javadocs dir="${javadoc.dir}" level="none"/>
- <!-- prevent the modules without problems from getting worse -->
- <check-missing-javadocs dir="${javadoc.dir}/solr-analysis-extras" level="package"/>
- <check-missing-javadocs dir="${javadoc.dir}/solr-cell" level="package"/>
- <check-missing-javadocs dir="${javadoc.dir}/solr-clustering" level="package"/>
- <!-- solr-core: problems: -->
- <check-missing-javadocs dir="${javadoc.dir}/solr-dataimporthandler" level="package"/>
- <check-missing-javadocs dir="${javadoc.dir}/solr-dataimporthandler-extras" level="package"/>
- <check-missing-javadocs dir="${javadoc.dir}/solr-solrj" level="package"/>
- <check-missing-javadocs dir="${javadoc.dir}/solr-test-framework" level="package"/>
+ <!-- TODO: add missing docs for all classes and bump this to level=class -->
+ <check-missing-javadocs dir="${javadoc.dir}" level="package"/>
</target>
- <target name="-ecj-javadoc-lint" depends="documentation,compile-solr-test-framework,-ecj-resolve">
+ <target name="-ecj-javadoc-lint" depends="compile,compile-test,jar-test-framework,-ecj-resolve">
<subant target="-ecj-javadoc-lint" failonerror="true" inheritall="false">
<propertyset refid="uptodate.and.compiled.properties"/>
<fileset dir="core" includes="build.xml"/>
@@ -567,8 +597,8 @@
<contrib-crawl target="-ecj-javadoc-lint"/>
</target>
- <!-- install-maven-tasks is *not* a useless dependency. do not remove -->
- <target name="generate-maven-artifacts" depends="install-maven-tasks">
+ <!-- install-maven-tasks and define-lucene-javadoc-url are *not* a useless dependencies. Do not remove! -->
+ <target name="generate-maven-artifacts" depends="install-maven-tasks,define-lucene-javadoc-url">
<sequential>
<subant target="dist-maven" inheritall="false" >
<propertyset refid="uptodate.and.compiled.properties"/>
Modified: lucene/dev/branches/lucene4258/solr/cloud-dev/solrcloud-start.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/cloud-dev/solrcloud-start.sh?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/cloud-dev/solrcloud-start.sh (original)
+++ lucene/dev/branches/lucene4258/solr/cloud-dev/solrcloud-start.sh Sun Mar 10 15:04:57 2013
@@ -16,13 +16,16 @@ rm -f example/example.log
ant example dist
+rm -r example/solr-webapp/*
+unzip example/webapps/solr.war -d example/solr-webapp/webapp
+
cp -r -f example example2
cp -r -f example example3
cp -r -f example example4
cp -r -f example example5
cp -r -f example example6
-java -classpath lib/*:dist/*:build/lucene-libs/* org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983
+java -classpath "example/solr-webapp/webapp/WEB-INF/lib/*" org.apache.solr.cloud.ZkCLI -cmd bootstrap -zkhost 127.0.0.1:9983 -solrhome example/solr -runzk 8983
cd example
java -DzkRun -DnumShards=2 -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar 1>example.log 2>&1 &
Modified: lucene/dev/branches/lucene4258/solr/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/common-build.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/common-build.xml (original)
+++ lucene/dev/branches/lucene4258/solr/common-build.xml Sun Mar 10 15:04:57 2013
@@ -25,7 +25,7 @@
<property name="Name" value="Solr" />
<property name="version" value="5.0-SNAPSHOT"/>
- <property name="fullname" value="apache-${ant.project.name}"/>
+ <property name="fullname" value="${ant.project.name}"/>
<property name="fullnamever" value="${fullname}-${version}"/>
<property name="final.name" value="${fullnamever}"/>
@@ -68,6 +68,10 @@
where X.Y.M is the last version released (on this branch).
-->
<property name="solr.spec.version" value="5.0.0.${dateversion}" />
+
+ <!-- defined here to be able to make the forbidden-api checker correctly
+ reference it. 'ivy.xml' is also referencing this property. -->
+ <property name="commons-io.version" value="2.1" />
<path id="solr.lucene.libs">
<!-- List of jars that will be used as the foundation for both
@@ -81,6 +85,7 @@
<pathelement location="${analyzers-common.jar}"/>
<pathelement location="${analyzers-kuromoji.jar}"/>
<pathelement location="${analyzers-phonetic.jar}"/>
+ <pathelement location="${codecs.jar}"/>
<pathelement location="${highlighter.jar}"/>
<pathelement location="${memory.jar}"/>
<pathelement location="${misc.jar}"/>
@@ -114,7 +119,7 @@
<attribute name="property" default="@{name}.uptodate"/>
<attribute name="classpath.property" default="@{name}.jar"/>
<!-- set jarfile only, if the target jar file has no generic name -->
- <attribute name="jarfile" default="${common-solr.dir}/build/contrib/solr-@{name}/apache-solr-@{name}-${version}.jar"/>
+ <attribute name="jarfile" default="${common-solr.dir}/build/contrib/solr-@{name}/solr-@{name}-${version}.jar"/>
<sequential>
<!--<echo message="Checking '@{jarfile}' against source folder '${common.dir}/contrib/@{name}/src/java'"/>-->
<property name="@{classpath.property}" location="@{jarfile}"/>
@@ -135,7 +140,7 @@
</target>
<target name="prep-lucene-jars"
- depends="jar-lucene-core, jar-analyzers-phonetic, jar-analyzers-kuromoji, jar-suggest, jar-highlighter, jar-memory,
+ depends="jar-lucene-core, jar-analyzers-phonetic, jar-analyzers-kuromoji, jar-codecs, jar-suggest, jar-highlighter, jar-memory,
jar-misc, jar-spatial, jar-grouping, jar-queries, jar-queryparser">
<property name="solr.deps.compiled" value="true"/>
</target>
@@ -179,7 +184,7 @@
</jarify>
</sequential>
</macrodef>
-
+
<target name="jar-core" depends="compile-core">
<solr-jarify/>
</target>
@@ -194,7 +199,7 @@
<property name="lucenedocs" location="${common.dir}/build/docs"/>
<!-- dependency to ensure all lucene javadocs are present -->
- <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial,javadocs-test-framework"/>
+ <target name="lucene-javadocs" depends="javadocs-lucene-core,javadocs-analyzers-common,javadocs-analyzers-icu,javadocs-analyzers-kuromoji,javadocs-analyzers-phonetic,javadocs-analyzers-smartcn,javadocs-analyzers-morfologik,javadocs-analyzers-stempel,javadocs-analyzers-uima,javadocs-codecs,javadocs-suggest,javadocs-grouping,javadocs-queries,javadocs-queryparser,javadocs-highlighter,javadocs-memory,javadocs-misc,javadocs-spatial,javadocs-test-framework"/>
<!-- create javadocs for the current module -->
<target name="javadocs" depends="compile-core,define-lucene-javadoc-url,lucene-javadocs,javadocs-solr-core">
@@ -214,13 +219,13 @@
</target>
<target name="check-solr-core-javadocs-uptodate" unless="solr-core-javadocs.uptodate">
- <uptodate property="solr-core-javadocs.uptodate" targetfile="${build.dir}/solr-core/apache-solr-core-${version}-javadoc.jar">
+ <uptodate property="solr-core-javadocs.uptodate" targetfile="${build.dir}/solr-core/solr-core-${version}-javadoc.jar">
<srcfiles dir="${common-solr.dir}/core/src/java" includes="**/*.java"/>
</uptodate>
</target>
<target name="check-solrj-javadocs-uptodate" unless="solrj-javadocs.uptodate">
- <uptodate property="solrj-javadocs.uptodate" targetfile="${build.dir}/solr-solrj/apache-solr-solrj-${version}-javadoc.jar">
+ <uptodate property="solrj-javadocs.uptodate" targetfile="${build.dir}/solr-solrj/solr-solrj-${version}-javadoc.jar">
<srcfiles dir="${common-solr.dir}/solrj/src/java" includes="**/*.java"/>
</uptodate>
</target>
@@ -260,6 +265,7 @@
<link offline="true" href="${lucene.javadoc.url}analyzers-smartcn" packagelistloc="${lucenedocs}/analyzers-smartcn"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-stempel" packagelistloc="${lucenedocs}/analyzers-stempel"/>
<link offline="true" href="${lucene.javadoc.url}analyzers-uima" packagelistloc="${lucenedocs}/analyzers-uima"/>
+ <link offline="true" href="${lucene.javadoc.url}codecs" packagelistloc="${lucenedocs}/codecs"/>
<link offline="true" href="${lucene.javadoc.url}suggest" packagelistloc="${lucenedocs}/suggest"/>
<link offline="true" href="${lucene.javadoc.url}grouping" packagelistloc="${lucenedocs}/grouping"/>
<link offline="true" href="${lucene.javadoc.url}queries" packagelistloc="${lucenedocs}/queries"/>
@@ -306,18 +312,8 @@
<target name="dist-maven-src-java"
depends="filter-pom-templates, install-maven-tasks, m2-deploy-solr-parent-pom, dist-maven-common-src-java"/>
- <target name="-validate-maven-dependencies">
- <property name="top.level.dir" location="${common.dir}/.."/>
- <pathconvert property="pom.xml">
- <mapper>
- <chainedmapper>
- <globmapper from="${top.level.dir}*" to="${filtered.pom.templates.dir}*"/>
- <globmapper from="*build.xml" to="*pom.xml"/>
- </chainedmapper>
- </mapper>
- <path location="${ant.file}"/>
- </pathconvert>
- <m2-validate-dependencies pom.xml="${pom.xml}" licenseDirectory="${license.dir}">
+ <target name="-validate-maven-dependencies" depends="-validate-maven-dependencies.init">
+ <m2-validate-dependencies pom.xml="${maven.pom.xml}" licenseDirectory="${license.dir}">
<additional-filters>
<replaceregex pattern="jetty([^/]+)$" replace="jetty" flags="gi" />
<replaceregex pattern="slf4j-([^/]+)$" replace="slf4j" flags="gi" />
@@ -325,8 +321,8 @@
</additional-filters>
<excludes>
<rsel:or>
- <rsel:name name="**/lucene-*.jar" handledirsep="true"/>
- <rsel:name name="**/solr-*.jar" handledirsep="true"/>
+ <rsel:name name="**/lucene-*-${maven.version.glob}.jar" handledirsep="true"/>
+ <rsel:name name="**/solr-*-${maven.version.glob}.jar" handledirsep="true"/>
<!-- TODO: figure out what is going on here with servlet-apis -->
<rsel:name name="**/*servlet*.jar" handledirsep="true"/>
</rsel:or>
@@ -373,6 +369,11 @@
<propertyset refid="uptodate.and.compiled.properties"/>
</ant>
</target>
+ <target name="jar-solrj" description="Jar Solr-J">
+ <ant dir="${common-solr.dir}/solrj" target="jar-core" inheritAll="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ </target>
<!-- TODO: really a copy should work: but sync is currently safer
since some buggy tests don't create their own tempdir but
@@ -392,6 +393,12 @@
<property name="solr.test.framework.compiled" value="true"/>
</target>
+ <target name="jar-solr-test-framework" depends="compile-solr-test-framework">
+ <ant dir="${common-solr.dir}/test-framework" target="jar-core" inheritAll="false">
+ <propertyset refid="uptodate.and.compiled.properties"/>
+ </ant>
+ </target>
+
<!-- resolve dependencies in the example (relied upon by compile/tests) -->
<target name="resolve-example" unless="example.libs.uptodate">
<ant dir="${common-solr.dir}/example" target="resolve" inheritAll="false">
@@ -427,6 +434,10 @@
<contrib-crawl target="javadocs"/>
</target>
+ <target name="jar-contrib" description="Jar contrib modules">
+ <contrib-crawl target="jar-core"/>
+ </target>
+
<target name="contribs-add-to-war">
<mkdir dir="${dest}/web"/>
<delete dir="${dest}/web" includes="**/*" failonerror="false"/>
Modified: lucene/dev/branches/lucene4258/solr/contrib/analysis-extras/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/analysis-extras/ivy.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/analysis-extras/ivy.xml (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/analysis-extras/ivy.xml Sun Mar 10 15:04:57 2013
@@ -20,9 +20,9 @@
<info organisation="org.apache.solr" module="analysis-extras"/>
<dependencies>
<dependency org="com.ibm.icu" name="icu4j" rev="49.1" transitive="false"/>
- <dependency org="org.carrot2" name="morfologik-polish" rev="1.5.3" transitive="false"/>
- <dependency org="org.carrot2" name="morfologik-fsa" rev="1.5.3" transitive="false"/>
- <dependency org="org.carrot2" name="morfologik-stemming" rev="1.5.3" transitive="false"/>
+ <dependency org="org.carrot2" name="morfologik-polish" rev="1.5.5" transitive="false"/>
+ <dependency org="org.carrot2" name="morfologik-fsa" rev="1.5.5" transitive="false"/>
+ <dependency org="org.carrot2" name="morfologik-stemming" rev="1.5.5" transitive="false"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>
Modified: lucene/dev/branches/lucene4258/solr/contrib/clustering/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/clustering/ivy.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/clustering/ivy.xml (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/clustering/ivy.xml Sun Mar 10 15:04:57 2013
@@ -19,13 +19,14 @@
<ivy-module version="2.0">
<info organisation="org.apache.solr" module="clustering"/>
<dependencies>
- <dependency org="org.carrot2" name="carrot2-core" rev="3.5.0" transitive="false"/>
- <dependency org="com.carrotsearch" name="hppc" rev="0.3.3" transitive="false"/>
+ <dependency org="org.carrot2" name="carrot2-mini" rev="3.6.2" transitive="false"/>
+ <dependency org="org.carrot2.attributes" name="attributes-binder" rev="1.0.1" transitive="false"/>
+ <dependency org="com.carrotsearch" name="hppc" rev="0.4.1" transitive="false"/>
<dependency org="org.codehaus.jackson" name="jackson-core-asl" rev="1.7.4" transitive="false"/>
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="1.7.4" transitive="false"/>
- <dependency org="org.apache.mahout" name="mahout-collections" rev="0.3" transitive="false"/>
- <dependency org="org.apache.mahout" name="mahout-math" rev="0.3" transitive="false"/>
- <dependency org="org.simpleframework" name="simple-xml" rev="2.4.1" transitive="false"/>
+ <dependency org="org.apache.mahout" name="mahout-collections" rev="1.0" transitive="false"/>
+ <dependency org="org.apache.mahout" name="mahout-math" rev="0.6" transitive="false"/>
+ <dependency org="org.simpleframework" name="simple-xml" rev="2.6.4" transitive="false"/>
<exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
</dependencies>
</ivy-module>
Modified: lucene/dev/branches/lucene4258/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java Sun Mar 10 15:04:57 2013
@@ -132,13 +132,10 @@ public class CarrotClusteringEngine exte
try {
resourceStream = resourceLoader.openResource(resourceName);
asBytes = IOUtils.toByteArray(resourceStream);
- } catch (RuntimeException e) {
+ } catch (IOException e) {
log.debug("Resource not found in Solr's config: " + resourceName
+ ". Using the default " + resource + " from Carrot JAR.");
return new IResource[] {};
- } catch (IOException e) {
- log.warn("Could not read Solr resource " + resourceName);
- return new IResource[] {};
} finally {
if (resourceStream != null) Closeables.closeQuietly(resourceStream);
}
Modified: lucene/dev/branches/lucene4258/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java Sun Mar 10 15:04:57 2013
@@ -116,7 +116,7 @@ public class CarrotClusteringEngineTest
@Test
public void testCarrotStc() throws Exception {
- checkEngine(getClusteringEngine("stc"), 1);
+ checkEngine(getClusteringEngine("stc"), 2);
}
@Test
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java Sun Mar 10 15:04:57 2013
@@ -25,6 +25,7 @@ import org.apache.solr.common.params.Sol
import org.apache.solr.common.params.UpdateParams;
import org.apache.solr.common.util.ContentStreamBase;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.common.util.ContentStream;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.util.SystemIdResolver;
@@ -247,7 +248,7 @@ public class DataImportHandler extends R
return super.getStatistics();
DocBuilder.Statistics cumulative = importer.cumulativeStatistics;
- NamedList result = new NamedList();
+ SimpleOrderedMap result = new SimpleOrderedMap();
result.add("Status", importer.getStatus().toString());
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java Sun Mar 10 15:04:57 2013
@@ -7,9 +7,11 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import java.util.Set;
import java.util.TimeZone;
import java.util.WeakHashMap;
@@ -52,13 +54,16 @@ public class DateFormatEvaluator extends
public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
Map<DateFormatCacheKey, SimpleDateFormat> cache = new WeakHashMap<DateFormatCacheKey, SimpleDateFormat>();
Map<String, Locale> availableLocales = new HashMap<String, Locale>();
+ Set<String> availableTimezones = new HashSet<String>();
class DateFormatCacheKey {
- DateFormatCacheKey(Locale l, String df) {
+ DateFormatCacheKey(Locale l, TimeZone tz, String df) {
this.locale = l;
+ this.timezone = tz;
this.dateFormat = df;
}
Locale locale;
+ TimeZone timezone;
String dateFormat;
}
@@ -66,12 +71,16 @@ public class DateFormatEvaluator extends
for (Locale locale : Locale.getAvailableLocales()) {
availableLocales.put(locale.toString(), locale);
}
+ for (String tz : TimeZone.getAvailableIDs()) {
+ availableTimezones.add(tz);
+ }
}
- private SimpleDateFormat getDateFormat(String pattern, Locale locale) {
- DateFormatCacheKey dfck = new DateFormatCacheKey(locale, pattern);
+ private SimpleDateFormat getDateFormat(String pattern, TimeZone timezone, Locale locale) {
+ DateFormatCacheKey dfck = new DateFormatCacheKey(locale, timezone, pattern);
SimpleDateFormat sdf = cache.get(dfck);
if(sdf == null) {
sdf = new SimpleDateFormat(pattern, locale);
+ sdf.setTimeZone(timezone);
cache.put(dfck, sdf);
}
return sdf;
@@ -81,8 +90,8 @@ public class DateFormatEvaluator extends
@Override
public String evaluate(String expression, Context context) {
List<Object> l = parseParams(expression, context.getVariableResolver());
- if (l.size() < 2 || l.size() > 3) {
- throw new DataImportHandlerException(SEVERE, "'formatDate()' must have two or three parameters ");
+ if (l.size() < 2 || l.size() > 4) {
+ throw new DataImportHandlerException(SEVERE, "'formatDate()' must have two, three or four parameters ");
}
Object o = l.get(0);
Object format = l.get(1);
@@ -92,7 +101,7 @@ public class DateFormatEvaluator extends
format = o.toString();
}
Locale locale = Locale.ROOT;
- if(l.size()==3) {
+ if(l.size()>2) {
Object localeObj = l.get(2);
String localeStr = null;
if (localeObj instanceof VariableWrapper) {
@@ -104,9 +113,24 @@ public class DateFormatEvaluator extends
if(locale==null) {
throw new DataImportHandlerException(SEVERE, "Unsupported locale: " + localeStr);
}
- }
+ }
+ TimeZone tz = TimeZone.getDefault();
+ if(l.size()==4) {
+ Object tzObj = l.get(3);
+ String tzStr = null;
+ if (tzObj instanceof VariableWrapper) {
+ tzStr = ((VariableWrapper) tzObj).resolve().toString();
+ } else {
+ tzStr = tzObj.toString();
+ }
+ if(availableTimezones.contains(tzStr)) {
+ tz = TimeZone.getTimeZone(tzStr);
+ } else {
+ throw new DataImportHandlerException(SEVERE, "Unsupported Timezone: " + tzStr);
+ }
+ }
String dateFmt = format.toString();
- SimpleDateFormat fmt = getDateFormat(dateFmt, locale);
+ SimpleDateFormat fmt = getDateFormat(dateFmt, tz, locale);
Date date = null;
if (o instanceof VariableWrapper) {
VariableWrapper variableWrapper = (VariableWrapper) o;
@@ -116,7 +140,7 @@ public class DateFormatEvaluator extends
} else {
String s = variableval.toString();
try {
- date = getDateFormat(DEFAULT_DATE_FORMAT, locale).parse(s);
+ date = getDateFormat(DEFAULT_DATE_FORMAT, tz, locale).parse(s);
} catch (ParseException exp) {
wrapAndThrow(SEVERE, exp, "Invalid expression for date");
}
@@ -125,15 +149,15 @@ public class DateFormatEvaluator extends
String datemathfmt = o.toString();
datemathfmt = datemathfmt.replaceAll("NOW", "");
try {
- date = getDateMathParser(locale).parseMath(datemathfmt);
+ date = getDateMathParser(locale, tz).parseMath(datemathfmt);
} catch (ParseException e) {
wrapAndThrow(SEVERE, e, "Invalid expression for date");
}
}
return fmt.format(date);
}
- static DateMathParser getDateMathParser(Locale l) {
- return new DateMathParser(TimeZone.getDefault(), l) {
+ static DateMathParser getDateMathParser(Locale l, TimeZone tz) {
+ return new DateMathParser(tz, l) {
@Override
public Date getNow() {
return new Date();
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileDataSource.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileDataSource.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileDataSource.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileDataSource.java Sun Mar 10 15:04:57 2013
@@ -92,22 +92,35 @@ public class FileDataSource extends Data
static File getFile(String basePath, String query) {
try {
- File file0 = new File(query);
- File file = file0;
+ File file = new File(query);
- if (!file.isAbsolute())
- file = new File(basePath + query);
+ // If it's not an absolute path, try relative from basePath.
+ if (!file.isAbsolute()) {
+ // Resolve and correct basePath.
+ File basePathFile;
+ if (basePath == null) {
+ basePathFile = new File(".").getAbsoluteFile();
+ LOG.warn("FileDataSource.basePath is empty. " +
+ "Resolving to: " + basePathFile.getAbsolutePath());
+ } else {
+ basePathFile = new File(basePath);
+ if (!basePathFile.isAbsolute()) {
+ basePathFile = basePathFile.getAbsoluteFile();
+ LOG.warn("FileDataSource.basePath is not absolute. Resolving to: "
+ + basePathFile.getAbsolutePath());
+ }
+ }
+
+ file = new File(basePathFile, query).getAbsoluteFile();
+ }
if (file.isFile() && file.canRead()) {
- LOG.debug("Accessing File: " + file.toString());
+ LOG.debug("Accessing File: " + file.getAbsolutePath());
return file;
- } else if (file != file0)
- if (file0.isFile() && file0.canRead()) {
- LOG.debug("Accessing File0: " + file0.toString());
- return file0;
- }
-
- throw new FileNotFoundException("Could not find file: " + query);
+ } else {
+ throw new FileNotFoundException("Could not find file: " + query +
+ " (resolved to: " + file.getAbsolutePath());
+ }
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/FileListEntityProcessor.java Sun Mar 10 15:04:57 2013
@@ -157,7 +157,7 @@ public class FileListEntityProcessor ext
String expr = null;
expr = m.group(1).replaceAll("NOW", "");
try {
- return DateFormatEvaluator.getDateMathParser(Locale.ROOT).parseMath(expr);
+ return DateFormatEvaluator.getDateMathParser(Locale.ROOT, TimeZone.getDefault()).parseMath(expr);
} catch (ParseException exp) {
throw new DataImportHandlerException(DataImportHandlerException.SEVERE,
"Invalid expression for date", exp);
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SimplePropertiesWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SimplePropertiesWriter.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SimplePropertiesWriter.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/SimplePropertiesWriter.java Sun Mar 10 15:04:57 2013
@@ -84,12 +84,7 @@ public class SimplePropertiesWriter exte
} else {
filename = "dataimport.properties";
}
- if(params.get(DIRECTORY) != null) {
- configDir = params.get(DIRECTORY);
- } else {
- SolrCore core = dataImporter.getCore();
- configDir = (core == null ? "." : core.getResourceLoader().getConfigDir());
- }
+ findDirectory(dataImporter, params);
if(params.get(LOCALE) != null) {
String localeStr = params.get(LOCALE);
for (Locale l : Locale.getAvailableLocales()) {
@@ -109,6 +104,14 @@ public class SimplePropertiesWriter exte
} else {
dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", locale);
}
+ }
+ protected void findDirectory(DataImporter dataImporter, Map<String, String> params) {
+ if(params.get(DIRECTORY) != null) {
+ configDir = params.get(DIRECTORY);
+ } else {
+ SolrCore core = dataImporter.getCore();
+ configDir = (core == null ? "." : core.getResourceLoader().getConfigDir());
+ }
}
private File getPersistFile() {
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/XPathRecordReader.java Sun Mar 10 15:04:57 2013
@@ -71,9 +71,9 @@ public class XPathRecordReader {
public static final int FLATTEN = 1;
/**
- * A constructor called with a '|' seperated list of Xpath expressions
+ * A constructor called with a '|' separated list of Xpath expressions
* which define sub sections of the XML stream that are to be emitted as
- * seperate records.
+ * separate records.
*
* @param forEachXpath The XPATH for which a record is emitted. Once the
* xpath tag is encountered, the Node.parse method starts collecting wanted
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ZKPropertiesWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ZKPropertiesWriter.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ZKPropertiesWriter.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ZKPropertiesWriter.java Sun Mar 10 15:04:57 2013
@@ -42,12 +42,16 @@ public class ZKPropertiesWriter extends
@Override
public void init(DataImporter dataImporter, Map<String, String> params) {
- super.init(dataImporter, params);
+ super.init(dataImporter, params);
+ zkClient = dataImporter.getCore().getCoreDescriptor().getCoreContainer()
+ .getZkController().getZkClient();
+ }
+
+ @Override
+ protected void findDirectory(DataImporter dataImporter, Map<String, String> params) {
String collection = dataImporter.getCore().getCoreDescriptor()
.getCloudDescriptor().getCollectionName();
path = "/configs/" + collection + "/" + filename;
- zkClient = dataImporter.getCore().getCoreDescriptor().getCoreContainer()
- .getZkController().getZkClient();
}
@Override
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-schema.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-schema.xml (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test-files/dih/solr/collection1/conf/dataimport-schema.xml Sun Mar 10 15:04:57 2013
@@ -41,6 +41,8 @@
<field name="COUNTRY_NAME" type="text" indexed="true" stored="true" multiValued="true" />
<field name="SPORT_NAME" type="text" indexed="true" stored="true" multiValued="true" />
<field name="DO_NOT_INDEX" type="ignored" />
+
+ <field name="_version_" type="tlong" indexed="true" stored="true" multiValued="false"/>
<dynamicField name="*_i" type="tint" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestBuiltInEvaluators.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestBuiltInEvaluators.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestBuiltInEvaluators.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestBuiltInEvaluators.java Sun Mar 10 15:04:57 2013
@@ -107,43 +107,67 @@ public class TestBuiltInEvaluators exten
org.junit.Assert.assertEquals("c\\:t", s);
}
-
+
+ private Date twoDaysAgo(Locale l, TimeZone tz) {
+ Calendar calendar = Calendar.getInstance(tz, l);
+ calendar.add(Calendar.DAY_OF_YEAR, -2);
+ return calendar.getTime();
+ }
@Test
public void testDateFormatEvaluator() {
Evaluator dateFormatEval = new DateFormatEvaluator();
ContextImpl context = new ContextImpl(null, resolver, null,
Context.FULL_DUMP, Collections.<String,Object> emptyMap(), null, null);
- String currentLocale = Locale.getDefault().toString();
+
+ Locale rootLocale = Locale.ROOT;
+ Locale defaultLocale = Locale.getDefault();
+ TimeZone defaultTz = TimeZone.getDefault();
+
{
- Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"),
- Locale.ROOT);
- calendar.add(Calendar.DAY_OF_YEAR, -2);
- Date d = calendar.getTime();
- {
- String sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).format(d);
- String dfe = dateFormatEval.evaluate("'NOW-2DAYS','yyyy-MM-dd HH:mm'", context);
- assertEquals(sdf,dfe);
- }
- {
- String sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(d);
- String dfe = dateFormatEval.evaluate("'NOW-2DAYS','yyyy-MM-dd HH:mm','"+ currentLocale + "'", context);
- assertEquals(sdf,dfe);
+ SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd HH", rootLocale);
+ String sdf = sdfDate.format(twoDaysAgo(rootLocale, defaultTz));
+ String dfe = dateFormatEval.evaluate("'NOW-2DAYS','yyyy-MM-dd HH'", context);
+ assertEquals(sdf,dfe);
+ }
+ {
+ SimpleDateFormat sdfDate = new SimpleDateFormat("yyyy-MM-dd HH", defaultLocale);
+ String sdf = sdfDate.format(twoDaysAgo(defaultLocale, TimeZone.getDefault()));
+ String dfe = dateFormatEval.evaluate(
+ "'NOW-2DAYS','yyyy-MM-dd HH','" + defaultLocale + "'", context);
+ assertEquals(sdf,dfe);
+ for(String tzStr : TimeZone.getAvailableIDs()) {
+ TimeZone tz = TimeZone.getTimeZone(tzStr);
+ sdfDate.setTimeZone(tz);
+ sdf = sdfDate.format(twoDaysAgo(defaultLocale, tz));
+ dfe = dateFormatEval.evaluate(
+ "'NOW-2DAYS','yyyy-MM-dd HH','" + defaultLocale + "','" + tzStr + "'", context);
+ assertEquals(sdf,dfe);
}
}
- Date d = new Date();
-
+
+ Date d = new Date();
Map<String,Object> map = new HashMap<String,Object>();
map.put("key", d);
resolver.addNamespace("A", map);
-
+
assertEquals(
- new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ROOT).format(d),
+ new SimpleDateFormat("yyyy-MM-dd HH:mm", rootLocale).format(d),
dateFormatEval.evaluate("A.key, 'yyyy-MM-dd HH:mm'", context));
assertEquals(
- new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault()).format(d),
- dateFormatEval.evaluate("A.key, 'yyyy-MM-dd HH:mm','" + currentLocale
- + "'", context));
+ new SimpleDateFormat("yyyy-MM-dd HH:mm", defaultLocale).format(d),
+ dateFormatEval.evaluate("A.key, 'yyyy-MM-dd HH:mm','" + defaultLocale + "'", context));
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm", defaultLocale);
+ for(String tzStr : TimeZone.getAvailableIDs()) {
+ TimeZone tz = TimeZone.getTimeZone(tzStr);
+ sdf.setTimeZone(tz);
+ assertEquals(
+ sdf.format(d),
+ dateFormatEval.evaluate(
+ "A.key, 'yyyy-MM-dd HH:mm','" + defaultLocale + "', '" + tzStr + "'", context));
+
+ }
+
}
Modified: lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/dataimporthandler/src/test/org/apache/solr/handler/dataimport/TestSimplePropertiesWriter.java Sun Mar 10 15:04:57 2013
@@ -1,6 +1,10 @@
package org.apache.solr.handler.dataimport;
import java.io.File;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@@ -95,9 +99,7 @@ public class TestSimplePropertiesWriter
props = spw.readIndexerProperties();
Date entityDate = df.parse((String) props.get("SomeDates.last_index_time"));
Date docDate= df.parse((String) props.get("last_index_time"));
- Calendar c = new GregorianCalendar(TimeZone.getTimeZone("GMT"), Locale.ROOT);
- c.setTime(docDate);
- int year = c.get(Calendar.YEAR);
+ int year = currentYearFromDatabase();
Assert.assertTrue("This date: " + errMsgFormat.format(oneSecondAgo) + " should be prior to the document date: " + errMsgFormat.format(docDate), docDate.getTime() - oneSecondAgo.getTime() > 0);
Assert.assertTrue("This date: " + errMsgFormat.format(oneSecondAgo) + " should be prior to the entity date: " + errMsgFormat.format(entityDate), entityDate.getTime() - oneSecondAgo.getTime() > 0);
@@ -105,6 +107,34 @@ public class TestSimplePropertiesWriter
}
}
+ private int currentYearFromDatabase() throws Exception {
+ Connection conn = null;
+ Statement s = null;
+ ResultSet rs = null;
+ try {
+ conn = newConnection();
+ s = conn.createStatement();
+ rs = s.executeQuery("select year(current_timestamp) from sysibm.sysdummy1");
+ if (rs.next()) {
+ return rs.getInt(1);
+ }
+ Assert.fail("We should have gotten a row from the db.");
+ } catch (SQLException e) {
+ throw e;
+ } finally {
+ try {
+ rs.close();
+ } catch (Exception ex) {}
+ try {
+ s.close();
+ } catch (Exception ex) {}
+ try {
+ conn.close();
+ } catch (Exception ex) {}
+ }
+ return 0;
+ }
+
@Override
protected Database setAllowedDatabases() {
return Database.DERBY;
Modified: lucene/dev/branches/lucene4258/solr/contrib/extraction/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/extraction/ivy.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/extraction/ivy.xml (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/extraction/ivy.xml Sun Mar 10 15:04:57 2013
@@ -20,9 +20,9 @@
<info organisation="org.apache.solr" module="extraction"/>
<dependencies>
<!-- Tika JARs -->
- <dependency org="org.apache.tika" name="tika-core" rev="1.2" transitive="false"/>
- <dependency org="org.apache.tika" name="tika-parsers" rev="1.2" transitive="false"/>
- <!-- Tika dependencies - see http://tika.apache.org/1.2/gettingstarted.html#Using_Tika_as_a_Maven_dependency -->
+ <dependency org="org.apache.tika" name="tika-core" rev="1.3" transitive="false"/>
+ <dependency org="org.apache.tika" name="tika-parsers" rev="1.3" transitive="false"/>
+ <!-- Tika dependencies - see http://tika.apache.org/1.3/gettingstarted.html#Using_Tika_as_a_Maven_dependency -->
<!-- When upgrading Tika, upgrade dependencies versions and add any new ones
(except slf4j-api, commons-codec, commons-logging, geronimo-stax-api_1.0_spec) -->
<dependency org="org.gagravarr" name="vorbis-java-tika" rev="0.1" transitive="false"/>
@@ -31,9 +31,9 @@
<dependency org="org.apache.james" name="apache-mime4j-core" rev="0.7.2" transitive="false"/>
<dependency org="org.apache.james" name="apache-mime4j-dom" rev="0.7.2" transitive="false"/>
<dependency org="org.apache.commons" name="commons-compress" rev="1.4.1" transitive="false"/>
- <dependency org="org.apache.pdfbox" name="pdfbox" rev="1.7.0" transitive="false"/>
- <dependency org="org.apache.pdfbox" name="fontbox" rev="1.7.0" transitive="false"/>
- <dependency org="org.apache.pdfbox" name="jempbox" rev="1.7.0" transitive="false"/>
+ <dependency org="org.apache.pdfbox" name="pdfbox" rev="1.7.1" transitive="false"/>
+ <dependency org="org.apache.pdfbox" name="fontbox" rev="1.7.1" transitive="false"/>
+ <dependency org="org.apache.pdfbox" name="jempbox" rev="1.7.1" transitive="false"/>
<dependency org="org.bouncycastle" name="bcmail-jdk15" rev="1.45" transitive="false"/>
<dependency org="org.bouncycastle" name="bcprov-jdk15" rev="1.45" transitive="false"/>
<dependency org="org.apache.poi" name="poi" rev="3.8" transitive="false"/>
@@ -44,7 +44,7 @@
<dependency org="dom4j" name="dom4j" rev="1.6.1" transitive="false"/>
<dependency org="org.ccil.cowan.tagsoup" name="tagsoup" rev="1.2.1" transitive="false"/>
<dependency org="com.googlecode.mp4parser" name="isoparser" rev="1.0-RC-1" transitive="false"/>
- <dependency org="com.drewnoakes" name="metadata-extractor" rev="2.4.0-beta-1" transitive="false"/>
+ <dependency org="com.drewnoakes" name="metadata-extractor" rev="2.6.2" transitive="false"/>
<dependency org="de.l3s.boilerpipe" name="boilerpipe" rev="1.1.0" transitive="false"/>
<dependency org="rome" name="rome" rev="0.9" transitive="false"/>
<dependency org="jdom" name="jdom" rev="1.0" transitive="false"/>
Modified: lucene/dev/branches/lucene4258/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/schema.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene4258/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/schema.xml?rev=1454862&r1=1454861&r2=1454862&view=diff
==============================================================================
--- lucene/dev/branches/lucene4258/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/schema.xml (original)
+++ lucene/dev/branches/lucene4258/solr/contrib/extraction/src/test-files/extraction/solr/collection1/conf/schema.xml Sun Mar 10 15:04:57 2013
@@ -23,9 +23,6 @@
kitchen sink thrown in. See example/solr/conf/schema.xml for a
more concise example.
- $Id: schema.xml 382610 2006-03-03 01:43:03Z yonik $
- $Source: /cvs/main/searching/solr-configs/test/WEB-INF/classes/schema.xml,v $
- $Name: $
-->
<schema name="test" version="1.0">