You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/11/02 10:29:59 UTC

[1/7] lucene-solr:jira/gradle: Move queryparser test's resources to a right place

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/gradle 4a12fffb7 -> 6c070b4a5


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/reuters21578.txt
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/reuters21578.txt b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/reuters21578.txt
new file mode 100644
index 0000000..2733338
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/reuters21578.txt
@@ -0,0 +1,498 @@
+19870408	COUPON CUT ON KEIHANSHIN REAL ESTATE WARRANT BOND The coupon on the 25 mln dlr equity warrant eurobond for Keihanshin Real Estate Co Ltd has been set at 2-1/8 pct compared with the 2-1/4 pct indication, lead manager Daiwa Europe Ltd said.     The exercise price has been set at 810 yen per share which represents a premium of 2.53 pct over today's closing price of 790 yen. The exchange rate was set 146.30 yen to the dollar.     The five-year deal is priced at par and guaranteed by the Sumitomo Bank Ltd.  REUTER 3;
+19870408	IRAQI TROOPS REPORTED PUSHING BACK IRANIANS Iraq said today its troops were pushing Iranian forces out of positions they had initially occupied when they launched a new offensive near the southern port of Basra early yesterday.     A High Command communique said Iraqi troops had won a significant victory and were continuing to advance.     Iraq said it had foiled a three-pronged thrust some 10 km (six miles) from Basra, but admitted the Iranians had occupied ground held by the Mohammed al-Qassem unit, one of three divisions attacked.     The communique said Iranian Revolutionary Guards were under assault from warplanes, helicopter gunships, heavy artillery and tanks.     "Our forces are continuing their advance until they purge the last foothold" occupied by the Iranians, it said.     (Iran said its troops had killed or wounded more than 4,000 Iraqis and were stabilising their new positions.)     The Baghdad communique said Iraqi planes also destroyed oil installations at I
 ran's southwestern Ahvaz field during a raid today. It denied an Iranian report that an Iraqi jet was shot down.     Iraq also reported a naval battle at the northern tip of the Gulf. Iraqi naval units and forces defending an offshore terminal sank six Iranian out of 28 Iranian boats attempting to attack an offshore terminal, the communique said.      Reuter 3;
+19870408	SUMITOMO BANK AIMS AT QUICK RECOVERY FROM MERGER Sumitomo Bank Ltd <SUMI.T> is certain to lose its status as Japan's most profitable bank as a result of its merger with the Heiwa Sogo Bank, financial analysts said.     Osaka-based Sumitomo, with desposits of around 23.9 trillion yen, merged with Heiwa Sogo, a small, struggling bank with an estimated 1.29 billion dlrs in unrecoverable loans, in October.     But despite the link-up, Sumitomo President Koh Komatsu told Reuters he is confident his bank can quickly regain its position.     "We'll be back in position in first place within three years," Komatsu said in an interview.     He said that while the merger will initially reduce Sumitomo's profitability and efficiency, it will vastly expand Sumitomo's branch network in the Tokyo metropolitan area where it has been relatively weak.     But financial analysts are divided on whether and how quickly the gamble will pay off.     Some said Sumitomo may have paid too much for He
 iwa Sogo in view of the smaller bank's large debts. Others argue the merger was more cost effective than creating a comparable branch network from scratch.     The analysts agreed the bank was aggressive. It has expanded overseas, entered the lucrative securities business and geared up for domestic competition, but they questioned the wisdom of some of those moves.     "They've made bold moves to put everything in place. Now it's largely out of their hands," said Kleinwort Benson Ltd financial analyst Simon Smithson.     Among Sumitomo's problems are limits placed on its move to enter U.S. Securities business by taking a share in American investment bank Goldman, Sachs and Co.     Sumitomo last August agreed to pay 500 mln dlrs for a 12.5 pct limited partnership in the bank, but for the time being at least, the Federal Reserve Board has forbidden them to exchange personnel, or increase the business they do with each other.     "The tie-up is widely looked on as a lame duck because t
 he Fed was stricter than Sumitomo expected," said one analyst.     But Komatsu said the move will pay off in time.     "U.S. Regulations will change in the near future and if so, we can do various things. We only have to wait two or three years, not until the 21st century," Komatsu said.     Komatsu is also willing to be patient about possible routes into the securities business at home.     Article 65 of the Securities and Exchange Act, Japan's version of the U.S. Glass-Steagall Act, separates commercial from investment banking.     But the walls between the two are crumbling and Komatsu said he hopes further deregulation will create new opportunities.     "We need to find new business chances," Komatsu said. "In some cases these will be securities related, in some cases trust bank related. That's the kind of deregulation we want."     Until such changes occur, Sumitomo will focus on such domestic securities business as profitable government bond dealing and strengthening relations
  with Meiko Securities Co Ltd, in which it holds a five pct share, Komatsu said.     He said Sumitomo is cautiously optimistic about entering the securities business here through its Swiss universal bank subsidiary, Banca del Gottardo.      The Finance Ministry is expected to grant licences to securities subsidiaries of U.S. Commercial banks soon, following a similar decision for subsidiaries of European universal banks in which the parent holds a less than 50 pct.     But Komatsu is reluctant to push hard for a similar decision on a Gottardo subsidiary.     "We don't want to make waves. We expect this will be allowed in two or three years," he said.     Like other city banks, Sumitomo is also pushing to expand lending to individuals and small and medium businesses to replace disappearing demand from big business, he added.     The analysts said Sumitomo will have to devote a lot of time to digesting its most recent initiatives, including the merger with ailing Heiwa Sogo.     "It's
  (Sumitomo) been bold in its strategies," said Kleinwort's Smithson.     "After that, it's a question of absorbing and juggling around. It will be the next decade before we see if the strategy is right or wrong."  REUTER 3;
+19870408	U.K. MONEY MARKET DEFICIT FORECAST AT 250 MLN STG The Bank of England said it forecast a shortage of around 250 mln stg in the money market today.     Among the main factors affecting liquidity, bills maturing in official hands and the take-up of treasury bills will drain some 505 mln stg, while bills for repurchase by the market will remove around 194 mln. In addition, a rise in note circulation and bankers' balances below target will each drain around 110 mln stg.     Partly offsetting these outflows, exchequer transactions will add some 690 mln stg to the system today.  REUTER 3;
+19870408	U.K. MONEY MARKET GIVEN 53 MLN STG ASSISTANCE The Bank of England said it provided the money market with 53 mln stg assistance in the morning session.     This compares with the bank's estimate of a shortage in the system of around 300 mln stg which it earlier revised up from 250 mln.     The central bank made outright purchases of bank bills comprising 46 mln stg in band three at 9-3/4 pct and seven mln stg in band four at 9-11/16 pct.  REUTER 3;
+19870408	U.K. MONEY MARKET GIVEN FURTHER 166 MLN STG HELP The Bank of England said it provided the market with further help totalling 166 mln stg during the afternoon.     In band one, it bought 31 mln stg of treasury bills and three mln stg of bank bills at 9-7/8 pct, while in band two it bought 69 mln stg of bank bills at 9-13/16 pct. In addition, it bought 63 mln stg of band three bank bills at 9-3/4 pct.     This brings the total assistance by the Bank so far today to 219 mln stg against a liquidity shortage it has estimated at around 300 mln stg.  REUTER 3;
+19870409	<EMCOR> COMPLETES SALE OF STOCK TO INVESTORS Emcore said it completed the sale of 4.1 mln dlrs of stock to Citicorp Venture Capital Ltd, Concord Ventures of Dillon Read and Co and private investors.  Reuter 3;
+19870409	<TRUMP PLAZA> 4TH QTR NET Net profit 2,529,000 vs loss 1,066,000     Revs 59.0 mln vs 52.6 mln     Year     Net profit 15.4 mln vs profit 865,000     Revs 247.0 mln vs 231.1 mln     NOTE: Company became wholly owned and operated by Donald Trump in May 1986, when he acquired 50 pct interest that had been owned by former operator Holiday Corp <HIA>.  Reuter 3;
+19870409	ABBOTT <ABT> SEES GAINS FROM WEAKER DOLLAR Abbott Laboratories Inc said its 1987 first quarter record results reflected continued productivity improvement, higher volume, better product mix and a weaker U.S. dollar.     Abbott reported 1987 first quarter earnings rose to a record 142 mln dlrs or 62 cts a share on record sales of one billion dlrs.     Research and development expenses, most of which was applied to diagnostic and pharmaceutical products, increased by 23 pct to 78 mln dlrs, it said.     Sales of pharmaceutical and nutritional products were 548 mln dlrs in the first quarter, up 17.6 pct over a year ago, Abbott said. Hospital and laboratory product sales in the first quarter rose 14.1 pct to 456 mln dlrs, it said.     First quarter sales in domestic markets advanced 11.5 pct to 688 mln dlrs while international sales jumped 27.1 pct to 316 mln dlrs, Abbott said.  Reuter 3;
+19870409	ADAMS EXPRESS CO <ADX> MARCH 31 ASSETS Shr 22.50 dlrs vs 21.74 dlrs     Assets 546.9 mln vs 485.2 mln     Shrs out 24.3 mln vs 22.3 mln     NOTE: lastest assets after capital gain distributions of 28 cts a share in February 1987 and 2.55 dlrs a share in December 1986  Reuter 3;
+19870409	AEGON EXPECTS MODERATE RISE IN 1987 PROFITS Dutch insurer AEGON NV <AEGN.AS> reported a 6.4 pct increase in 1986 net profits to 327.1 mln guilders and said it expected a moderate increase in profits for 1987.     Total revenue was eight pct lower in 1986 at 7.97 billion guilders vs 8.7 billion guilders in 1985. The company said its revenues were down due to lower foreign exchange rates and a change in accounting practice. It added that revenues would have risen by about seven pct had those changes not occurred.     Revenue from Dutch operations rose five pct in 1986, mainly due to its life insurance business.     Health insurance revenues in the Netherlands also rose despite a notable shift to insurances with lower premiums and higher personal risks.     Damage insurances made losses, mainly due to car damage insurances. AEGON did not specify the loss.     In the United States, revenue in guilders from health and life insurance was lower. AEGON said this was due to a change
  in accounting for U.S. Annuities.     AEGON said annuities are subject to such strong personal investment influences that it should be accounted differently from the more traditional insurances.     This change in accounting practice and another change to account for profits made on fixed interest investments, resulted in an incidental rise in net profits of 31 mln guilders.     AEGON said incidental negative influences on net profits were slightly higher, being the lower dollar rate, high initial costs for new products, and the cost of new headquarters in The Hague.     In 1986, a large number of new insurance products emerged in the Netherlands and the U.S., AEGON said. Large initial costs for these products have depressed net profits somewhat.     Monumental Corp, a U.S. Insurer which merged with AEGON in May 1986, saw its profits almost completely eroded by these costs and made only a small contribution to the group's profits.     AEGON said it has written-off 657 mln guilders 
 in goodwill for Monumental Corp.     AEGON's net equity was 2.71 billion guilders in December 1986, against 3.46 billion the year before.   REUTER 3;
+19870409	ALEX. BROWN <ABSB> SETS SPLIT, TO OFFER SHARES Alex. Brown Inc said it has declared a three-for-two stock split, payable May 29, record May 22.     The company also said it has filed to offer 912,000 common shares, including 162,000 to be sold by a shareholder, with company proceeds to be used for working capital and general corporate purposes.  Its Alex. Brown and Sons Inc subsidiary is lead underwriter.     The offering is expected to be made before the record date of the split, the company said.  Reuter 3;
+19870409	AMERICAN WOODMARK <AMWD> TO BUILD PLANT American Woodmark Corp said it plans to build a 100,000 square foot kitchen cabinet component plant in Toccoa, Ga., with completion expected in the spring of 1988.  Reuter 3;
+19870409	AMOSKEAG BANK SHARES INC <AMKG> 1ST QTR NET Shr 70 cts vs 67 cts     Net 6,416,000 vs 6,057,000     NOTE: Net includes pretax securities sales gains of 5,900,000 dlrs vs 5,900,000 dlrs.  Reuter 3;
+19870409	AMRO BANK PLANS 300 MLN GUILDER 6.75 PCT BONDS Amsterdam-Rotterdam Bank NV <AMRO.AS> said it plans to issue 300 mln 6.75 pct capital bonds due 1988/2007.     The bonds will be redeemable in 20 almost equal annual instalments starting June 1, 1988.     Early redemption is not permitted, the bank said.     The issue price will be announced no later than Wednesday, April 15. Subscriptions close on Thursday April 16 at 15.00 hrs local time. The coupon and payment date is June 1.     The bonds will be listed on the Amsterdam Stock Exchange.     A spokesman for the bank said the capital bonds were subordinated and had an average maturity of 10.5 years.     The bonds will be in denominations of 1,000 and 5,000 guilders.  REUTER 3;
+19870409	ANALYSTS DOUBT FED FIRMED DESPITE BORROWING RISE Economists said that they doubt the Federal Reserve is firming policy to aid the dollar, despite higher discount window borrowings in the latest two-week statement period and very heavy borrowings Wednesday.     Data out today show net borrowings from the Fed averaged 393 mln dlrs in the two weeks to Wednesday, up from 265 mln dlrs in the prior statement period. Wednesday borrowings were 1.4 billion dlrs as Federal funds averaged a high 6.45 pct.     "One could make a case that the Fed is firming, but it probably isn't," said William Sullivan of Dean Witter Reynolds.     Sullivan said some may assume the Fed has firmed policy modestly to support the dollar because net borrowings in the two-weeks to Wednesday were nearly 400 mln dlrs after averaging around 250 mln dlrs over the previous two months.     However, the Dean Witter economist noted that the latest two-week period included a quarter end when seasonal demand often pus
 hes up borrrowings.     "Some might argue that the Fed was firming policy, but it looks like it tried to play catchup with reserve provisions late in the statement period and didn't quite make it," said Ward McCarthy of Merrill Lynch Capital Markets.     A Fed spokesman told a press press conference today that the Fed had no large net one-day miss of two billion dlrs or more in its reserve projections in the week ended Wednesday.     Still, McCarthy said it may have had a cumulative miss in its estimates over the week that caused it to add fewer reserves earlier in the week than were actually needed.     The Fed took no market reserve management action last Thursday and Friday, the first two days of the week. It added temporary reserves indirectly on Monday via two billion dlrs of customer repurchase agreements and then supplied reserves directly via System repurchases on Tuesday and Wednesday.     Based on Fed data out today, economists calculated that the two-day System repurchase
  agreements the Fed arrranged on Tuesday totaled around 5.9 billion dlrs. They put Wednesday's overnight System repos at approximately 3.4 billion dlrs.     "It is quite clear that the Fed is not firming policy at this time," said Larry Leuzzi of S.G. Warburg and Co Inc.     Citing the view shared by the other two economists, Leuzzi said the Fed cannot really afford to seriously lift interest rates to help the dollar because that would harm already weak economies in the United States and abroad and add to the financial stress of developing countries and their lenders.     "Those who believe the Fed tightened policy in the latest statement period have to explain why it acted before the dollar tumbled," said McCarthy of Merrill Lynch.     He said the dollar staged a precipitous drop as a new statement period began today on disappointment yesterday's Washington meetings of international monetary officials failed to produce anything that would offer substantive dollar aid.     In fact, 
 currency dealers said there was nothing in Wednesday's G-7 communique to alter the prevailing view that the yen needs to rise further to redress the huge trade imbalance between the United States and Japan.     The economists generally agreed that the Fed is aiming for steady policy now that should correspond to a weekly average Fed funds rate between six and 6-1/8 pct. This is about where the rate has been since early November.     "I'm not so sure that the Fed is engineering a tighter policy to help the dollar, as some suspect," said Sullivan of Dean Witter.     If it is, however, he said that Fed probably has just nudged up its funds rate goal to around 6.25 to 6.35 pct from six to 6.10 pct previously.  Reuter 3;
+19870409	ANCHOR FINANCIAL <AFCX> TO MAKE ACQUISITION Anchor Financial Corp said it has agreed to acquire Waccamaw State Bank of Surfside Beach, S.C., in an exchange of 1.435 Anchor shares for each Waccamaw share, subject to regulatory and shareholder approvals.     Waccamaw had assets of 22.8 mln dlrs as of March 31.  Reuter 3;
+19870409	ARGENTINE 1986/87 GRAIN OILSEED REGISTRATIONS Argentine grain board preliminary figures show 1986/87 crop export registrations of grains and oilseeds in the week to April 8, were as follows, in tonnes, compared with the previous week and the comparable week a year earlier.     BREAD WHEAT         nil        nil       nil     MAIZE              113,500    21,800    51,300     SORGHUM             13,600      nil     26,500     SOYBEAN             30,000    36,000    72,000     SUNFLOWERSEED        nil        nil     19,100     Cumulative figures export registrations for the 1986/87 crop to April 8, 1987, with comparative figures for the 1985/86 crop up to April 9, 1986, in brackets, were in thousands of tonnes.     BREAD WHEAT            2,692,4    (4,161.0)     MAIZE                  2,305.1    (5,200.0)     SORGHUM                  220.5      (625.7)     SOYBEAN                  561.3      (524.5)     SUNFLOWERSEED             45.7      (213.2)  REUTER 3;
+19870409	ARGENTINE CATTLE MARKET REPORT ABOUT 3,314 HEAD OF CATTLE WERE AUCTIONED IN LINIERS CATTLE MARKET, AGAINST 13,952 ON WEDNESDAY AND 9,217 LAST THURSDAY, TRADE SOURCES SAID.     MAXIMUN PRICES, IN AUSTRALES PER KILO, WITH DOLLAR EQUIVALENT IN BRACKETS, INCLUDED:                                TODAY     WEDNESDAY     STEERS OVER 480 KILOS   1.02(0.658) 1.015(0.654)     STEERS 460 TO 480 KILOS 1.05(0.677) 1.032(0.665)     COWS FOR CANNING        0.56(0.361) 0.56 (0.361) REUTER 3;
+19870409	ARGENTINE GRAIN BELT WEATHER REPORT ARGENTINE GRAIN BELT TEMPERATURES (CENTIGRADE) AND RAIN (MM) IN THE 24 HOURS TO 12.00 GMT WERE:     ...............MAX TEMP..MIN TEMP..RAINFALL     BUENOS AIRES.......24.......12............0     BAHIA BLANCA.......22........7............0     TRES ARROYOS.......22........8............0     TANDIL.............22........7............0     JUNIN..............24.......11............0     SANTA ROSA.........--........6............0     CORDOBA............23.......12............1     SANTA FE...........21.......18...........17 REUTER 3;
+19870409	ARGENTINE GRAIN MARKET REVIEW The Argentine grain market was quiet in the week to Wednesday, with prices rising slightly on increased interest in wheat, millet and birdseed.     Wheat for domestic consumption rose six Australs per tonne to 118.     For export it rose eight to 108 per tonne from Bahia Blanca, increased 0.50 to 104 at Necochea and was unchanged at Rosario at 108.30.     Maize increased one to 90 per tonne at Buenos Aires, was unchanged at 82 in Bahia Blanca, increased 0.50 to 85 at Necochea and fell one to 88 at Parana River ports.     Sorghum from Bahia Blanca increased 0.50 Australs to 76.50 per tonne and dropped one to 75 at Rosario.     It was quoted at 75 at Villa Constitucion, San Nicolas and Puerto Alvear.     Oats were unchanged at 168 per tonne at Buenos Aires.     Millet from Buenos Aires and Rosario rose five per tonne to 140 and birdseed rose 15 to 205 at Buenos Aires.  REUTER 3;
+19870409	ARUS <ARSCC> GETS 5.2 MLN DLR ORDER Arus Corp said it has received a letter of intent from Winston Financial Corp for the purchase of over 5,200,000 dlrs in telephone diagnostic testing equipment.     It said it expects to negotiate a firm order in May.     The company said the total value of the order is at least 5,200,000 dlrs and could be more, depending on circuit configurations required.  Reuter 3;
+19870409	ASARCO UPS U.S. LEAD PRICE 0.50 CT TO 26.50 CTS Asarco Inc said it is increasing its base spot sales price for refined lead by one-half cent to 26.50 cents a lb, FOB, delivered in carload lots, effective immediately.  Reuter 3;
+19870409	ASSETS OF U.S. MONEY FUNDS ROSE IN WEEK Assets of money market mutual funds increased 1.39 billion dlrs in the week ended yesterday to 236.77 billion dlrs, the Investment Company Institute said.     Assets of 93 institutional funds were up 481.1 mln dlrs to 65.65 billion dlrs, 93 broker-dealer funds rose 285.3 mln dlrs to 107.31 billion dlrs, and 197 general purpose funds gained 625.5 mln dlrs to 63.8 billion dlrs.  Reuter 3;
+19870409	AUSTRALIAN UNIONS AND NSW GOVERNMENT REACH DEAL Union and New South Wales government officials have reached a compromise in a dispute over workers compensation, averting increased industrial action in the state, union sources said.     But some unions, including those of building and mining workers, said they were dissatisfied with the deal and would continue their strikes for a few more days.     State officials said the government had agreed to revise its proposals to cut compensation and would allow slightly higher cash benefits for injured workers.     Under the original proposal, which sparked strikes and other industrial action in the state on April 7, workers' compensation would have been cut by one third. Full details of the compromise package are not yet known.     The Labour Council, affiliated to the Australian Council of Trade Unions (ACTU), had threatened to paralyse New South Wales unless the government modified its pending legislation on the issue.     State 
 officials said the only sectors affected in the past three days were some government building projects, railway freight movement and cargo handling in Sydney's ports.  REUTER 3;
+19870409	AVERAGE YEN CD RATES FALL IN LATEST WEEK Average interest rates on yen certificates of deposit (CD) fell to 4.13 pct in the week ended April 8 from 4.33 pct the previous week, the Bank of Japan said.     New rates (previous in brackets) -     Average CD rates all banks 4.13 pct (4.33)     Money Market Certificate (MMC) ceiling rates for week starting from April 13 -       3.38 pct (3.58)     Average CD rates of city, trust and long-term banks -     Less than 60 days          4.15 pct (4.41)     60-90 days                 4.14 pct (4.29)     Average CD rates of city, trust and long-term banks -     90-120 days                4.12 pct (4.25)     120-150 days               4.12 pct (4.23)     150-180 days               unquoted (4.03)     180-270 days               4.05 pct (4.05)     Over 270 days              4.05 pct (unqtd)     Average yen bankers acceptance rates of city, trust and long-term banks -     30 to less than 60 days    3.98 pct (4.20)     60-90 days            
      4.03 pct (3.97)     90-120 days                unquoted (unqtd)  REUTER 3;
+19870409	BANK OF FRANCE LEAVES INTERVENTION RATE UNCHANGED The Bank of France said it left its intervention rate unchanged at 7-3/4 pct when it injected funds in the market against first category paper in today's money market intervention tender.     Money market dealers had earlier expressed mixed views on the possibility of quarter point cut.     The rate was last adjusted on March 9, when it was cut to 7-3/4 pct from the eight pct rate set in January.  REUTER 3;
+19870409	BANK OF FRANCE TO HOLD MONEY MARKET TENDER TODAY The Bank of France said it has invited offers of first category paper today for a money market intervention tender.     Money market operators were divided over whether the Bank of France will use to occasion to cut its intervention rate, which has stood at 7-3/4 pct since March 9.     Some thought a price cut unlikely while others said there was room for a further 1/4 point cut by the bank.  REUTER 3;
+19870409	BANK OF JAPAN BUYS DOLLARS IN TOKYO, DEALERS SAY The Bank of Japan bought a modest amount of dollars at around 145.10 yen just after the market here opened, dealers said.     Just before the opening, the dollar dropped swiftly as speculators concluded the Group of Seven (G-7) comminuique issued in Washington contained nothing basically new, they said. It fell about a half yen, to around 145.     The G-7 reaffirmed that their currencies around current levels reflect economic fundamentals.     One dealer said the Bank of Japan probably intervened in Australia before the opening here, but could not confirm this.  REUTER 3;
+19870409	BANKERS TRUST <BT> FILES 400 MLN DLR OFFERING Bankers Trust New York Corp filed with the Securities and Exchange Commission for a shelf offering of up to 400 mln dlrs of subordinated debentures on terms to be set at the time of sale.     The bank holding company said proceeds will be used for general corporate purposes including investments in or extensions of credit to its subsidiaries.     Underwriters were not named in the draft prospectus.  Reuter 3;
+19870409	BANKS OF MID-AMERICA INC <BOMA> 1ST QTR NET Shr loss 18 cts vs loss 89 cts     Net profit 161,000 vs loss 5,938,000     Assets 3.43 billion vs 3.46 billion     Deposits 2.68 billion vs 2.67 billion     Loans 1.45 billion vs 1.64 billion     Note: Shr data after payment of preferred dividends.  Reuter 3;
+19870409	BAYBANKS INC <BBNK> 1ST QTR NET Oper shr 1.08 dlrs vs 96 cts     Oper shr diluted 1.02 dlrs vs 89 cts     Oper net 16.1 mln vs 12.8 mln     Avg shrs 14.9 mln vs 13.4 mln     Avg shrs 16.1 mln vs 14.8 mln     NOTE: 1987 net excludes gain 4,820,000 dlrs from cumulative effect of change in calculating depreciation expense.  Reuter 3;
+19870409	BELGIAN CURRENT ACCOUNT SURPLUS WIDENS IN 1986 Belgium's current account surplus, measured on a cash basis, widened sharply to 134.9 billion francs last year from 17.5 billion in 1985, the Finance Ministry said.     The increase was due almost entirely to a sharp rise in the goods trade surplus to 126.1 billion francs from 20.4 billion.     The services trade surpluses increased to 52.4 billion francs from 38.9 billion while the deficit on transfers rose slightly to 43.6 billion from 41.8 billion.     Private sector capital operations showed a steeply higher deficit of 160.7 billion francs after 56.9 billion in 1985.  Reuter 3;
+19870409	BELGIUM LAUNCHES BONDS WITH GOLD WARRANTS The Kingdom of Belgium is launching 100 mln Swiss francs of seven year notes with warrants attached to buy gold, lead manager Credit Suisse said.     The notes themselves have a 3-3/8 pct coupon and are priced at par. Payment is due April 30, 1987, and final maturity April 30, 1994.     Each 50,000 franc note carries 15 warrants. Two warrants are required to allow the holder to buy 100 grammes of gold at a price of 2,450 francs, during the entire life of the bond.     The latest gold price in Zurich was 2,045/2,070 francs per 100 grammes.  Reuter 3;
+19870409	BELGIUM LAUNCHES BONDS WITH GOLD WARRANTS The Kingdom of Belgium is launching 100 mln Swiss francs of seven year notes with warrants attached to buy gold, lead mananger Credit Suisse said.     The notes themselves have a 3-3/8 pct coupon and are priced at par. Payment is due April 30, 1987 and final maturity April 30, 1994.     Each 50,000 franc note carries 15 warrants. Two warrants are required to allow the holder to buy 100 grammes of gold at a price of 2,450 francs, during the entire life of the bond.     The latest gold price in Zurich was 2,045/2,070 francs per 100 grammes.  REUTER 3;
+19870409	BELGIUM TO ISSUE GOLD WARRANTS, SOURCES SAY Belgium plans to issue Swiss franc warrants to buy gold, with Credit Suisse as lead manager, market sources said.     No confirmation or further details were immediately available.  REUTER 3;
+19870409	BERLINER BANK ISSUES 50 MLN AUSTRALIAN DLR BOND Berliner Bank AG Berlin is issuing a 50 mln Australian dlr eurobond due November 13, 1990 paying 14-1/4 pct and priced at 101-1/2 pct, lead manager Banque Paribas Capital Markets said.     The non-callable bond is available in denominations of 1,000 Australian dlrs and will be listed in Luxembourg. The selling concession is one pct while management and underwriting combined pays 5/8 pct.     The payment date is May 13 and there will be a long first coupon period.  REUTER 3;
+19870409	BERMUDA SEEKS 40 MLN DLR REVOLVING CREDIT The Government of Bermuda is seeking a 40 mln dlr, seven year revolving credit, which will be the only credit outstanding in its own name, N.M. Rothschild and Sons Ltd said as arranger and agent.     The credit will pay a margin of 20 basis points over U.S. Dollar London Interbank Offered Rates (LIBOR) and will incorporate a tender panel for U.S. Dlr advances.     There is a 10 basis point annual facility fee in years one to four, rising to 12-1/2 points thereafter.  A 7-1/2 basis point participation fee is payable on the transaction, which started syndication this week.  Reuter 3;
+19870409	BEVIS <BEVI> RECEIVES TAKEOVER INQUIRIES Bevis Industries Inc, which has been seeking to be acquired, said it recently received inquiries concerning the purchase of the company.     The company did not identify the parties that made the inquiries, but it said they had been referred to its investment bankers, Tucker, Anthony and R.L. Day Inc, for study.     On March 18, the company said it engaged Tucker, Anthony to seek purchasers of its operating units, Greenville Tube Corp and MD Pneumatics Inc.  Reuter 3;
+19870409	BFIM-SOVAC OFFERS BOND REDEMPTION Banque de Financement Immobilier SOVAC, BFIM-SOVAC, launched an offer to repurchase its 14.30 pct 1980 bond issue at a price of 2,180 francs per bond, a Paris Bourse statement said.     The repurchase offer, managed by Lazard Freres et Cie, opens April 10 and closes April 27. The 140 mln franc issue comprised 70,000 bonds of 2,000 franc nominal value each.  Reuter 3;
+19870409	BOND INTERNATIONAL SELLS H.K. RESIDENTIAL BUILDING <Bond Corp International Ltd> said it has sold a residential block at Hong Kong's mid-levels to a joint venture between Sun Hung Kai Properties Ltd <SHKP.HK> and <New Town (N.T.) Properties Ltd> for 138 mln H.K. Dlrs.     Bond International, a subsidiary of the Australia based Bond Corp Holdings Ltd <BONA.S>, will receive net profits of about 16 mln dlrs from the deal.     The firm bought the building, which has total floor spaces of 110,580 sq ft and is now fully let, as part of a parcel of properties which it acquired from Hongkong Land Co Ltd <HKLD.HK> for 1.43 billion dlrs late last year.  REUTER 3;
+19870409	BRAMALL TO ACQUIRE GELCO FOR UP TO 26.3 MLN DLRS <C.D. Bramall Plc> said in a statement accompanying its annual results that it proposed to acquire Gelco U.K. For some 26.3 mln dlrs.     Part of the cost will be met by the issue of 2.14 mln new ordinary Bramall shares which are being placed at 265p each.     The acquisition will be satisfied by an initial payment of some 25.3 mln dlrs in cash with further payments of 500,000 dlrs up to a maximum 26.3 mln dlrs. These further payments will only be made if profits achieved by Gelco for the year ending July 31, 1987 reach a certain level.     Bramall shares were trading 6p lower at 278p.  REUTER 3;
+19870409	BRAZIL COCOA EXPORTERS UNLIKELY TO LIMIT SALES Brazilian cocoa exporters are not likely to follow the example of Cocoa Producers Alliance, CPA, members, who may limit sales of the product in an effort to boost world prices, trade sources said.     They said a similar procedure was taken in the past in Brazil and that it did not work out according to plans.     "The cocoa market is completely free. Unlike coffee, which is controlled through export registrations, cocoa exporters in Brazil operate at their own free will," a trade source said.     The traders were responding to questions whether they would follow the example of CPA members meeting in Yaounde.     The sources said the Banco do Brasil's Foreign Trade Department, CACEX, never interferes in the cocoa market by rejecting sales that do not meet certain price or shipment criteria.     "The position of local producers is always to negotiate as they please. If they buy for ten and sell for eleven and think it's a good d
 eal, they are free to go ahead," one source added.  Reuter 3;
+19870409	BRAZIL COTTON CROP LOWER -- USDA REPORT Brazil's 1986/87 cotton crop estimate has been reduced to 710,000 from 735,000 tonnes (lint basis), the U.S. Agriculture Department's officer in Sao Paulo said in a field report.     The report, dated April 7, said the reduction is based on an expected smaller harvest in the center-south region.     The center-south crop is now estimated at 550,000 tonnes -- 25,000 tonnes below the previous estimate.     Hot, dry weather during part of January and excessive rains in some areas in February reduced yield prospects and may have affected quality, the report said.     Nearly 60 pct of the crop has been harvested in Parana and slightly less in Sao Paulo, it said. Cotton entering gins is of fairly good quality, according to trade sources, it said.  Reuter 3;
+19870409	BRAZIL SOYBEAN YIELDS SEEN AVERAGE - USDA REPORT Based on field travel in the Brazilian state of Parana, soybean yields should be about average or 2.0 to 2.2 tonnes per hectare, the U.S. Agriculture Department's officer in Sao Paulo said in a field report.     The report, dated March 24, noted Parana accounts for about 20 to 24 pct of Brazil's total soybean crop.     It said generally favorable weather from early December through February helped compensate for earlier dryness.     However, hot, dry weather during the past 20 to 30 days followed by an unseasonably brief cold spell during the second week of march has raised concern about late planted soybeans which are still immature, but the impact may be localized, the report said.     The corn crop is expected to be a record and will create serious storage problems, the report said.     Due to favorable support prices, corn area increased by more than 25 pct at the expense of soybeans, and yields are expected to be above a
 verage, it said.     Due to late plantings only about 20 pct of the corn crop crop has been harvested.     During the field trip long truck lines were noted at grain elevators where preference is given to soybeans over corn, the report said.     New crop wheat plantings are expected to decline  -- Parana accounts for about 60 pct of total production. Major reasons for the decline are expected reduced government support price and good summer crop harvests.  Reuter 3;
+19870409	BRAZILIAN SOY RAINFALL THE FOLLOWING RAINFALL WAS RECORDED IN THE 24 HOURS UP TO (1200) GMT TODAY     PARANA STATE: CASCAVEL NIL, PONTA GROSSA NIL,CAMPO MOURAO NIL, LONDRINA NIL, MARINGA NIL.     RIO GRANDO DO SUL STATE: PASSO FUNDO NIL, SANTA MARIA 7.0 MILLIMETRES, CRUZ ALTA 8.5 MM, SAO LUIZ GONZAGA 4.4 MM. REUTER 3;
+19870409	BRENDA MINES SELLING KERR ADDISON SHARES <Brenda Mines Ltd> said it sold 2,830,390 <Kerr Addison Mines Ltd> shares to a group of underwriters led by Wood Gundy Inc and Brown, Baldwin Nisker Ltd for redistribution.     Financial terms were undisclosed.  Reuter 3;
+19870409	BRITISH AIRWAYS ISSUES 100 MLN STG EUROBOND British Airways Plc <BAB.L> is issuing a 100 mln stg eurobond due May 6, 1997, paying 9-1/2 pct and priced at 101-1/2, lead manager Union Bank of Switzerland said.     The non-callable bond is available in denominations of 1,000 and 10,000 stg and will be listed in London. The selling concession is 1-1/4 pct while management and underwriting combined pays 3/4 pct.     Payment date is May 6.  REUTER 3;
+19870409	BUNDESBANK SEES NO CHANGE IN MONETARY COURSE The Bundesbank sees no current reason to change monetary course, vice-president Helmut Schlesinger told Reuters in a telephone interview.     Schlesinger was responding to questions following remarks yesterday by Bundesbank board member Claus Koehler and West Berlin state central bank president Dieter Hiss, which, dealers said, revived some speculation that German interest rate cuts may once again be under discussion.     Schlesinger said he had no comment on the remarks of his two central bank council colleagues.     But he added that the last central bank council meeting on April 2 had discussed the economic situation with a mood of "subdued optimism," particularly influenced by the news brought by several state central bank presidents.     "Much is going better than the impression gained by the public from the January figures, which have been in the meantime superseded," he said.     German January industrial output fell 3.0 p
 ct after a decline of 0.9 pct in December. New industry orders fell 1.9 pct after they had been unchanged in December.     Bank economists said that the two together showed the economy would either stagnate or contract in the first quarter of 1987.     Aside from the economic developments, Schlesinger added, a steady monetary course was important to hold the dollar/mark rate around current levels as Bundesbank president Karl Otto Poehl had said while attending the Washington World Bank/IMF meeting.     Asked, however, if the Bundesbank could move to cut rates on repurchase agreements at the setting of the next repurchase tender, due next Tuesday, Schlesinger said, "Since the central bank council gives its opinion on this theme only every 14 days, this is hardly probable."     Responding to the question whether the Bundesbank had moved away from a policy of targetting monetary growth toward one of targetting currency rates, Schlesinger said he could have no comment on the subject whi
 le negotiations were still in progress in Washington.  REUTER 3;
+19870409	BURLINGTON INDUSTRIES <BUR> SELLS CONVERTIBLES Burlington Industries Inc is raising 75 mln dlrs through an offering of convertible subordinated debentures due 2012 with a 6-1/4 pct coupon and par pricing, said lead manager Kidder, Peabody and Co Inc.     The debentures are convertible into the company's common stock at 63.50 dlrs per share, representing a premium of 18.1 pct over the stock price when terms on the debt were set.     Non-callable for three years, the issue is rated Ba-2 by Moody's Investors Service Inc and BBB by Standard and Poor's Corp. Merrill Lynch Capital Markets and Salomon Brothers Inc co-managed the deal.  Reuter 3;
+19870409	BURMAH OIL PROSPECTS REMAIN FAVOURABLE The current year has opened well, with trading prospects remaining favourable, Burmah Oil Co Plc <BURM.L> said in a statement with its 1986 results.     The company plans to maintain a steady rate of investment in its marketing operations and to obtain improved profit margins on its liquified natural gas, LNG, project.     Burmah has the financial capacity to continue making acquisitions within its business sectors, it added. The rationalisation programme, including sale of the Bahamas oil terminal and all peripheral activities, is now complete.     Pre-tax profit for 1986 rose to 105.9 mln stg from 79.6 mln. REUTER^M 3;
+19870409	C.O.M.B. <CMCO> MAKES ACQUISITION C.O.M.B. Co said it acquired for 8.7 mln dlrs the principal assets of National Tech Industries Inc and Telkon Corp.     The companies are engaged in servicing, sales and telemarketing of consumer electronic merchandise.  Reuter 3;
+19870409	C.O.M.B. <CMCO> MAKES ACQUISITION C.O.M.B. Co said it has acquired the principal assets of National Tech Industries Inc and Telkom Corp, which are engaged in the sale and telemarketing of consumer electronic merchandise and do business as House of Imports and N.L. Industries respectively.     The company said it paid a total of 8,700,000 dlrs, including the assumption of liabilities.     National Tech had sales of about 23 mln dlrs for 1986, it said.  Reuter 3;
+19870409	CADILLAC FAIRVIEW SAYS IT RECEIVED TAKEOVER BIDS <Cadillac Fairview Corp Ltd> said it received proposals to acquire the company, following its announcement last August that it had retained investment dealers to solicit offers for all outstanding common shares.     Cadillac Fairview said the offers are subject to clarification and negotiation and offered no further details.  Reuter 3;
+19870409	CANADA FEBRUARY TRADE SURPLUS 1.2 BILLION DLRS Canada had a trade surplus of 1.25 billion dlrs in February compared with an upward revised 623 mln dlrs surplus in January, Statistics Canada said.     The January surplus originally was reported at 533 mln dlrs. The February surplus last year was 189 mln dlrs.     February exports, seasonally adjusted, were 10.44 billion dlrs against 9.85 billion in January and 10.05 billion in February, 1986.     February imports were 9.19 billion dlrs against 9.23 billion in January and 9.86 billion in February, 1986.  Reuter 3;
+19870409	CANADA TRADE RISE SEEN AS START OF RECOVERY Canada's trade picture has brightened considerably, underscoring economists' predictions the sector would post a long awaited recovery this year.     The federal government reported today that the monthly surplus soared to 1.25 billion Canadian dlrs in February, double January's 623 mln dlrs surplus and sharply higher than February 1986's 189 mln dlr tally.     "Hopefully it's the beginning of a trend," said Richardson Greenshields of Canada Ltd economist Susan Clark in Toronto.     Economists generally don't expect such large gains over the next months, but are looking for an upward trend throughout the year.     "We thought the trade balance would improve ... over the year, and it certainly looks as if this morning's figure is indicative of that," commented economist James Donegan at the Toronto securities firm of Midland Doherty Ltd.     Statistics Canada reported the surplus was driven by a 23 pct gain in automobile product ex
 ports to a record 3.2 billion dls in the month.     "Recovery in the automotive sector helped push the value of exports up by 5.9 pct in February," the agency said in its monthly report.     Total exports expanded to 10.44 billion dlrs from 9.85 billion dlrs in February, while imports slipped to 9.19 billion dlrs from 9.23 billion dlrs.     Economists have predicted the 1987 trade surplus would end up three to five billion dlrs higher than last year's dismal 10.1 billion dlr total. In 1985 the surplus was 17.48 billion dlrs.     Money market analysts said the positive trade news touched off a modest rally in the Canadian dollar, which rose to 76.85 U.S. cts on North American markets early this morning after closing at 76.58 cts Wednesday.     The currency was hovering around 76.78 cts in early afternoon trading.     Economists have been banking on an improved trade performance this year to stimulate an otherwise sluggish Canadian economy.     Money market analysts said the positive 
 trade news touched off a modest rally in the Canadian dollar, which rose to 76.85 U.S. cts on North American markets early this morning after closing at 76.58 cts Wednesday.     The currency was hovering around 76.78 cts in early afternoon trading.     Economists have been banking on an improved trade performance this year to stimulate an otherwise sluggish Canadian economy.     They say the country's consumers, who have been spending at a torrid pace in recent years, will sharply curtail outlays this year and this should help curtail the flow of imports into the country.     Meanwhile, demand for Canadian exports in the United States, by far the country's largest market, is expected to be strong as a result of a projected rise in American consumer spending and the relatively low value of the Canadian currency.     "We maintain what's going to drive Canada's export performance is income growth in the U.S.," said Midland's Donegan.     But at the Bank of Nova Scotia, deputy chief eco
 nomist Warren Jestin was less optimistic about the U.S. outlook and said it could be a mistake to read too much into February's trade upturn.     Jestin said, "Given the fact the U.S. economy is showing signs of weakening--particularly car sales--it would indicate that part of the strength (in Canada's trade figures) is probably transitory."  Reuter 3;
+19870409	CANADIAN BANK RATE RISES IN WEEK Canada's key bank rate rose to 7.20 pct from 7.15 pct the week before, Bank of Canada said.     Bank rate is set 1/4 percentage point above the average yield on the weekly issue of 91-day treasury bills. This week's yield was 6.95 pct compared with the previous week's 6.90 pct.     Tenders were accepted for 2.55 billion dlrs of 91-day bills at an average price of 98.296 dlrs against 98.310 dlrs last week.     The 1.40 billion dlrs of 182-day bills were priced at an average 96.488 dlrs against 96.549 dlrs last week, to yield an average 7.30 pct, versus 7.17 pct last week.     The 500 mln dlrs of 364-day bills were priced at an average 92.969 dlrs against 93.159 dlrs last week, to yield an average 7.58 pct versus 7.38 pct last week.     Tenders will be received next week for 2.50 billion dlrs of  91-day bills, 1.40 billion dlrs of 182-day bills and 500 mln dlrs of 364-day bills.            Reuter 3;
+19870409	CANAM MANAC WINS 8.5 MLN DLR CONTRACT (The Canam Manac Group Inc) said its Canam Steel Works unit received a contract valued at 8.5 mln dlrs to supply steel trusses to (Canron Inc) for a new car plant in Ingersoll, Ontario.     Canam Manac said it will produce the trusses at its Quebec and Ontario plants and delivery will be completed by August.  Reuter 3;
+19870409	CANNON INT'L <CAN> SETS PHILIPPINES FILM PACT Cannon International said <Viva Films International> agreed to exclusively distribute Cannon films in the Philippines for the new four years.     The company said the agreement covers both theatrical and video distribution. Terms were not disclosed.   Reuter 3;
+19870409	CARGILL CONFIRMS WHITE SUGAR SALE TO INDIA London-based trader Cargill (U.K.) Ltd confirmed it sold one cargo of white sugar to India for shipment April 15/May 15 at yesterday's tender.     Price details were not immediately available but some traders suggested business had been done around 220 dlrs a tonne cif.     India tendered for one or two cargoes of white sugar. There was no specific requirement on shipping period.  REUTER 3;
+19870409	CCC GUARANTEES TO IRAQ SWITCHED --USDA The Commodity Credit Corporation (CCC) has transferred 12.0 mln dlrs in credit guarantees previously earmarked for sales of U.S. hatching eggs and 7.0 mln dlrs in guarantees for breeder livestock to increase coverage on sales of U.S. protein concentrates to Iraq, the U.S. Agriculture Department said.     The action was taken at the request of Iraq's State Trade Organization for Grains and Foodstuffs and reduces the line for hatching eggs to zero and the line for breeder livestock from 15.0 mln dlrs to 8.0 mln dlrs, the department said.     The guarantee line for sales of protein concentrates has been increased from 25.0 mln dlrs to 44.0 mln dlrs, it said.      Reuter 3;
+19870409	CCF REPORTS 34.8 PCT PROFIT BOOST, SHARE SPLIT SEEN Credit Commercial de France <CCFP.PA> reported a parent company net profit up 34.8 pct to 140.1 mln francs from 103.9 mln francs a few weeks before its denationalisation around the end of this month.     Official sources said the bank, France's sixth largest in terms of its deposits and seventh in terms of its assets,  planned a share split to increase the number of shares on offer ahead of the sale of 40 pct of its ordinary share capital to the public, of 10 pct to staff and 20 pct abroad.     Previously one of France's biggest private banks, it was nationalised by the Socialists in 1982.     The sources said it was too early to give details of the planned split or of the share price, but cited April 27 as a likely date for the flotation launch.     So far 30 pct of the group's capital, currently at 10.33 mln shares of 100 francs nominal, has been offered for sale to large private investors to constitute a solid core of e
 ight to ten shareholders before the flotation.     The private tender offer closes on April 16, while a 12 mln franc advertising campaign for the flotation begins on Sunday. "The privatisation will be a way of attracting extra clients," CCF deputy director-general Rene de la Serre told Reuters.     Market sources put the total value of CCF's privatisation at between four and five billion francs.     De la Serre said the bank was likely to attract at least the same number of investors as <Sogenal>, another recently privatised bank in which 850,000 people bought shares.     The government's sweeping privatisation programme has also included the sale of Saint-Gobain <SGEP.PA>, and Cie Financiere de Paribas <PARI.PA>. The sale of <Banque du Batiment et des Travaux Publics> and <Banque Industrielle et Mobiliere Privee> should be completed this month, while third largest French bank Societe Generale <SGEN.PA> will be privatised later this year.  REUTER 3;
+19870409	CENTEL <CNT> COMPLETES ACQUISITION Centel Corp said it completed the acquisition of Welbac Cable Television Corp, which serves more than 2,500 cable television subscribers in east central Michigan.     Terms were not disclosed.     With the addition of Welbac customers, Centel Cable Television Co of Michigan serves more than 83,000 customers. Overall, Centel has nearly 495,000 customers in seven states.  Reuter 3;
+19870409	CENTEL <CNT> SELLS DEBENTURES AT 9.233 PCT Centel Corp is raising 50 mln dlrs through an offering of debentures due 2017 yielding 9.233 pct, said lead manager Smith Barney, Harris Upham and Co Inc.     The debentures have a 9-1/8 pct coupon and were priced at 98.90 to yield 117 basis points over comparable Treasury securities.     Non-callable for five years, the issue is rated A-3 by Moody's Investors Service Inc and A by Standard and Poor's Corp.     E.F. Hutton and Co Inc and UBS Securities Inc co-managed the deal.  Reuter 3;
+19870409	CERTIFICATED COTTON STOCKS Certificated cotton stocks deliverable on the New York Cotton Exchange No 2 cotton futures contract as of April 8 were reported at 34,661 bales, down 421 bales from the previous day's figure. There were no bales awaiting review and 1,218 bales awaiting decertification.  Reuter 3;
+19870409	CHICAGO PACIFIC <CPAC> SELLS CONVERTIBLE DEBT Chicago Pacific Corp is raising 150 mln dlrs through an offering of convertible subordinated debentures due 2012 with a 6-1/2 pct coupon and par pricing, said lead manager Goldman, Sachs and Co.     The debentures are convertible into the company's common stock at 62.50 dlrs per share, representing a premium of 25.63 pct over the stock price when terms on the debt were set.     Non-callable for two years, the issue is rated B-1 by Moody's Investors Service Inc and B by Standard and Poor's Corp. First Boston Corp and Lazard Freres and Co co-managed the deal.  Reuter 3;
+19870409	CHILEAN TRADE SURPLUS NARROWS SLIGHTLY IN FEBRUARY chile's trade surplus narrowed to 102.2 mln dlrs in february, from 105.4 mln dlrs in the same month last year, but it was above the 18.2-mln-dlr surplus recorded in january 1987, the central bank said.     Exports in february totalled 379.4 mln dlrs, 17.2 pct above the january figure. Imports fell 9.2 pct from the previous month to 277.2 mln dlrs. The figures for the same month last year were 314 mln and 208.6 mln dlrs, respectively.     The accumulated trade surplus over the first two months of 1987 stands at 120.4 mln dlrs against 132.8 mln dlrs the previous year.  Reuter 3;
+19870409	CHINA LIGHT UNIT RENEWS COMMERCIAL PAPER FACILITY <Kowloon Electricity Supply Co Ltd>, a joint venture of China Light and Power Co Ltd <CLPH.HK> and Exxon Corp <XON>, has renewed and increased an existing commercial paper program, arranger <Schroders Asia Ltd> said.     The fully underwritten program, which expires this month, has been extended to December 1990 and increased to 540 mln H.K. Dlrs from the original 500 mln dlrs, it said.     The underwriting fee is 1/8 of a percentage point over the Hong Kong interbank offered rate.     Commercial paper in tenures of one to three months will be issued in denominations of one mln dlrs, it said.     The program offers a U.S. Dlr option whereby commercial paper in denominations of 100,000 U.S. Dlrs will be issued subject to the same underwriting margin.     Joining Schroders as underwriters are Barclays Bank Plc, Citicorp International Ltd, Paribas Asia Ltd, Sanwa International Finance Ltd and Sumitomo Finance (Asia) Ltd.     Th
 e six underwriters will be joined by 11 other financial institutions in the tender panel.  REUTER 3;
+19870409	CHINA'S WHEAT CROP THREATENED BY PESTS, DISEASE Pests and disease, which destroyed 1.1 mln tonnes of wheat in China in 1986, are threatening crops on 11.64 mln hectares this year, the China Daily said.     About 14.54 mln hectares of wheat were affected in 1986.     The paper said abnormal weather conditions had encouraged the spread of wheat midges in 2.47 mln hectares in Shanxi, Henan, Sichuan, Anhui, Hebei and Jiangsu.     In Henan, Shandong and Hebei wheat aphids are affecting 4.67 mln hectares, wheat red mite 2.8 mln hectares and wheat powdery mildew 1.7 mln hectares.  REUTER 3;
+19870409	CHINESE BANK TO MAKE FIRST FOREIGN BORROWING The state-owned People's Construction Bank of China is making its first foreign borrowing, 300 mln dlrs to finance a large ethylene plant in Shanghai, the People's Daily said.     The newspaper's overseas edition said the plant will produce 300,000 tonnes of ethylene a year.     It said the bank last year started foreign exchange services for the first time on an experimental basis in Shenzhen, Zhuhai and Xiamen, but it gave no more details.  REUTER 3;
+19870409	CIBC UNIT ISSUES AUSTRALIAN DLR ZERO COUPON BOND CIBC Australia Ltd is issuing a zero coupon eurobond with a total redemption amount of 125 mln Australian dlrs due May 15, 1992 priced at 54 pct, sole lead manager CIBC Ltd said.     The issue is available in denominations of 1,000 and 10,000 Australian dlrs and is guaranteed Canadian Imperial Bank of Commerce. The selling concession is 3/4 pct, while management and underwriting combined pays 5/8 pct.     The payment date is May 15.  REUTER 3;
+19870409	CLEVITE <CLEV> AMENDS RIGHTS PLAN Clevite Industries Inc, which earlier received a 96 mln dlr takeover offer from J.P. Industries Inc <JPI>, said it amended its Shareholder Rights Plan so that certain provisions of the plan cannot occur until the board determines that it is in the best interests of the company and stockholders.     The plan, adopted in December 1986, permits Clevite to issue shares at half price to existing stockholders and allows stockholders to buy shares of an unfriendly bidder at half price.     Clevite said the amendments by its board effectively mean that the so-called flip-in and flip-over provisions of its rights plan can only be triggered by affirmative board approval.     The company said it acted inview of the proposed acquisition and because certain debt restrictions could block its ability to redeem the rights.  Reuter 3;
+19870409	CLEVITE <CLEV> GETS 13.50 DLR/SHR OFFER Clevite Industries Inc said it received a written proposal from J.P. Industries Inc <JPI> seeking to buy all of its outstanding shares for 13.50 dlrs a share.     Clevite's stock was trading on NASDAQ at 13-1/4.     J.P. Industries recently completed the acquisition of Clevite's Engine Parts Division.     J.P. Industries said its proposed transaction would be financed through borrowings under its available bank lines and a bridge financing facility which Donaldson Lufkin and Jenrette Securities Corp agreed to arrange.     To expedite the transaction, J.P. Industries said it would be willing to start a cash tender for Clevite's shares within five days after agreeing upon a definitive merger and confirmation of Clevite's financial results and condition.   Reuter 3;
+19870409	COAST SAVINGS <CSA> IN TALKS ON BUYING BANK Coast Savings and Loan Association said it is in talks with the Federal Savings and Loan Insurance Corp on the acquisition of Central Savings and Loan Association of San Diego.     Central, which operates 46 branches, has been under management guidance of the FSLIC since May 1985.     Coast said the acquisition would give it an entry into the San Joaquin Valley market besides strengthening its presence in the San Diego, Los Angeles and Orange Counties areas.  Reuter 3;
+19870409	COLONIAL BANCGROUP <CLBGA> MAKES ACQUISITION Colonial BancGroup said it has signed letter of intent to acquire Community Bank and Trust of Hartselle, Ala., with assets of 26 mln dlrs, for undisclosed terms, subject to approval by regulatory authorities and Community Bank shareholders.     Completion is expected within the next year, it said.  Reuter 3;
+19870409	COMDATA <CDN> GETS MERGER FINANCING Comdata Network Inc said it has received a letter from Drexel Burnham Lambert Inc stating that, subject to conditions, the company could raise up to 235 mln dlrs in debt securities to finance the previously announced merger of a newly formed corporation controlled by <Welsh, Carson, Anderson and Stowe IV> and Comdata.     Comdata said the letter was in accordance with the previously announced terms with Welsh, Carson.  Reuter 3;
+19870409	COMINCO <CLT> TO FORM EXPLORATION UNIT Cominco Ltd said it is forming a new publicly held company, Cominco Resources International Ltd, to continue exploration and development of its mineral holdings outside Canada, Alaska and Australia.     Cominco will maintain a majority position in the company, but the remaining interest will be sold in offerings led by Wood Gundy Inc and First Marathon Securities Ltd in Canada, and S.G. Warburg Securities and Wood Gundy Inc internationally.     Cominco said it is filing a preliminary prospectus with securities regulators in all Canadian provinces.                             Reuter 3;
+19870409	COMMONWEALTH EDISON <CWE> FILES DEBT OFFER Commonwealth Edison Co filed with the Securities and Exchange Commission for the sale of 375 mln dlrs in first mortgage bonds.     It said the proceedings would be used to discharge or refund outstanding obligations.     No underwriter was named.  Reuter 3;
+19870409	COMMUNITY BANK SYSTEM INC <CBSI> 1ST QTR NET Shr 46 cts vs 49 cts     Net 1,101,551 vs 831,398     NOTE: Share adjusted for two-for-one stock split in May 1986.  Reuter 3;
+19870409	CONSENSUS SEEN ON TIN PACT EXTENSION The quarterly session of the International Tin Council (ITC) continued without formal agreement on an extension of the sixth International Tin Agreement (ITA), but delegates said it was apparent there was a general consensus the Agreement should be prolonged.     Some delegations are still awaiting formal instructions from capitals, but informally most have indicated they favour an extension, delegates said.     This afternoon's session was used by delegates to seek further clarification on some of the issues involved, and to discuss internal matters.     Some sources were optimistic a resolution on an extension could be passed tomorrow but others suggested a special session would be convened to adopt the resolution after the Association of Tin Producing Countries meeting April 14 to 16.     The full Council session resumes tomorrow at 1330 GMT after a European Community coordination meeting at 1100.  Reuter 3;
+19870409	CONSUMERS POWER <CMS> TO REDEEM BONDS Consumers Power Co said it has 56 mln dlrs available to be used to redeem at par any 15 pct series first mortgage bonds that are not exchanged under an outstanding bond exchange program.     The utility on March 17 offered to exchange its 15 pct first mortgage bonds due March 1, 1994 for a new series of first mortgage bonds, 9-1/4 pct due April 1, 1997. The offer will expire April 14, 1987.  Reuter 3;
+19870409	CONTI SHARES OPEN HIGHER ON GOOD NEW TYRE REVIEWS Shares of Continental Gummi-Werke AG <CONG.F> opened eight marks stronger in an otherwise mixed Frankfurt market and dealers attributed the trend to favourable press reports about a new tyre system the company is developing.     The shares later eased to 344.50.     A spokesman for the West German Automobile Association, ADAC, said the ADAC magazine in a recent edition described advantages of the new tyre.  REUTER 3;
+19870409	COUPON CUT ON BANK OF TOKYO DOLLAR CONVERTIBLE The coupon on the 100 mln dlr, 15-year, convertible eurobond for the Bank of Tokyo Ltd has been cut to 1-3/4 pct from the two pct initially indicated, lead manager Bank of Tokyo International Ltd said.     The foreign exchange rate has been set at 146.40 yen to the dollar but details of the conversion price were not immediately available.  REUTER 3;
+19870409	COUPON CUT ON BANK OF TOKYO SWISS FRANC ISSUE The coupon on the Bank of Tokyo Ltd's 100 mln Swiss franc convertible has been cut to 7/8 pct from the indicated 1-1/4 pct, lead manager Swiss Bank Corp said.     The conversion price has been set at 1,590 yen, the same as today's close.     The exchange rate has been set at 96.84 yen to the franc.     Payment is due April 30. The conversion period is from May 20, 1987 until September 20, 1992.  REUTER 3;
+19870409	CRAY <CYR> GETS 6.6 MLN DLRS ORDER FROM BP <BP> Cray Research Inc said British Petroleum ordered a CRAY X-MP/24 supercomputer valued at about 6.6 mln dlrs.     The leased system will be installed at BP Exploration Co Ltd's London headquarters in the fourth quarter of 1987, pending export license approval, it said.     The CRAY X-MP/24 will replace a CRAY X-MP/12 supercomputer in operation since 1985, it added.     Separately, the company said that a CRAY X-MP/24 system valued at 8.5 mln dlrs was installed at Lockheed Missiles and Space Co.  Reuter 3;
+19870409	CREDIT NATIONAL ISSUES BILLION FRANC CONVERTIBLE Credit National is issuing a one billion franc convertible bond issue in two tranches both paying 8.50 pct and in 5,000 franc units, lead managers Caisse Nationale de Credit Agricole, Union de Garantie et de Placement and Morgan et Cie said.     Both tranches will be redeemable at the end of their lives and both have a payment date of April 27.     One seven year tranche will be priced at 99.94 pct. Each bond will be convertible on a one-for-one basis for a 8-1/2 year, 8.50 pct bond priced at 98.76 pct, redeemable at the end of its life.     This bond will pay a first coupon of 4.25 pct on April 27 next year and the payment date will be October 27, 1987.     A 13-year tranche, priced at 97.74 pct, will also be convertible until October 10, 1987 on a one for one basis for a 8.50 pct, 10-1/2 year year bond priced at 98.08 pct.     This bond will pay a first coupon of 212.50 francs on October 27 next year and the payment date wi
 ll be October 27 this year.  REUTER 3;
+19870409	CRUDE OIL NETBACKS UP SHARPLY IN EUROPE, U.S. Crude oil netback values in complex refineries rose sharply in Europe and firmed in the U.S. last Friday from the previous week but fell sharply in Singapore, according to calculations by Reuters Pipeline.     The firmer tone to refining margins in Europe and the U.S. relected higher prices for petroleum products, particularly gasoline, and support from crude oil prices.     Netback values for crude oil refined in Northern Europe rose substantially following strong gains in gasoline prices there. Brent is valued at 19.45 dlrs, up 56 cts a barrel or three pct from the previous week.     In the U.S. Gulf, sweet crudes rose in value by 14 cts to 19.33 dlrs for West Texas Intermediate, up about 0.7 pct.     Sour grades in the U.S. Gulf showed an increase of 33 cts a barrel for Alaska North Slope, up 1.7 pct.     But netbacks for crude oil refined in Singapore fell sharply, down 15 cts to as much as 68 cts a barrel as ample distillat
 e supplies weighed on petroleum product prices.     Attaka in Singapore is valued at 18.55 dlrs, a decline of 68 cts a barrel or 3.5 pct from the previous week.     For refineries in the Mediterranean, netback values were mostly lower, with declines of seven to 14 cts. The value of Kuwait crude fell 14 cts to 18.37 dlrs, while Iranian Light fell 11 cts to 19.14 dlrs.     On the U.S. West Coast, netback values for ANS CIF L.A. also jumped sharply, up 40 cts a barrel or 2.2 pct to 18.82 dlrs on higher gasoline prices.  Reuter 3;
+19870409	DAYTON HUDSON <DH> MARCH SALES OFF 4.9 PCT Dayton Hudson Corp said retail sales for the five weeks ended April Four were 791.8 mln dlrs compared to 755.6 mln dlrs a year ago. On a comparable store basis, it said sales declined 4.9 pct.     Sales for the nine months were 1.39 billion dlrs, up from 1.26 billion dlrs in the same 1986 period. On a comparable store basis, the sales rose 1.2 pct.  Reuter 3;
+19870409	DEKALB CORP <DKLBB> 2ND QTR FEB 28 NET Shr 20 cts vs 14 cts     Net 2.4 mln vs 1.7 mln     Revs 136.7 mln vs 174.4 mln     Six Mths     SDhr 72 cts vs 82 cts     Net 8.6 mln vs 9.9 mln     Revs 212.5 mln vs 268.8 mln  Reuter 3;
+19870409	DIAMOND CRYSTAL <DSLT> MIGHT SELL SALT UNIT Diamond Crystal Salt Co said it might sell its salt division.     The company said it retained First Boston Corp to assist it with the possible sale of the division, "assuming a fair price and reasonable terms can be obtained."     Diamond Crystal said sale of the unit was in the best long-term interests of its shareholders.     The company also said it incorporated its Packet Products Division as of April one. The unit will be an indirect wholly owned subsidiary called Diamond Crystal Specialty Foods Inc. Current management of the division will remain.  Reuter 3;
+19870409	DISEASE PUTS ZIMBABWE BEEF EXPORTS IN JEOPARDY Zimbabwe's beef exports to the European Community (EC), potentially worth 70 mln Zimbabwean dlrs this year, may be jeopardised by an outbreak of foot and mouth disease in southwestern Matabeleland, industry sources said.     The country has temporarily suspended beef exports to the EC because of the outbreak and awaits a decision from the EC veterinary committee, which is considering a formal ban.     The outbreak in the country's main ranching province has already led neighbouring beef-producing Botswana and Zambia to bar beef and dairy imports from Zimbabwe, threatening the dairy industry with a loss of at least one mln dlrs in export revenue.     "The situation is still uncertain at the moment. Normally when an outbreak occurs there is an automatic suspension of beef exports," one industry source said yesterday.      Commenting on EC policy, he explained, "Depending on the seriousness of the outbreak the (veterinary) committ
 ee then decides on three options, allowing us to continue exporting beef from disease-free areas, clamping a three-month suspension on exports or banning us from exporting for a year. We are still awaiting their decision," he added, asking not to be identified.     Zimbabwe was granted an export quota of 8,100 tonnes of high-grade beef to EC markets in 1985 after the country had spent millions of dollars erecting disease-control fences and upgrading abattoirs to meet stringent EC rules.     Should the EC ban Zimbabwean exports, the country will be forced to sell its beef on glutted world beef markets at low prices, the source said. Projected earnings from beef sales could fall about 23 mln dlrs as a result, he said.  Reuter 3;
+19870409	DISNEY FAMILY MAKES BID FOR HOLLY SUGAR <HLY> The Roy Disney family disclosed in a filing with the Securities and Exchange Commission that it made a bid to acquire Holly Sugar Corp for a package of cash and securities.     Shamrock Holdings of California Inc, a Disney family company, said it submitted the bid on April 8 to Salomon Brothers Inc, Holly Sugar's investment banker.     The offer was for 45 dlrs in cash, securities with a face value of 70 dlrs, and a "contingent payment certificate" that would pay out as much as 70 dlrs over a 20-year period for each share of Holly Sugar outstanding.     The Disney family already holds 101,300 Holly Sugar shares or 9.0 pct of the total outstanding following purchases of 12,500 shares March 13-April 17, Shamrock told the SEC.     Shamrock said it had asked for certain information about Holly Sugar's financial condition but had been turned down. It said its offer was therefore subject to further discussions.     "Once we have had a
 n opportunity to complete our due diligence evaluation of the company, including inspections of certain facilities and meetings with key management personnel, we would be prepared to negotiate all aspects of our proposal, including price," it said in its April 8 letter. REUTER^M 3;
+19870409	DOE RUN RAISES LEAD PRICE 0.50 CT TO 26.50 CTS Doe Run Company said it is increasing the price of its corroding grade lead by one-half cent to 26.50 cents a lb, effective immediately.     The price is quoted FOB, Herculaneum, Mo., and FOB, Boss, Mo., with freight allowed for carload quantities.      Reuter 3;
+19870409	DOLLAR ENDS LOWER IN LACKLUSTRE FRANKFURT The dollar drifted down to end one pfennig lower after a lacklustre session, held in limits by the lack of concrete news from the Group of Seven meeting and comments on the edge of the Washington IMF/World Bank meeting.     Dealers said the communique early in the European morning from the G-7 meeting contained no significant new factors and although the dollar dipped it generally resisted further attempts to push it lower through the day.     The U.S. Currency ended at 1.8270/80 marks, below yesterday's last 1.8365/75.     Koch said the assessment of the dollar's direction was based on a global view, with operators paying most attention to comments by finance officials to see how closely they stated adherence to international agreements such as those set at the Plaza Hotel in 1985 and in Paris on February 22.     Koch described the wording of the communique from the G-7 as "soft as wax."     Bundebank vice-president Helmut Schlesin
 ger told Reuters in a telephone interview that the German central bank sees no current reason to change monetary course at present.     Schlesinger was responding to questions following remarks yesterday by Bundesbank board member Claus Koehler and West Berlin state central bank president Dieter Hiss, which dealers said revived some speculation that German interest rate cuts may be under consideration.     German call money was slightly softer today, at around 3.70 pct after 3.80 yesterday.     Some dealers said rates on new liquidity injections added via Bundesbank securities repurchase agreements may be cut next week. Hopes of a cut were dashed on Tuesday with an allocation at an unchanged 3.80 pct.     But speaking of the pact tender rate next week, Schlesinger said, "since the central bank council gives its opinion on this theme only every 14 days, this is hardly probable."     Euromark rates scarcely responded to the central bankers comments, with six months funds ending unalte
 red at around 3-7/8 pct. Eurodollars for the same maturity rose a fractional 1/16 pct from yesterday to around 6-11/16 pct.     Sterling dipped to end at 2.952/956 marks after 2.960/965 last night. The Swiss franc firmed slightly to 120.30/45 marks per 100 from 120.25/40, with the yen soaring however to 1.2570/90 marks per 100 from 1.2515/35 yesterday.     EMS currencies saw the French franc end unchanged from last night at 30.03/06 marks per 100, with the Belgian franc easing however to 4.829/831 marks per 100 from 4.831/833.  REUTER 3;
+19870409	DOLLAR FALLS BELOW 143 YEN IN TOKYO The dollar fell below 143 yen in hectic early Tokyo trading despite aggressive Bank of Japan intervention, dealers said.     After opening at a Tokyo low of 143.75 yen, the dollar fell as low as 142.90 yen on heavy selling led by securities firms and institutional investors, they said.  REUTER 3;
+19870409	DOLLAR OPENS AT TOKYO RECORD LOW OF 143.75 YEN The dollar opened at a record Tokyo low of 143.75 yen despite aggressive Bank of Japan intervention, dealers said.     The previous record low was 144.70 yen set on March 30. The opening compares with 143.90/144.00 yen at the close in New York.     The central bank bought dollars through Tokyo brokers just before and after the market opening, the dealers said.     The intervention took place when the dollar fell to 143.20 yen, one dealer said.     The dollar opened at 1.8155/60 marks against 1.8187/97 in New York.     The dollar fell as low as 142.90 yen despite central bank intervention at 143.00 yen, dealers said.     Selling pressure was strong from securities houses and institutional investors in hectic and nervous trading on underlying bearish sentiment for the dollar, they said.     Most dealers were surpised by the dollar's sharp fall against the yen in New York, although many had expected such a drop to happen eventuall
 y.     Institutional investors are expected to sell the dollar aggressively if it rises to around 143.50 yen, dealers said.     The U.S. Currency steadied well above 143.00 yen after Bank of Japan intervention and scattered short-covering, they said.     The dollar opened at 1.5120/30 Swiss francs against 1.5085/00 at the New York close.     Sterling started at 1.6190/00 dlrs against 1.6195/05.  REUTER 3;
+19870409	E.F. HUTTON <EFH> UNIT'S PUROLATOR OFFER EXPIRES E.F. Hutton LBO Inc said the tender offer by its wholly owned unit, PC Acquisition Inc, for Purolator Courier Corp <PCC> expired at 2400 EDT yesterday without the purchase of any Purolator common stock.     Hutton added that PC Acquisition also terminated its merger agreement with Purolator.     Hutton said the offer, which had been conditioned upon the tender of at least 5,116,892 Purolator shares, or about two-thirds of the outstanding shares, was terminated because the minimum number of shares was not tendered.     Purolator had entered into a definitive agreement with PC Acquisition, part-owned by E.F. Hutton LBO Inc, a unit of E.F. Hutton, and some officers of Purolator's U.S. courier division, in which PC offered to purchase 6,332,471 Purolator common stock shares for 35 dlrs a share.     Following that move, PC Acquisition planned to merge a subsidiary into Purolator, converting all outstanding Purolator common it did 
 not own into an aggregate 46 mln dlrs principal amount of 12 pct guaranteed debentures due 2002 and warrants to purchase 15 pct of a Purolator unit comprised of Purolator's U.S courier operations.     Hutton said as of 2400 EDT yesterday about 181,000 shares of Purolator common stock, or about 2.4 pct of the outstanding shares, had been validly tendered and not withdrawn.     PC Acquisition has instructed its depository for the offer to return promptly the Purolator stock deposited by, or on behalf of, tendering shareholders, Hutton said.  Reuter 3;
+19870409	EC COMMISSION AUTHORISED TO BUY MAIZE IN JUNE The European Commission was authorised to buy up to one mln tonnes of maize into intervention stores in the second half of June, although sales into intervention normally end on April 30, Commission sources said.     They said approval was given by the EC's Cereals Management Committee because of the possible disturbance of the market due to heavy imports of maize under the agreement between the EC and the United States.     The agreement guarantees access to the Spanish market for two mln tonnes of non-EC maize a year for the next four years.     The sources said the intervention price for the maize would be 201.49 Ecus a tonne.     They said at this price it seemed unlikely that the full     They added the decision is also designed to prevent massive offers of maize for intervention just ahead of the normal April 30 deadline, which could be caused by speculation about the implementation of the accord with the United States.  R
 euter 3;
+19870409	EC GRANTS FREE MARKET BARLEY, MAIZE EXPORTS The European Commission authorised the export of 65,000 tonnes of free market barley at today's tender at a maximum rebate of 138.75 European currency units and 55,000 tonnes of French maize at 130 Ecus, grain traders here said.     It rejected bids for breadmaking and feed wheat, they said.  Reuter 3;
+19870409	EC LAUNCHES ANTI-DUMPING PROBE ON JAPANESE CHIPS The European Community launched an investigation into allegations of dumping by Japanese semiconductor makers in a move which diplomats said could mark an intensification of world trade strains.     Tokyo already faces a deadline of April 17 from Washington for the imposition of 300 mln dlrs worth of tariffs on chips it imports into the U.S.     The EC Executive Commission said today the European Electrical Component Manufacturers Association complained that Japanese firms were selling high capacity EPROM type (erasable programmable read only memory) chips at unfairly low prices.     Japan last year took 78 pct of the 170 mln dlr EC EPROM market, up from 60 pct in 1984. The EC firms said they had been forced to offer their products at a discount of up to 30 pct in order to compete with the Japanese.     The Commission said it believed the Association had given sufficient elements of proof for dumping to warrant an investigati
 on, which could lead it to impose duties if it found the complaints were justified.     The Commission claims last year's accord between the U.S. And Japan on microchip pricing gives U.S. Firms privileged access to the Japanese market.  REUTER 3;
+19870409	EC SUGAR TENDER SEEN MARKING NO CHANGE IN POLICY The maximum export rebate granted at yesterday's EC sugar tender marked no change in policy over producer complaints that they are not obtaining the EC intervention price in exporting sugar outside the Community, EC Commission sources said.     The maximum rebate was 46.496 Ecus per 100 kilos for 118,350 tonnes of sugar, down from 46.864 Ecus the previous week, but the change is explained by world market conditions.     Producers claim the rebate was short of the level needed to obtain a price equivalent to the intervention price by over one Ecu per 100 kilos, and was 0.87 Ecu short the previous week, the sources said.     They said this was despite the fact that the Commission had to accept 785,000 tonnes of sugar into intervention from operators protesting that rebates are too low.     Operators have now until early May to withdraw this sugar. But they have not given any sign of planned withdrawals unless the Commission rev
 iews its export policy, they said.  REUTER 3;
+19870409	ECONOMIC SPOTLIGHT - TELECOM IS KEY JAPAN MINISTRY Japan's little-known Ministry of Posts and Telecommunications (MPT) has emerged as an international force to be reckoned with, political analysts said.     MPT, thrust into the spotlight by trade rows with the U.S. And Britain, is in a position of strength due to its control of a lucrative industry and its ties with important politicians, they said.     "The ministry is standing athwart the regulatory control of a key industrial sector, telecommunications and information," said one diplomatic source.     "They are a potent political force," the diplomatic source said.     But MPT is finding domestic political prowess does not always help when it comes to trade friction diplomacy, analysts said.     "The ministry was a minor ministry and its people were not so internationalized," said Waseda University professor Mitsuru Uchida. "Suddenly they're standing at the centre of the world community and in that sense, they're at a lo
 ss (as to) how to face the situation."     Most recently the ministry has been embroiled in a row with London over efforts by Britain's Cable and Wireless Plc to keep a major stake in one of two consortia trying to compete in Japan's lucrative overseas telephone business.     The ministry has favoured the merger of the two rival groups, arguing the market cannot support more than one competitor to Kokusai Denshin Denwa Co Ltd, which now monopolizes the business.     It has also opposed a major management role in the planned merger for any non-Japanese overseas telecommunications firm on the grounds that no such international precedent exists.     The ministry's stance has outraged both London, which has threatened to retaliate, and Washington, which says the merger plan is evidence of Japan's failure to honour pledges to open its telecommunications market.     Washington is also angry over other ministry moves which it says have limited access for U.S. Firms to Japan's car telephone
  and satellite communications market.     Much of MPT's new prominence stems from the growth of the sector it regulates.     "What has been happening is an important shift in the economy which makes the ministry a very important place," said James Abegglen, head of the consulting firm Asia Advisory Service Inc.     A decision to open the telecommunications industry to competition under a new set of laws passed in 1985 has boosted rather than lessened MPT's authority, analysts said.     "With the legal framework eased, they became the de facto legal framework," said Bache Securities (Japan) analyst Darrell Whitten.     Close links with the powerful political faction of the ruling Liberal Democratic Party (LDP) nurtured by former Prime Minister Kakuei Tanaka are another key to MPT's influence, the analysts said.     "Other factions ignored MPT (in the 1970s), but the Tanaka faction was forward looking and ... Recognized the importance of MPT," Uchida said. Many former bureaucrats beca
 me members of the influential political group, he added.     The ministry also has power in the financial sector due to the more than 100,000 billion yen worth of deposits in the Postal Savings System, analysts said.     MPT has helped block Finance Ministry plans to deregulate interest rates on small deposits, a key element in financial liberalisation, since the change would remove the Postal Savings System's ability to offer slightly higher rates than banks, they said.     Diplomatic sources, frustrated with what they see as MPT's obstructionist and protectionist posture, have characterized the ministry as feudal.     Critics charge MPT with protecting its own turf, limiting competition and sheltering the former monopolies under its wing. Providing consumers with the best service at the lowest price takes a back seat to such considerations, they said.     But many of the ministry's actions are not unlike those of its bureaucratic counterparts in much of the Western world including
  Britain, several analysts said.     "The United States is really the odd man out," Abegglen said. "For a government to take the view that it wants to keep order in utilities markets is not an unusual and/or unreasonable view," he said.  REUTER 3;
+19870409	ECUADOR CRUDE OIL OUTPUT TO RESUME NEXT MONTH Ecuador is due to resume limited crude oil output on May 8 when a new 43 km pipeline to neighbouring Colombia should be finished, an energy ministry spokesman said.     Oil output was halted on March 5 by an earthquake which damaged 50 km of the main pipeline linking jungle oilfields at Lago Agrio to the Ecuadorean port of Balao on the Pacific.     About 13 km of the new link, capable of carrying some 50,000 barrels per day (bpd), has been built, he said.     Ecuador pumped 245,000 to 250,000 bpd before the earthquake.     The new link will connect Lago Agrio to Puerto Colon in Colombia, the starting point of Columbia's pipeline to the Pacific ocean port of Temuco.     The government estimates it will take about four more months to repair the Lago Agrio to Balao pipeline and return output to normal levels, the spokesman said.  REUTER 3;
+19870409	EGYPT BUYS PL 480 WHEAT FLOUR - U.S. TRADERS Egypt bought 125,723 tonnes of U.S. wheat flour in its PL 480 tender yesterday, trade sources said.     The purchase included 51,880 tonnes for May shipment and 73,843 tonnes for June shipment. Price details were not available.  Reuter 3;
+19870409	EGYPT CANCELS WHEAT TENDER Egypt has cancelled its April 2 tender for 200,000 tonnes of any origin wheat for April 15-30 shipment, trade and Egyptian official sources said.     Trade sources said the cancellation followed an offer by an Egyptian company, Islamic Corp, at 85.80 dlrs/tonne cost and freight, undercutting other traders' offers of between 93.90 and 94.49 dlrs/tonne.     An Egyptian trade official in Paris confirmed cancellation of the tender following the Islamic Corp offer, which he said the government had refused for legal reasons.     The official denied trade reports that the government might have substituted a private deal with Islamic Corp for the original tender.  Reuter 3;
+19870409	EGYPT SEEKING 500,000 TONNES CORN - U.S. TRADERS Egypt is expected to tender April 22 for 500,000 tonnes of corn for May through September shipments, private export sources said.  Reuter 3;
+19870409	EIB ISSUES 40 BILLION YEN EUROBOND The European Investment Bank (EIB) is issuing a 40 billion yen eurobond due May 6, 1994 paying 4-5/8 pct and priced at 101-1/2, lead Nomura International Ltd said.     The non-callable bond is available in denominations of one mln yen and will be listed in Luxembourg. The selling concession is 1-1/8 pct while management and underwriting combined pays 1/2 pct. The payment date is May 6.     There is a mandatory purchase fund operating in years one and two, except for the first month after the payment date, whereby the EIB can purchase up to five pct of the issue each year if it is trading below par.  REUTER 3;
+19870409	EQUITICORP H.K. UNIT TO RAISE 30 MLN U.S. DLRS <Equiticorp Hongkong Ltd> is planning a 30 mln U.S. Dlr transferrable loan facility to raise working capital, lead managers <Manufacturers Hanover Asia Ltd> and <Manufacturers Hanover Ltd>, said.     The two year loan with bullet repayment carries interest at 5/8 of a percentage point over the London interbank offered rate. It will be guaranteed by parent company <Equiticorp Holdings Ltd> of New Zealand, the managers said.     Syndication is proceeding and managers and participants are being invited to participate at four levels with management fees ranging from 15 to 30 basis points, it said.  REUTER 3;
+19870409	EUROPEAN MARKETS REACT QUIETLY TO G-7 COMMUNIQUE European currency markets reacted quietly to the G-7 communique, with comments from bankers and dealers ranging from disappointment that it was not more concrete to surprise that the markets should have expected so much.     The dollar opened lower against virtually all currencies and traded in a narrow range after the communique, which reaffirmed support for the Paris accord on currency stabilisation but contained no moves to strengthen it.     Dealers in Frankfurt and Zurich saw the dollar remaining broadly entrenched in its current trading range.     "The dollar is likely to stay within a range of 1.80 to 1.84 marks," said Gisela Steinhaeuser, senior dealer at Chase Bank AG. She said there was some resistance to further climbs.     However, she said the dollar could break out of the range with major surprises such as a worse-than-expected U.S. Merchandise trade deficit, due next Tuesday.     Theodor Stadelmann, dealer with
  Bank Julius Baer and Co Ltd in Zurich, said he expects the dollar to hold steady against the mark and Swiss franc but to weaken further against the yen, possibly to 140 yen.     A Milan banker shared Stadelmann's view, saying he expects a dollar-yen range of 140-150 in the short term.     London traders said the G-7 communique failed to curb underlying bearishness toward the dollar but this negative sentiment was not yet strong enough to tempt interbank operators to test the downside.     Concern that finance ministers and officials still in Washington could issue more concrete statements in favour of currency stabilisation kept players sidelined, along with worries about provoking fresh central bank intervention in the near term, the traders said.     Most Paris dealers expressed disappointment at the communique, saying nothing has changed to reverse the dollar's downward trend.     Traders in several centres said the market would look for fresh opportunities to test the willingne
 ss of central banks to defend current ranges, 

<TRUNCATED>

[5/7] lucene-solr:jira/gradle: Adding solr:analysis-extras module

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
new file mode 100644
index 0000000..851fea0
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.update.processor;
+
+import java.io.File;
+import java.util.Arrays;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.solr.common.SolrInputDocument;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+public class TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory extends UpdateProcessorTestBase {
+
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    File testHome = createTempDir().toFile();
+    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
+    initCore("solrconfig-opennlp-extract.xml", "schema-opennlp-extract.xml", testHome.getAbsolutePath());
+  }
+
+  @Test
+  public void testSimpleExtract() throws Exception {
+    SolrInputDocument doc = processAdd("extract-single",
+        doc(f("id", "1"),
+            f("source1_s", "Take this to Mr. Flashman.")));
+    assertEquals("dest_s should have stringValue", "Flashman", doc.getFieldValue("dest_s"));
+  }
+
+  @Test
+  public void testMultiExtract() throws Exception {
+    SolrInputDocument doc = processAdd("extract-multi",
+        doc(f("id", "1"),
+            f("source1_s", "Hello Flashman."),
+            f("source2_s", "Calling Flashman.")));
+
+    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
+  }
+
+  @Test
+  public void testArrayExtract() throws Exception {
+    SolrInputDocument doc = processAdd("extract-array",
+        doc(f("id", "1"),
+            f("source1_s", "Currently we have Flashman. Not much else."),
+            f("source2_s", "Flashman. Is. Not. There.")));
+
+    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
+  }
+
+  @Test
+  public void testSelectorExtract() throws Exception {
+    SolrInputDocument doc = processAdd("extract-selector",
+        doc(f("id", "1"),
+            f("source0_s", "Flashman. Or not."),
+            f("source1_s", "Serendipitously, he was. I mean, Flashman. And yet."),
+            f("source2_s", "Correct, Flashman.")));
+
+    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
+  }
+
+  public void testMultipleExtracts() throws Exception {
+    // test example from the javadocs
+    SolrInputDocument doc = processAdd("multiple-extract",
+        doc(f("id", "1"),
+            f("text", "From Flashman. To Panman."),
+            f("title", "It's Captain Flashman.", "Privately, Flashman."),
+            f("subtitle", "Ineluctably, Flashman."),
+            f("corrolary_txt", "Forsooth thou bringeth Flashman."),
+            f("notes_txt", "Yes Flashman."),
+            f("summary", "Many aspire to be Flashman in London."),
+            f("descs", "Courage, Flashman.", "Ain't he Flashman."),
+            f("descriptions", "Flashman. Flashman. Flashman.")));
+
+    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("people_s"));
+    assertEquals(Arrays.asList("Flashman", "Flashman", "Flashman"), doc.getFieldValues("titular_people"));
+    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("key_desc_people"));
+    assertEquals(Arrays.asList("Flashman", "Flashman", "Flashman"), doc.getFieldValues("key_description_people"));
+    assertEquals("Flashman", doc.getFieldValue("summary_person_s")); // {EntityType} field name interpolation
+    assertEquals("London", doc.getFieldValue("summary_location_s")); // {EntityType} field name interpolation
+  }
+
+  public void testEquivalentExtraction() throws Exception {
+    SolrInputDocument d;
+
+    // regardless of chain, all of these checks should be equivalent
+    for (String chain : Arrays.asList("extract-single", "extract-single-regex",
+        "extract-multi", "extract-multi-regex",
+        "extract-array", "extract-array-regex",
+        "extract-selector", "extract-selector-regex")) {
+
+      // simple extract
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              f("source0_s", "Totally Flashman."), // not extracted
+              f("source1_s", "One nation under Flashman.", "Good Flashman.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("Flashman", "Flashman"), d.getFieldValues("dest_s"));
+
+      // append to existing values
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              field("dest_s", "orig1", "orig2"),
+              f("source0_s", "Flashman. In totality."), // not extracted
+              f("source1_s", "Two nations under Flashman.", "Meh Flashman.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
+    }
+
+    // should be equivalent for any chain matching source1_s and source2_s (but not source0_s)
+    for (String chain : Arrays.asList("extract-multi", "extract-multi-regex",
+        "extract-array", "extract-array-regex",
+        "extract-selector", "extract-selector-regex")) {
+
+      // simple extract
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              f("source0_s", "Not Flashman."), // not extracted
+              f("source1_s", "Could have had a Flashman.", "Bad Flashman."),
+              f("source2_s", "Indubitably Flashman.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("Flashman", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
+
+      // append to existing values
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              field("dest_s", "orig1", "orig2"),
+              f("source0_s", "Never Flashman."), // not extracted
+              f("source1_s", "Seeking Flashman.", "Evil incarnate Flashman."),
+              f("source2_s", "Perfunctorily Flashman.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
+    }
+
+    // any chain that copies source1_s to dest_s should be equivalent for these assertions
+    for (String chain : Arrays.asList("extract-single", "extract-single-regex",
+        "extract-multi", "extract-multi-regex",
+        "extract-array", "extract-array-regex",
+        "extract-selector", "extract-selector-regex")) {
+
+      // simple extract
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              f("source1_s", "Always Flashman.", "Flashman. Noone else.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("Flashman", "Flashman"), d.getFieldValues("dest_s"));
+
+      // append to existing values
+      d = processAdd(chain,
+          doc(f("id", "1111"),
+              field("dest_s", "orig1", "orig2"),
+              f("source1_s", "Flashman.  And, scene.", "Contemporary Flashman. Yeesh.")));
+      assertNotNull(chain, d);
+      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
+    }
+  }
+
+  public void testExtractFieldRegexReplaceAll() throws Exception {
+    SolrInputDocument d = processAdd("extract-regex-replaceall",
+        doc(f("id", "1111"),
+            f("foo_x2_s", "Infrequently Flashman.", "In the words of Flashman."),
+            f("foo_x3_x7_s", "Flashman. Whoa.")));
+
+    assertNotNull(d);
+    assertEquals(Arrays.asList("Flashman", "Flashman"), d.getFieldValues("foo_y2_s"));
+    assertEquals("Flashman", d.getFieldValue("foo_y3_y7_s"));
+  }
+
+  public void testExtractFieldRegexReplaceAllWithEntityType() throws Exception {
+    SolrInputDocument d = processAdd("extract-regex-replaceall-with-entity-type",
+        doc(f("id", "1111"),
+            f("foo_x2_s", "Infrequently Flashman in London.", "In the words of Flashman in London."),
+            f("foo_x3_x7_s", "Flashman in London. Whoa.")));
+
+    assertNotNull(d);
+    assertEquals(d.getFieldNames().toString(), Arrays.asList("Flashman", "Flashman"), d.getFieldValues("foo_person_y2_s"));
+    assertEquals(d.getFieldNames().toString(), Arrays.asList("London", "London"), d.getFieldValues("foo_location_y2_s"));
+    assertEquals(d.getFieldNames().toString(),"Flashman", d.getFieldValue("foo_person_y3_person_y7_s"));
+    assertEquals(d.getFieldNames().toString(),"London", d.getFieldValue("foo_location_y3_location_y7_s"));
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
deleted file mode 100644
index b2cdbc2..0000000
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.analysis;
-
-import java.io.File;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.solr.SolrTestCaseJ4;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
-public class TestFoldingMultitermExtrasQuery extends SolrTestCaseJ4 {
-
-  public String getCoreName() {
-    return "basic";
-  }
-
-  @BeforeClass
-  public static void beforeTests() throws Exception {
-    File testHome = createTempDir().toFile();
-    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
-    initCore("solrconfig-icucollate.xml","schema-folding-extra.xml", testHome.getAbsolutePath());
-
-    int idx = 1;
-    // ICUFoldingFilterFactory
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "BadMagicICUFolding"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "Ruß"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "ΜΆΪΟΣ"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "Μάϊος"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "résumé"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "re\u0301sume\u0301"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "ELİF"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "eli\u0307f"));
-
-    // ICUNormalizer2FilterFactory
-
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "BadMagicICUFolding"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "Ruß"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "ΜΆΪΟΣ"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "Μάϊος"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "résumé"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "re\u0301sume\u0301"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "ELİF"));
-    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "eli\u0307f"));
-
-    // ICUTransformFilterFactory
-    assertU(adoc("id", Integer.toString(idx++), "content_icutransform", "Российская"));
-
-    assertU(commit());
-  }
-
-  @Test
-  public void testICUFolding() {
-    assertQ(req("q", "content_icufolding:BadMagicicuFold*"), "//result[@numFound='1']");
-    assertQ(req("q", "content_icufolding:rU*"), "//result[@numFound='1']");
-    assertQ(req("q", "content_icufolding:Re*Me"), "//result[@numFound='2']");
-    assertQ(req("q", "content_icufolding:RE\u0301su*"), "//result[@numFound='2']");
-    assertQ(req("q", "content_icufolding:El*"), "//result[@numFound='2']");
-  }
-  @Test
-  public void testICUNormalizer2() {
-    assertQ(req("q", "content_icunormalizer2:BadMagicicuFold*"), "//result[@numFound='1']");
-    assertQ(req("q", "content_icunormalizer2:RU*"), "//result[@numFound='1']");
-    assertQ(req("q", "content_icunormalizer2:Μάϊ*"), "//result[@numFound='2']");
-    assertQ(req("q", "content_icunormalizer2:re\u0301Su*"), "//result[@numFound='2']");
-    assertQ(req("q", "content_icunormalizer2:eL*"), "//result[@numFound='2']");
-  }
-  
-  public void testICUTransform() {
-    assertQ(req("q", "content_icutransform:Росс*"), "//result[@numFound='1']");
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
deleted file mode 100644
index f164080..0000000
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationField.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.schema;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.lucene.analysis.util.FilesystemResourceLoader;
-import org.apache.lucene.analysis.util.ResourceLoader;
-import org.apache.lucene.analysis.util.StringMockResourceLoader;
-import org.apache.solr.SolrTestCaseJ4;
-import org.junit.BeforeClass;
-
-import com.ibm.icu.text.Collator;
-import com.ibm.icu.text.RuleBasedCollator;
-import com.ibm.icu.util.ULocale;
-
-/**
- * Tests {@link ICUCollationField} with TermQueries, RangeQueries, and sort order.
- */
-public class TestICUCollationField extends SolrTestCaseJ4 {
-  
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    String home = setupSolrHome();
-    initCore("solrconfig.xml","schema.xml", home);
-    // add some docs
-    assertU(adoc("id", "1", "text", "\u0633\u0627\u0628"));
-    assertU(adoc("id", "2", "text", "I WİLL USE TURKİSH CASING"));
-    assertU(adoc("id", "3", "text", "ı will use turkish casıng"));
-    assertU(adoc("id", "4", "text", "Töne"));
-    assertU(adoc("id", "5", "text", "I W\u0049\u0307LL USE TURKİSH CASING"));
-    assertU(adoc("id", "6", "text", "Testing"));
-    assertU(adoc("id", "7", "text", "Tone"));
-    assertU(adoc("id", "8", "text", "Testing"));
-    assertU(adoc("id", "9", "text", "testing"));
-    assertU(adoc("id", "10", "text", "toene"));
-    assertU(adoc("id", "11", "text", "Tzne"));
-    assertU(adoc("id", "12", "text", "\u0698\u0698"));
-    assertU(commit());
-  }
-  
-  /**
-   * Ugly: but what to do? We want to test custom sort, which reads rules in as a resource.
-   * These are largish files, and jvm-specific (as our documentation says, you should always
-   * look out for jvm differences with collation).
-   * So it's preferable to create this file on-the-fly.
-   */
-  public static String setupSolrHome() throws Exception {
-    String tmpFile = createTempDir().toFile().getAbsolutePath();
-    // make data and conf dirs
-    new File(tmpFile  + "/collection1", "data").mkdirs();
-    File confDir = new File(tmpFile + "/collection1", "conf");
-    confDir.mkdirs();
-    
-    // copy over configuration files
-    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
-    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/schema-icucollate.xml"), new File(confDir, "schema.xml"));
-    
-    // generate custom collation rules (DIN 5007-2), saving to customrules.dat
-    RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
-
-    String DIN5007_2_tailorings =
-      "& ae , a\u0308 & AE , A\u0308"+
-      "& oe , o\u0308 & OE , O\u0308"+
-      "& ue , u\u0308 & UE , u\u0308";
-
-    RuleBasedCollator tailoredCollator = new RuleBasedCollator(baseCollator.getRules() + DIN5007_2_tailorings);
-    String tailoredRules = tailoredCollator.getRules();
-    final String osFileName = "customrules.dat";
-    final FileOutputStream os = new FileOutputStream(new File(confDir, osFileName));
-    IOUtils.write(tailoredRules, os, "UTF-8");
-    os.close();
-
-    final ResourceLoader loader;
-    if (random().nextBoolean()) {
-      loader = new StringMockResourceLoader(tailoredRules);
-    } else {
-      loader = new FilesystemResourceLoader(confDir.toPath());
-    }
-    final Collator readCollator = ICUCollationField.createFromRules(osFileName, loader);
-    assertEquals(tailoredCollator, readCollator);
-
-    return tmpFile;
-  }
-
-  /** 
-   * Test termquery with german DIN 5007-1 primary strength.
-   * In this case, ö is equivalent to o (but not oe) 
-   */
-  public void testBasicTermQuery() {
-    assertQ("Collated TQ: ",
-       req("fl", "id", "q", "sort_de:tone", "sort", "id asc" ),
-              "//*[@numFound='2']",
-              "//result/doc[1]/str[@name='id'][.=4]",
-              "//result/doc[2]/str[@name='id'][.=7]"
-    );
-  }
-  
-  /** 
-   * Test rangequery again with the DIN 5007-1 collator.
-   * We do a range query of tone .. tp, in binary order this
-   * would retrieve nothing due to case and accent differences.
-   */
-  public void testBasicRangeQuery() {
-    assertQ("Collated RangeQ: ",
-        req("fl", "id", "q", "sort_de:[tone TO tp]", "sort", "id asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=4]",
-               "//result/doc[2]/str[@name='id'][.=7]"
-     );
-  }
-  
-  /** 
-   * Test sort with a danish collator. ö is ordered after z
-   */
-  public void testBasicSort() {
-    assertQ("Collated Sort: ",
-        req("fl", "id", "q", "sort_da:[tz TO töz]", "sort", "sort_da asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=11]",
-               "//result/doc[2]/str[@name='id'][.=4]"
-     );
-  }
-  
-  /** 
-   * Test sort with an arabic collator. U+0633 is ordered after U+0698.
-   * With a binary collator, the range would also return nothing.
-   */
-  public void testArabicSort() {
-    assertQ("Collated Sort: ",
-        req("fl", "id", "q", "sort_ar:[\u0698 TO \u0633\u0633]", "sort", "sort_ar asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=12]",
-               "//result/doc[2]/str[@name='id'][.=1]"
-     );
-  }
-
-  /** 
-   * Test rangequery again with an Arabic collator.
-   * Binary order would normally order U+0633 in this range.
-   */
-  public void testNegativeRangeQuery() {
-    assertQ("Collated RangeQ: ",
-        req("fl", "id", "q", "sort_ar:[\u062F TO \u0698]", "sort", "id asc" ),
-               "//*[@numFound='0']"
-     );
-  }
-  /**
-   * Test canonical decomposition with turkish primary strength. 
-   * With this sort order, İ is the uppercase form of i, and I is the uppercase form of ı.
-   * We index a decomposed form of İ.
-   */
-  public void testCanonicalDecomposition() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_tr_canon:\"I Will Use Turkish Casıng\"", "sort", "id asc" ),
-               "//*[@numFound='3']",
-               "//result/doc[1]/str[@name='id'][.=2]",
-               "//result/doc[2]/str[@name='id'][.=3]",
-               "//result/doc[3]/str[@name='id'][.=5]"
-     );
-  }
-  
-  /** 
-   * Test termquery with custom collator (DIN 5007-2).
-   * In this case, ö is equivalent to oe (but not o) 
-   */
-  public void testCustomCollation() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_custom:toene"),
-               "//*[@numFound='2']",
-               "//result/doc/str[@name='id'][.=4]",
-               "//result/doc/str[@name='id'][.=10]"
-     );
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java
deleted file mode 100644
index 57b403a..0000000
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldDocValues.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.schema;
-
-import java.io.File;
-import java.io.FileOutputStream;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.solr.SolrTestCaseJ4;
-import org.junit.BeforeClass;
-
-import com.ibm.icu.text.Collator;
-import com.ibm.icu.text.RuleBasedCollator;
-import com.ibm.icu.util.ULocale;
-
-/**
- * Tests {@link ICUCollationField} with docValues.
- */
-public class TestICUCollationFieldDocValues extends SolrTestCaseJ4 {
-  
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    String home = setupSolrHome();
-    initCore("solrconfig.xml","schema.xml", home);
-    // add some docs
-    assertU(adoc("id", "1", "text", "\u0633\u0627\u0628"));
-    assertU(adoc("id", "2", "text", "I WİLL USE TURKİSH CASING"));
-    assertU(adoc("id", "3", "text", "ı will use turkish casıng"));
-    assertU(adoc("id", "4", "text", "Töne"));
-    assertU(adoc("id", "5", "text", "I W\u0049\u0307LL USE TURKİSH CASING"));
-    assertU(adoc("id", "6", "text", "Testing"));
-    assertU(adoc("id", "7", "text", "Tone"));
-    assertU(adoc("id", "8", "text", "Testing"));
-    assertU(adoc("id", "9", "text", "testing"));
-    assertU(adoc("id", "10", "text", "toene"));
-    assertU(adoc("id", "11", "text", "Tzne"));
-    assertU(adoc("id", "12", "text", "\u0698\u0698"));
-    assertU(commit());
-  }
-  
-  /**
-   * Ugly: but what to do? We want to test custom sort, which reads rules in as a resource.
-   * These are largish files, and jvm-specific (as our documentation says, you should always
-   * look out for jvm differences with collation).
-   * So it's preferable to create this file on-the-fly.
-   */
-  public static String setupSolrHome() throws Exception {
-    File tmpFile = createTempDir().toFile();
-    
-    // make data and conf dirs
-    new File(tmpFile + "/collection1", "data").mkdirs();
-    File confDir = new File(tmpFile + "/collection1", "conf");
-    confDir.mkdirs();
-    
-    // copy over configuration files
-    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
-    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml"), new File(confDir, "schema.xml"));
-    
-    // generate custom collation rules (DIN 5007-2), saving to customrules.dat
-    RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
-
-    String DIN5007_2_tailorings =
-      "& ae , a\u0308 & AE , A\u0308"+
-      "& oe , o\u0308 & OE , O\u0308"+
-      "& ue , u\u0308 & UE , u\u0308";
-
-    RuleBasedCollator tailoredCollator = new RuleBasedCollator(baseCollator.getRules() + DIN5007_2_tailorings);
-    String tailoredRules = tailoredCollator.getRules();
-    FileOutputStream os = new FileOutputStream(new File(confDir, "customrules.dat"));
-    IOUtils.write(tailoredRules, os, "UTF-8");
-    os.close();
-
-    return tmpFile.getAbsolutePath();
-  }
-
-  /** 
-   * Test termquery with german DIN 5007-1 primary strength.
-   * In this case, ö is equivalent to o (but not oe) 
-   */
-  public void testBasicTermQuery() {
-    assertQ("Collated TQ: ",
-       req("fl", "id", "q", "sort_de:tone", "sort", "id asc" ),
-              "//*[@numFound='2']",
-              "//result/doc[1]/str[@name='id'][.=4]",
-              "//result/doc[2]/str[@name='id'][.=7]"
-    );
-  }
-  
-  /** 
-   * Test rangequery again with the DIN 5007-1 collator.
-   * We do a range query of tone .. tp, in binary order this
-   * would retrieve nothing due to case and accent differences.
-   */
-  public void testBasicRangeQuery() {
-    assertQ("Collated RangeQ: ",
-        req("fl", "id", "q", "sort_de:[tone TO tp]", "sort", "id asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=4]",
-               "//result/doc[2]/str[@name='id'][.=7]"
-     );
-  }
-  
-  /** 
-   * Test sort with a danish collator. ö is ordered after z
-   */
-  public void testBasicSort() {
-    assertQ("Collated Sort: ",
-        req("fl", "id", "q", "sort_da:[tz TO töz]", "sort", "sort_da asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=11]",
-               "//result/doc[2]/str[@name='id'][.=4]"
-     );
-  }
-  
-  /** 
-   * Test sort with an arabic collator. U+0633 is ordered after U+0698.
-   * With a binary collator, the range would also return nothing.
-   */
-  public void testArabicSort() {
-    assertQ("Collated Sort: ",
-        req("fl", "id", "q", "sort_ar:[\u0698 TO \u0633\u0633]", "sort", "sort_ar asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=12]",
-               "//result/doc[2]/str[@name='id'][.=1]"
-     );
-  }
-
-  /** 
-   * Test rangequery again with an Arabic collator.
-   * Binary order would normally order U+0633 in this range.
-   */
-  public void testNegativeRangeQuery() {
-    assertQ("Collated RangeQ: ",
-        req("fl", "id", "q", "sort_ar:[\u062F TO \u0698]", "sort", "id asc" ),
-               "//*[@numFound='0']"
-     );
-  }
-  /**
-   * Test canonical decomposition with turkish primary strength. 
-   * With this sort order, İ is the uppercase form of i, and I is the uppercase form of ı.
-   * We index a decomposed form of İ.
-   */
-  public void testCanonicalDecomposition() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_tr_canon:\"I Will Use Turkish Casıng\"", "sort", "id asc" ),
-               "//*[@numFound='3']",
-               "//result/doc[1]/str[@name='id'][.=2]",
-               "//result/doc[2]/str[@name='id'][.=3]",
-               "//result/doc[3]/str[@name='id'][.=5]"
-     );
-  }
-  
-  /** 
-   * Test termquery with custom collator (DIN 5007-2).
-   * In this case, ö is equivalent to oe (but not o) 
-   */
-  public void testCustomCollation() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_custom:toene"),
-               "//*[@numFound='2']",
-               "//result/doc/str[@name='id'][.=4]",
-               "//result/doc/str[@name='id'][.=10]"
-     );
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldOptions.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldOptions.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldOptions.java
deleted file mode 100644
index 0b198b7..0000000
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldOptions.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.schema;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.solr.SolrTestCaseJ4;
-import org.junit.BeforeClass;
-
-import java.io.File;
-
-/**
- * Tests expert options of {@link ICUCollationField}.
- */
-public class TestICUCollationFieldOptions extends SolrTestCaseJ4 {
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    File testHome = createTempDir().toFile();
-    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
-    initCore("solrconfig-icucollate.xml","schema-icucollateoptions.xml", testHome.getAbsolutePath());
-    // add some docs
-    assertU(adoc("id", "1", "text", "foo-bar"));
-    assertU(adoc("id", "2", "text", "foo bar"));
-    assertU(adoc("id", "3", "text", "foobar"));
-    assertU(adoc("id", "4", "text", "foobar-10"));
-    assertU(adoc("id", "5", "text", "foobar-9"));
-    assertU(adoc("id", "6", "text", "resume"));
-    assertU(adoc("id", "7", "text", "Résumé"));
-    assertU(adoc("id", "8", "text", "Resume"));
-    assertU(adoc("id", "9", "text", "résumé"));
-    assertU(commit());
-  }
-  
-  /*
-   * Setting alternate=shifted to shift whitespace, punctuation and symbols
-   * to quaternary level 
-   */
-  public void testIgnorePunctuation() { 
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_ignore_punctuation:foobar", "sort", "id asc" ),
-               "//*[@numFound='3']",
-               "//result/doc[1]/str[@name='id'][.=1]",
-               "//result/doc[2]/str[@name='id'][.=2]",
-               "//result/doc[3]/str[@name='id'][.=3]"
-     );
-  }
-  
-  /*
-   * Setting alternate=shifted and variableTop to shift whitespace, but not 
-   * punctuation or symbols, to quaternary level 
-   */
-  public void testIgnoreWhitespace() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_ignore_space:\"foo bar\"", "sort", "id asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=2]",
-               "//result/doc[2]/str[@name='id'][.=3]"
-     );
-  }
-  
-  /*
-   * Setting numeric to encode digits with numeric value, so that
-   * foobar-9 sorts before foobar-10
-   */
-  public void testNumerics() {
-    assertQ("Collated sort: ",
-        req("fl", "id", "q", "id:[4 TO 5]", "sort", "sort_numerics asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=5]",
-               "//result/doc[2]/str[@name='id'][.=4]"
-     );
-  }
-  
-  /*
-   * Setting caseLevel=true to create an additional case level between
-   * secondary and tertiary
-   */
-  public void testIgnoreAccentsButNotCase() {
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_ignore_accents:resume", "sort", "id asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=6]",
-               "//result/doc[2]/str[@name='id'][.=9]"
-     );
-    
-    assertQ("Collated TQ: ",
-        req("fl", "id", "q", "sort_ignore_accents:Resume", "sort", "id asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=7]",
-               "//result/doc[2]/str[@name='id'][.=8]"
-     );
-  }
-  
-  /*
-   * Setting caseFirst=upper to cause uppercase strings to sort
-   * before lowercase ones.
-   */
-  public void testUpperCaseFirst() {
-    assertQ("Collated sort: ",
-        req("fl", "id", "q", "id:6 OR id:8", "sort", "sort_uppercase_first asc" ),
-               "//*[@numFound='2']",
-               "//result/doc[1]/str[@name='id'][.=8]",
-               "//result/doc[2]/str[@name='id'][.=6]"
-     );
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java b/solr/contrib/analysis-extras/src/test/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
deleted file mode 100644
index 851fea0..0000000
--- a/solr/contrib/analysis-extras/src/test/org/apache/solr/update/processor/TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.update.processor;
-
-import java.io.File;
-import java.util.Arrays;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.solr.common.SolrInputDocument;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-public class TestOpenNLPExtractNamedEntitiesUpdateProcessorFactory extends UpdateProcessorTestBase {
-
-  @BeforeClass
-  public static void beforeClass() throws Exception {
-    File testHome = createTempDir().toFile();
-    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
-    initCore("solrconfig-opennlp-extract.xml", "schema-opennlp-extract.xml", testHome.getAbsolutePath());
-  }
-
-  @Test
-  public void testSimpleExtract() throws Exception {
-    SolrInputDocument doc = processAdd("extract-single",
-        doc(f("id", "1"),
-            f("source1_s", "Take this to Mr. Flashman.")));
-    assertEquals("dest_s should have stringValue", "Flashman", doc.getFieldValue("dest_s"));
-  }
-
-  @Test
-  public void testMultiExtract() throws Exception {
-    SolrInputDocument doc = processAdd("extract-multi",
-        doc(f("id", "1"),
-            f("source1_s", "Hello Flashman."),
-            f("source2_s", "Calling Flashman.")));
-
-    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
-  }
-
-  @Test
-  public void testArrayExtract() throws Exception {
-    SolrInputDocument doc = processAdd("extract-array",
-        doc(f("id", "1"),
-            f("source1_s", "Currently we have Flashman. Not much else."),
-            f("source2_s", "Flashman. Is. Not. There.")));
-
-    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
-  }
-
-  @Test
-  public void testSelectorExtract() throws Exception {
-    SolrInputDocument doc = processAdd("extract-selector",
-        doc(f("id", "1"),
-            f("source0_s", "Flashman. Or not."),
-            f("source1_s", "Serendipitously, he was. I mean, Flashman. And yet."),
-            f("source2_s", "Correct, Flashman.")));
-
-    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("dest_s"));
-  }
-
-  public void testMultipleExtracts() throws Exception {
-    // test example from the javadocs
-    SolrInputDocument doc = processAdd("multiple-extract",
-        doc(f("id", "1"),
-            f("text", "From Flashman. To Panman."),
-            f("title", "It's Captain Flashman.", "Privately, Flashman."),
-            f("subtitle", "Ineluctably, Flashman."),
-            f("corrolary_txt", "Forsooth thou bringeth Flashman."),
-            f("notes_txt", "Yes Flashman."),
-            f("summary", "Many aspire to be Flashman in London."),
-            f("descs", "Courage, Flashman.", "Ain't he Flashman."),
-            f("descriptions", "Flashman. Flashman. Flashman.")));
-
-    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("people_s"));
-    assertEquals(Arrays.asList("Flashman", "Flashman", "Flashman"), doc.getFieldValues("titular_people"));
-    assertEquals(Arrays.asList("Flashman", "Flashman"), doc.getFieldValues("key_desc_people"));
-    assertEquals(Arrays.asList("Flashman", "Flashman", "Flashman"), doc.getFieldValues("key_description_people"));
-    assertEquals("Flashman", doc.getFieldValue("summary_person_s")); // {EntityType} field name interpolation
-    assertEquals("London", doc.getFieldValue("summary_location_s")); // {EntityType} field name interpolation
-  }
-
-  public void testEquivalentExtraction() throws Exception {
-    SolrInputDocument d;
-
-    // regardless of chain, all of these checks should be equivalent
-    for (String chain : Arrays.asList("extract-single", "extract-single-regex",
-        "extract-multi", "extract-multi-regex",
-        "extract-array", "extract-array-regex",
-        "extract-selector", "extract-selector-regex")) {
-
-      // simple extract
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              f("source0_s", "Totally Flashman."), // not extracted
-              f("source1_s", "One nation under Flashman.", "Good Flashman.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("Flashman", "Flashman"), d.getFieldValues("dest_s"));
-
-      // append to existing values
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              field("dest_s", "orig1", "orig2"),
-              f("source0_s", "Flashman. In totality."), // not extracted
-              f("source1_s", "Two nations under Flashman.", "Meh Flashman.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
-    }
-
-    // should be equivalent for any chain matching source1_s and source2_s (but not source0_s)
-    for (String chain : Arrays.asList("extract-multi", "extract-multi-regex",
-        "extract-array", "extract-array-regex",
-        "extract-selector", "extract-selector-regex")) {
-
-      // simple extract
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              f("source0_s", "Not Flashman."), // not extracted
-              f("source1_s", "Could have had a Flashman.", "Bad Flashman."),
-              f("source2_s", "Indubitably Flashman.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("Flashman", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
-
-      // append to existing values
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              field("dest_s", "orig1", "orig2"),
-              f("source0_s", "Never Flashman."), // not extracted
-              f("source1_s", "Seeking Flashman.", "Evil incarnate Flashman."),
-              f("source2_s", "Perfunctorily Flashman.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
-    }
-
-    // any chain that copies source1_s to dest_s should be equivalent for these assertions
-    for (String chain : Arrays.asList("extract-single", "extract-single-regex",
-        "extract-multi", "extract-multi-regex",
-        "extract-array", "extract-array-regex",
-        "extract-selector", "extract-selector-regex")) {
-
-      // simple extract
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              f("source1_s", "Always Flashman.", "Flashman. Noone else.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("Flashman", "Flashman"), d.getFieldValues("dest_s"));
-
-      // append to existing values
-      d = processAdd(chain,
-          doc(f("id", "1111"),
-              field("dest_s", "orig1", "orig2"),
-              f("source1_s", "Flashman.  And, scene.", "Contemporary Flashman. Yeesh.")));
-      assertNotNull(chain, d);
-      assertEquals(chain, Arrays.asList("orig1", "orig2", "Flashman", "Flashman"), d.getFieldValues("dest_s"));
-    }
-  }
-
-  public void testExtractFieldRegexReplaceAll() throws Exception {
-    SolrInputDocument d = processAdd("extract-regex-replaceall",
-        doc(f("id", "1111"),
-            f("foo_x2_s", "Infrequently Flashman.", "In the words of Flashman."),
-            f("foo_x3_x7_s", "Flashman. Whoa.")));
-
-    assertNotNull(d);
-    assertEquals(Arrays.asList("Flashman", "Flashman"), d.getFieldValues("foo_y2_s"));
-    assertEquals("Flashman", d.getFieldValue("foo_y3_y7_s"));
-  }
-
-  public void testExtractFieldRegexReplaceAllWithEntityType() throws Exception {
-    SolrInputDocument d = processAdd("extract-regex-replaceall-with-entity-type",
-        doc(f("id", "1111"),
-            f("foo_x2_s", "Infrequently Flashman in London.", "In the words of Flashman in London."),
-            f("foo_x3_x7_s", "Flashman in London. Whoa.")));
-
-    assertNotNull(d);
-    assertEquals(d.getFieldNames().toString(), Arrays.asList("Flashman", "Flashman"), d.getFieldValues("foo_person_y2_s"));
-    assertEquals(d.getFieldNames().toString(), Arrays.asList("London", "London"), d.getFieldValues("foo_location_y2_s"));
-    assertEquals(d.getFieldNames().toString(),"Flashman", d.getFieldValue("foo_person_y3_person_y7_s"));
-    assertEquals(d.getFieldNames().toString(),"London", d.getFieldValue("foo_location_y3_location_y7_s"));
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-ner.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-ner.bin b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-ner.bin
new file mode 100644
index 0000000..b4d8cdc
Binary files /dev/null and b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-ner.bin differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-sent.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-sent.bin b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-sent.bin
new file mode 100644
index 0000000..6e19e6b
Binary files /dev/null and b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-sent.bin differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin
new file mode 100644
index 0000000..796a744
Binary files /dev/null and b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-folding-extra.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
new file mode 100644
index 0000000..573ca53
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
@@ -0,0 +1,52 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<schema name="test" version="1.0">
+  <fieldType name="string" class="solr.StrField" sortMissingLast="true" multiValued="false"/>
+
+
+  <fieldType name="text_icufolding" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      <filter class="solr.ICUFoldingFilterFactory"/>
+    </analyzer>
+  </fieldType>
+
+  <fieldType name="text_icunormalizer2" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      <filter class="solr.ICUNormalizer2FilterFactory" name="nfkc_cf" mode="compose"/>
+    </analyzer>
+  </fieldType>
+
+  <fieldType name="text_icutransform" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      <filter class="solr.ICUTransformFilterFactory" id="Cyrillic-Latin"/>
+    </analyzer>
+  </fieldType>
+
+
+  <field name="id" type="string" indexed="true" stored="true" required="true"/>
+  <field name="content_icufolding" type="text_icufolding" indexed="true" stored="true"/>
+  <field name="content_icunormalizer2" type="text_icunormalizer2" indexed="true" stored="true"/>
+  <field name="content_icutransform" type="text_icutransform" indexed="true" stored="true"/>
+
+
+  <uniqueKey>id</uniqueKey>
+
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
new file mode 100644
index 0000000..63f7330
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Test schema file for CollationField (docvalues) -->
+
+<schema name="test" version="1.0">
+
+  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
+
+  <!-- basic text field -->
+  <fieldType name="text" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.StandardTokenizerFactory"/>
+      <filter class="solr.LowerCaseFilterFactory"/>
+    </analyzer>
+  </fieldType>
+
+  <fieldType name="sort_ar_t" class="solr.ICUCollationField" locale="ar"/>
+  <fieldType name="sort_de_t" class="solr.ICUCollationField" locale="de" strength="primary"/>
+  <fieldType name="sort_tr_canon_t" class="solr.ICUCollationField" locale="tr" strength="primary"
+             decomposition="canonical"/>
+  <fieldType name="sort_da_t" class="solr.ICUCollationField" locale="da" strength="primary"/>
+  <fieldType name="sort_custom_t" class="solr.ICUCollationField" custom="customrules.dat" strength="primary"/>
+
+  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
+  <field name="text" type="text" indexed="true" stored="false"/>
+  <field name="sort_ar" type="sort_ar_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
+  <field name="sort_de" type="sort_de_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
+  <field name="sort_tr_canon" type="sort_tr_canon_t" indexed="false" stored="false" multiValued="true"
+         docValues="true"/>
+  <field name="sort_da" type="sort_da_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
+  <field name="sort_custom" type="sort_custom_t" indexed="false" stored="false" multiValued="true" docValues="true"/>
+
+  <uniqueKey>id</uniqueKey>
+
+  <!-- copy our text to some sort fields with different orders -->
+  <copyField source="text" dest="sort_ar"/>
+  <copyField source="text" dest="sort_de"/>
+  <copyField source="text" dest="sort_tr_canon"/>
+  <copyField source="text" dest="sort_da"/>
+  <copyField source="text" dest="sort_custom"/>
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate.xml
new file mode 100644
index 0000000..9698013
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollate.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Test schema file for CollationField -->
+
+<schema name="test" version="1.0">
+
+  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
+
+  <!-- basic text field -->
+  <fieldType name="text" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.StandardTokenizerFactory"/>
+      <filter class="solr.LowerCaseFilterFactory"/>
+    </analyzer>
+  </fieldType>
+
+  <fieldType name="sort_ar_t" class="solr.ICUCollationField" locale="ar"/>
+  <fieldType name="sort_de_t" class="solr.ICUCollationField" locale="de" strength="primary"/>
+  <fieldType name="sort_tr_canon_t" class="solr.ICUCollationField" locale="tr" strength="primary"
+             decomposition="canonical"/>
+  <fieldType name="sort_da_t" class="solr.ICUCollationField" locale="da" strength="primary"/>
+  <fieldType name="sort_custom_t" class="solr.ICUCollationField" custom="customrules.dat" strength="primary"/>
+
+  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
+  <field name="text" type="text" indexed="true" stored="false"/>
+  <field name="sort_ar" type="sort_ar_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_de" type="sort_de_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_tr_canon" type="sort_tr_canon_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_da" type="sort_da_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_custom" type="sort_custom_t" indexed="true" stored="false" multiValued="false"/>
+
+
+  <uniqueKey>id</uniqueKey>
+
+  <!-- copy our text to some sort fields with different orders -->
+  <copyField source="text" dest="sort_ar"/>
+  <copyField source="text" dest="sort_de"/>
+  <copyField source="text" dest="sort_tr_canon"/>
+  <copyField source="text" dest="sort_da"/>
+  <copyField source="text" dest="sort_custom"/>
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
new file mode 100644
index 0000000..59b8d25
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- Test schema file for CollationField options -->
+
+<schema name="test" version="1.0">
+
+  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
+
+  <!-- basic text field -->
+  <fieldType name="text" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.StandardTokenizerFactory"/>
+      <filter class="solr.LowerCaseFilterFactory"/>
+    </analyzer>
+  </fieldType>
+
+  <!-- ignores punctuation and whitespace -->
+  <fieldType name="sort_ignore_punctuation_t" class="solr.ICUCollationField"
+             locale="en" strength="primary" alternate="shifted"/>
+  <!-- ignores only whitespace -->
+  <fieldType name="sort_ignore_space_t" class="solr.ICUCollationField"
+             locale="en" strength="primary" alternate="shifted" variableTop=" "/>
+  <!-- ignores only accents, but not case -->
+  <fieldType name="sort_ignore_accents_t" class="solr.ICUCollationField"
+             locale="en" strength="primary" caseLevel="true"/>
+  <!-- sorts numerics in numeric order -->
+  <fieldType name="sort_numerics_t" class="solr.ICUCollationField"
+             locale="en" numeric="true"/>
+  <!-- sorts uppercase before lowercase -->
+  <fieldType name="sort_uppercase_first_t" class="solr.ICUCollationField"
+             locale="en" strength="tertiary" caseFirst="upper"/>
+
+
+  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
+  <field name="text" type="text" indexed="true" stored="false"/>
+  <field name="sort_ignore_punctuation" type="sort_ignore_punctuation_t" indexed="true" stored="false"
+         multiValued="false"/>
+  <field name="sort_ignore_space" type="sort_ignore_space_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_ignore_accents" type="sort_ignore_accents_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_numerics" type="sort_numerics_t" indexed="true" stored="false" multiValued="false"/>
+  <field name="sort_uppercase_first" type="sort_uppercase_first_t" indexed="true" stored="false" multiValued="false"/>
+
+
+  <uniqueKey>id</uniqueKey>
+
+  <!-- copy our text to some sort fields with different orders -->
+  <copyField source="text" dest="sort_ignore_punctuation"/>
+  <copyField source="text" dest="sort_ignore_space"/>
+  <copyField source="text" dest="sort_ignore_accents"/>
+  <copyField source="text" dest="sort_numerics"/>
+  <copyField source="text" dest="sort_uppercase_first"/>
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
new file mode 100644
index 0000000..fc13431
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<schema name="test-opennlp-extract" version="1.6">
+  <fieldType name="opennlp-en-tokenization" class="solr.TextField">
+    <analyzer>
+      <tokenizer class="solr.OpenNLPTokenizerFactory"
+                 sentenceModel="en-test-sent.bin"
+                 tokenizerModel="en-test-tokenizer.bin"/>
+    </analyzer>
+  </fieldType>
+
+  <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
+
+  <fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
+    <analyzer>
+      <tokenizer class="solr.MockTokenizerFactory"/>
+      <filter class="solr.LowerCaseFilterFactory"/>
+      <filter class="solr.PorterStemFilterFactory"/>
+    </analyzer>
+  </fieldType>
+
+  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
+  <field name="text" type="text" indexed="true" stored="false"/>
+  <field name="subject" type="text" indexed="true" stored="true"/>
+  <field name="title" type="text" indexed="true" stored="true"/>
+  <field name="subtitle" type="text" indexed="true" stored="true"/>
+  <field name="descs" type="text" indexed="true" stored="true"/>
+  <field name="descriptions" type="text" indexed="true" stored="true"/>
+
+  <dynamicField name="*_txt" type="text" indexed="true" stored="true"/>
+  <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
+  <dynamicField name="*_people" type="string" indexed="true" stored="true" multiValued="true"/>
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
new file mode 100644
index 0000000..90c52d7
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<config>
+  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
+  <indexConfig>
+    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
+  </indexConfig>
+  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
+  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
+</config>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
new file mode 100644
index 0000000..7fd793e
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
@@ -0,0 +1,206 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<config>
+  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
+  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
+  <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
+  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
+  <schemaFactory class="ClassicIndexSchemaFactory"/>
+
+  <updateRequestProcessorChain name="extract-single">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">source1_s</str>
+      <str name="dest">dest_s</str>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-single-regex">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">source1_s</str>
+      <lst name="dest">
+        <str name="pattern">source\d(_s)</str>
+        <str name="replacement">dest$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-multi">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">source1_s</str>
+      <str name="source">source2_s</str>
+      <str name="dest">dest_s</str>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-multi-regex">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">source1_s</str>
+      <str name="source">source2_s</str>
+      <lst name="dest">
+        <str name="pattern">source\d(_s)</str>
+        <str name="replacement">dest$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-array">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <arr name="source">
+        <str>source1_s</str>
+        <str>source2_s</str>
+      </arr>
+      <str name="dest">dest_s</str>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-array-regex">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <arr name="source">
+        <str>source1_s</str>
+        <str>source2_s</str>
+      </arr>
+      <lst name="dest">
+        <str name="pattern">source\d(_s)</str>
+        <str name="replacement">dest$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-selector">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">source\d_.*</str>
+        <lst name="exclude">
+          <str name="fieldRegex">source0_.*</str>
+        </lst>
+      </lst>
+      <str name="dest">dest_s</str>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-selector-regex">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">source\d_.*</str>
+        <lst name="exclude">
+          <str name="fieldRegex">source0_.*</str>
+        </lst>
+      </lst>
+      <lst name="dest">
+        <str name="pattern">source\d(_s)</str>
+        <str name="replacement">dest$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-regex-replaceall">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">foo.*</str>
+      </lst>
+      <lst name="dest">
+        <!-- unbounded pattern that can be replaced multiple times in field name -->
+        <str name="pattern">x(\d)</str>
+        <str name="replacement">y$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <updateRequestProcessorChain name="extract-regex-replaceall-with-entity-type">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">foo.*</str>
+      </lst>
+      <lst name="dest">
+        <!-- unbounded pattern that can be replaced multiple times in field name -->
+        <str name="pattern">x(\d)</str>
+        <str name="replacement">{EntityType}_y$1</str>
+      </lst>
+    </processor>
+  </updateRequestProcessorChain>
+
+  <!-- example used in OpenNLPExtractNamedEntitiesUpdateProcessorFactory javadocs -->
+  <updateRequestProcessorChain name="multiple-extract">
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">text</str>
+      <str name="dest">people_s</str>
+    </processor>
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <arr name="source">
+        <str>title</str>
+        <str>subtitle</str>
+      </arr>
+      <str name="dest">titular_people</str>
+    </processor>
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">.*_txt$</str>
+        <lst name="exclude">
+          <str name="fieldName">notes_txt</str>
+        </lst>
+      </lst>
+      <str name="dest">people_s</str>
+    </processor>
+    <processor class="solr.processor.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <lst name="source">
+        <str name="fieldRegex">^desc(.*)s$</str>
+      </lst>
+      <lst name="dest">
+        <str name="pattern">^desc(.*)s$</str>
+        <str name="replacement">key_desc$1_people</str>
+      </lst>
+    </processor>
+    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
+      <str name="modelFile">en-test-ner.bin</str>
+      <str name="analyzerFieldType">opennlp-en-tokenization</str>
+      <str name="source">summary</str>
+      <str name="dest">summary_{EntityType}_s</str>
+    </processor>
+  </updateRequestProcessorChain>
+</config>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
new file mode 100644
index 0000000..23516b0
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/resources/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--
+A solrconfig.xml snippet containing indexConfig settings for randomized testing.
+-->
+<indexConfig>
+  <!-- this sys property is not set by SolrTestCaseJ4 because we ideally want to use
+       the RandomMergePolicy in all tests - but some tests expect very specific
+       Merge behavior, so those tests can set it as needed.
+  -->
+  <mergePolicyFactory class="${solr.tests.mergePolicyFactory:org.apache.solr.util.RandomMergePolicyFactory}" />
+
+  <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
+
+  <maxBufferedDocs>${solr.tests.maxBufferedDocs}</maxBufferedDocs>
+  <ramBufferSizeMB>${solr.tests.ramBufferSizeMB}</ramBufferSizeMB>
+
+  <mergeScheduler class="${solr.tests.mergeScheduler}" />
+
+  <writeLockTimeout>1000</writeLockTimeout>
+  <commitLockTimeout>10000</commitLockTimeout>
+
+  <!-- this sys property is not set by SolrTestCaseJ4 because almost all tests should
+       use the single process lockType for speed - but tests that explicitly need
+       to vary the lockType can set it as needed.
+  -->
+  <lockType>${solr.tests.lockType:single}</lockType>
+
+  <infoStream>${solr.tests.infostream:false}</infoStream>
+
+</indexConfig>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/core/build.gradle
----------------------------------------------------------------------
diff --git a/solr/core/build.gradle b/solr/core/build.gradle
index e8cc58e..afe4834 100644
--- a/solr/core/build.gradle
+++ b/solr/core/build.gradle
@@ -133,4 +133,5 @@ dependencies {
 	testCompile project(':solr:test-framework')
 	testCompile project(path: ':lucene:backward-codecs', configuration: 'testOutput')
 	testCompile project(path: ':lucene:queryparser', configuration: 'testOutput')
+	testCompile project(':solr:contrib:analysis-extras')
 }
\ No newline at end of file


[3/7] lucene-solr:jira/gradle: Move queryparser test's resources to a right place

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/reuters21578.txt
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/reuters21578.txt b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/reuters21578.txt
deleted file mode 100644
index 2733338..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/reuters21578.txt
+++ /dev/null
@@ -1,498 +0,0 @@
-19870408	COUPON CUT ON KEIHANSHIN REAL ESTATE WARRANT BOND The coupon on the 25 mln dlr equity warrant eurobond for Keihanshin Real Estate Co Ltd has been set at 2-1/8 pct compared with the 2-1/4 pct indication, lead manager Daiwa Europe Ltd said.     The exercise price has been set at 810 yen per share which represents a premium of 2.53 pct over today's closing price of 790 yen. The exchange rate was set 146.30 yen to the dollar.     The five-year deal is priced at par and guaranteed by the Sumitomo Bank Ltd.  REUTER 3;
-19870408	IRAQI TROOPS REPORTED PUSHING BACK IRANIANS Iraq said today its troops were pushing Iranian forces out of positions they had initially occupied when they launched a new offensive near the southern port of Basra early yesterday.     A High Command communique said Iraqi troops had won a significant victory and were continuing to advance.     Iraq said it had foiled a three-pronged thrust some 10 km (six miles) from Basra, but admitted the Iranians had occupied ground held by the Mohammed al-Qassem unit, one of three divisions attacked.     The communique said Iranian Revolutionary Guards were under assault from warplanes, helicopter gunships, heavy artillery and tanks.     "Our forces are continuing their advance until they purge the last foothold" occupied by the Iranians, it said.     (Iran said its troops had killed or wounded more than 4,000 Iraqis and were stabilising their new positions.)     The Baghdad communique said Iraqi planes also destroyed oil installations at I
 ran's southwestern Ahvaz field during a raid today. It denied an Iranian report that an Iraqi jet was shot down.     Iraq also reported a naval battle at the northern tip of the Gulf. Iraqi naval units and forces defending an offshore terminal sank six Iranian out of 28 Iranian boats attempting to attack an offshore terminal, the communique said.      Reuter 3;
-19870408	SUMITOMO BANK AIMS AT QUICK RECOVERY FROM MERGER Sumitomo Bank Ltd <SUMI.T> is certain to lose its status as Japan's most profitable bank as a result of its merger with the Heiwa Sogo Bank, financial analysts said.     Osaka-based Sumitomo, with desposits of around 23.9 trillion yen, merged with Heiwa Sogo, a small, struggling bank with an estimated 1.29 billion dlrs in unrecoverable loans, in October.     But despite the link-up, Sumitomo President Koh Komatsu told Reuters he is confident his bank can quickly regain its position.     "We'll be back in position in first place within three years," Komatsu said in an interview.     He said that while the merger will initially reduce Sumitomo's profitability and efficiency, it will vastly expand Sumitomo's branch network in the Tokyo metropolitan area where it has been relatively weak.     But financial analysts are divided on whether and how quickly the gamble will pay off.     Some said Sumitomo may have paid too much for He
 iwa Sogo in view of the smaller bank's large debts. Others argue the merger was more cost effective than creating a comparable branch network from scratch.     The analysts agreed the bank was aggressive. It has expanded overseas, entered the lucrative securities business and geared up for domestic competition, but they questioned the wisdom of some of those moves.     "They've made bold moves to put everything in place. Now it's largely out of their hands," said Kleinwort Benson Ltd financial analyst Simon Smithson.     Among Sumitomo's problems are limits placed on its move to enter U.S. Securities business by taking a share in American investment bank Goldman, Sachs and Co.     Sumitomo last August agreed to pay 500 mln dlrs for a 12.5 pct limited partnership in the bank, but for the time being at least, the Federal Reserve Board has forbidden them to exchange personnel, or increase the business they do with each other.     "The tie-up is widely looked on as a lame duck because t
 he Fed was stricter than Sumitomo expected," said one analyst.     But Komatsu said the move will pay off in time.     "U.S. Regulations will change in the near future and if so, we can do various things. We only have to wait two or three years, not until the 21st century," Komatsu said.     Komatsu is also willing to be patient about possible routes into the securities business at home.     Article 65 of the Securities and Exchange Act, Japan's version of the U.S. Glass-Steagall Act, separates commercial from investment banking.     But the walls between the two are crumbling and Komatsu said he hopes further deregulation will create new opportunities.     "We need to find new business chances," Komatsu said. "In some cases these will be securities related, in some cases trust bank related. That's the kind of deregulation we want."     Until such changes occur, Sumitomo will focus on such domestic securities business as profitable government bond dealing and strengthening relations
  with Meiko Securities Co Ltd, in which it holds a five pct share, Komatsu said.     He said Sumitomo is cautiously optimistic about entering the securities business here through its Swiss universal bank subsidiary, Banca del Gottardo.      The Finance Ministry is expected to grant licences to securities subsidiaries of U.S. Commercial banks soon, following a similar decision for subsidiaries of European universal banks in which the parent holds a less than 50 pct.     But Komatsu is reluctant to push hard for a similar decision on a Gottardo subsidiary.     "We don't want to make waves. We expect this will be allowed in two or three years," he said.     Like other city banks, Sumitomo is also pushing to expand lending to individuals and small and medium businesses to replace disappearing demand from big business, he added.     The analysts said Sumitomo will have to devote a lot of time to digesting its most recent initiatives, including the merger with ailing Heiwa Sogo.     "It's
  (Sumitomo) been bold in its strategies," said Kleinwort's Smithson.     "After that, it's a question of absorbing and juggling around. It will be the next decade before we see if the strategy is right or wrong."  REUTER 3;
-19870408	U.K. MONEY MARKET DEFICIT FORECAST AT 250 MLN STG The Bank of England said it forecast a shortage of around 250 mln stg in the money market today.     Among the main factors affecting liquidity, bills maturing in official hands and the take-up of treasury bills will drain some 505 mln stg, while bills for repurchase by the market will remove around 194 mln. In addition, a rise in note circulation and bankers' balances below target will each drain around 110 mln stg.     Partly offsetting these outflows, exchequer transactions will add some 690 mln stg to the system today.  REUTER 3;
-19870408	U.K. MONEY MARKET GIVEN 53 MLN STG ASSISTANCE The Bank of England said it provided the money market with 53 mln stg assistance in the morning session.     This compares with the bank's estimate of a shortage in the system of around 300 mln stg which it earlier revised up from 250 mln.     The central bank made outright purchases of bank bills comprising 46 mln stg in band three at 9-3/4 pct and seven mln stg in band four at 9-11/16 pct.  REUTER 3;
-19870408	U.K. MONEY MARKET GIVEN FURTHER 166 MLN STG HELP The Bank of England said it provided the market with further help totalling 166 mln stg during the afternoon.     In band one, it bought 31 mln stg of treasury bills and three mln stg of bank bills at 9-7/8 pct, while in band two it bought 69 mln stg of bank bills at 9-13/16 pct. In addition, it bought 63 mln stg of band three bank bills at 9-3/4 pct.     This brings the total assistance by the Bank so far today to 219 mln stg against a liquidity shortage it has estimated at around 300 mln stg.  REUTER 3;
-19870409	<EMCOR> COMPLETES SALE OF STOCK TO INVESTORS Emcore said it completed the sale of 4.1 mln dlrs of stock to Citicorp Venture Capital Ltd, Concord Ventures of Dillon Read and Co and private investors.  Reuter 3;
-19870409	<TRUMP PLAZA> 4TH QTR NET Net profit 2,529,000 vs loss 1,066,000     Revs 59.0 mln vs 52.6 mln     Year     Net profit 15.4 mln vs profit 865,000     Revs 247.0 mln vs 231.1 mln     NOTE: Company became wholly owned and operated by Donald Trump in May 1986, when he acquired 50 pct interest that had been owned by former operator Holiday Corp <HIA>.  Reuter 3;
-19870409	ABBOTT <ABT> SEES GAINS FROM WEAKER DOLLAR Abbott Laboratories Inc said its 1987 first quarter record results reflected continued productivity improvement, higher volume, better product mix and a weaker U.S. dollar.     Abbott reported 1987 first quarter earnings rose to a record 142 mln dlrs or 62 cts a share on record sales of one billion dlrs.     Research and development expenses, most of which was applied to diagnostic and pharmaceutical products, increased by 23 pct to 78 mln dlrs, it said.     Sales of pharmaceutical and nutritional products were 548 mln dlrs in the first quarter, up 17.6 pct over a year ago, Abbott said. Hospital and laboratory product sales in the first quarter rose 14.1 pct to 456 mln dlrs, it said.     First quarter sales in domestic markets advanced 11.5 pct to 688 mln dlrs while international sales jumped 27.1 pct to 316 mln dlrs, Abbott said.  Reuter 3;
-19870409	ADAMS EXPRESS CO <ADX> MARCH 31 ASSETS Shr 22.50 dlrs vs 21.74 dlrs     Assets 546.9 mln vs 485.2 mln     Shrs out 24.3 mln vs 22.3 mln     NOTE: lastest assets after capital gain distributions of 28 cts a share in February 1987 and 2.55 dlrs a share in December 1986  Reuter 3;
-19870409	AEGON EXPECTS MODERATE RISE IN 1987 PROFITS Dutch insurer AEGON NV <AEGN.AS> reported a 6.4 pct increase in 1986 net profits to 327.1 mln guilders and said it expected a moderate increase in profits for 1987.     Total revenue was eight pct lower in 1986 at 7.97 billion guilders vs 8.7 billion guilders in 1985. The company said its revenues were down due to lower foreign exchange rates and a change in accounting practice. It added that revenues would have risen by about seven pct had those changes not occurred.     Revenue from Dutch operations rose five pct in 1986, mainly due to its life insurance business.     Health insurance revenues in the Netherlands also rose despite a notable shift to insurances with lower premiums and higher personal risks.     Damage insurances made losses, mainly due to car damage insurances. AEGON did not specify the loss.     In the United States, revenue in guilders from health and life insurance was lower. AEGON said this was due to a change
  in accounting for U.S. Annuities.     AEGON said annuities are subject to such strong personal investment influences that it should be accounted differently from the more traditional insurances.     This change in accounting practice and another change to account for profits made on fixed interest investments, resulted in an incidental rise in net profits of 31 mln guilders.     AEGON said incidental negative influences on net profits were slightly higher, being the lower dollar rate, high initial costs for new products, and the cost of new headquarters in The Hague.     In 1986, a large number of new insurance products emerged in the Netherlands and the U.S., AEGON said. Large initial costs for these products have depressed net profits somewhat.     Monumental Corp, a U.S. Insurer which merged with AEGON in May 1986, saw its profits almost completely eroded by these costs and made only a small contribution to the group's profits.     AEGON said it has written-off 657 mln guilders 
 in goodwill for Monumental Corp.     AEGON's net equity was 2.71 billion guilders in December 1986, against 3.46 billion the year before.   REUTER 3;
-19870409	ALEX. BROWN <ABSB> SETS SPLIT, TO OFFER SHARES Alex. Brown Inc said it has declared a three-for-two stock split, payable May 29, record May 22.     The company also said it has filed to offer 912,000 common shares, including 162,000 to be sold by a shareholder, with company proceeds to be used for working capital and general corporate purposes.  Its Alex. Brown and Sons Inc subsidiary is lead underwriter.     The offering is expected to be made before the record date of the split, the company said.  Reuter 3;
-19870409	AMERICAN WOODMARK <AMWD> TO BUILD PLANT American Woodmark Corp said it plans to build a 100,000 square foot kitchen cabinet component plant in Toccoa, Ga., with completion expected in the spring of 1988.  Reuter 3;
-19870409	AMOSKEAG BANK SHARES INC <AMKG> 1ST QTR NET Shr 70 cts vs 67 cts     Net 6,416,000 vs 6,057,000     NOTE: Net includes pretax securities sales gains of 5,900,000 dlrs vs 5,900,000 dlrs.  Reuter 3;
-19870409	AMRO BANK PLANS 300 MLN GUILDER 6.75 PCT BONDS Amsterdam-Rotterdam Bank NV <AMRO.AS> said it plans to issue 300 mln 6.75 pct capital bonds due 1988/2007.     The bonds will be redeemable in 20 almost equal annual instalments starting June 1, 1988.     Early redemption is not permitted, the bank said.     The issue price will be announced no later than Wednesday, April 15. Subscriptions close on Thursday April 16 at 15.00 hrs local time. The coupon and payment date is June 1.     The bonds will be listed on the Amsterdam Stock Exchange.     A spokesman for the bank said the capital bonds were subordinated and had an average maturity of 10.5 years.     The bonds will be in denominations of 1,000 and 5,000 guilders.  REUTER 3;
-19870409	ANALYSTS DOUBT FED FIRMED DESPITE BORROWING RISE Economists said that they doubt the Federal Reserve is firming policy to aid the dollar, despite higher discount window borrowings in the latest two-week statement period and very heavy borrowings Wednesday.     Data out today show net borrowings from the Fed averaged 393 mln dlrs in the two weeks to Wednesday, up from 265 mln dlrs in the prior statement period. Wednesday borrowings were 1.4 billion dlrs as Federal funds averaged a high 6.45 pct.     "One could make a case that the Fed is firming, but it probably isn't," said William Sullivan of Dean Witter Reynolds.     Sullivan said some may assume the Fed has firmed policy modestly to support the dollar because net borrowings in the two-weeks to Wednesday were nearly 400 mln dlrs after averaging around 250 mln dlrs over the previous two months.     However, the Dean Witter economist noted that the latest two-week period included a quarter end when seasonal demand often pus
 hes up borrrowings.     "Some might argue that the Fed was firming policy, but it looks like it tried to play catchup with reserve provisions late in the statement period and didn't quite make it," said Ward McCarthy of Merrill Lynch Capital Markets.     A Fed spokesman told a press press conference today that the Fed had no large net one-day miss of two billion dlrs or more in its reserve projections in the week ended Wednesday.     Still, McCarthy said it may have had a cumulative miss in its estimates over the week that caused it to add fewer reserves earlier in the week than were actually needed.     The Fed took no market reserve management action last Thursday and Friday, the first two days of the week. It added temporary reserves indirectly on Monday via two billion dlrs of customer repurchase agreements and then supplied reserves directly via System repurchases on Tuesday and Wednesday.     Based on Fed data out today, economists calculated that the two-day System repurchase
  agreements the Fed arrranged on Tuesday totaled around 5.9 billion dlrs. They put Wednesday's overnight System repos at approximately 3.4 billion dlrs.     "It is quite clear that the Fed is not firming policy at this time," said Larry Leuzzi of S.G. Warburg and Co Inc.     Citing the view shared by the other two economists, Leuzzi said the Fed cannot really afford to seriously lift interest rates to help the dollar because that would harm already weak economies in the United States and abroad and add to the financial stress of developing countries and their lenders.     "Those who believe the Fed tightened policy in the latest statement period have to explain why it acted before the dollar tumbled," said McCarthy of Merrill Lynch.     He said the dollar staged a precipitous drop as a new statement period began today on disappointment yesterday's Washington meetings of international monetary officials failed to produce anything that would offer substantive dollar aid.     In fact, 
 currency dealers said there was nothing in Wednesday's G-7 communique to alter the prevailing view that the yen needs to rise further to redress the huge trade imbalance between the United States and Japan.     The economists generally agreed that the Fed is aiming for steady policy now that should correspond to a weekly average Fed funds rate between six and 6-1/8 pct. This is about where the rate has been since early November.     "I'm not so sure that the Fed is engineering a tighter policy to help the dollar, as some suspect," said Sullivan of Dean Witter.     If it is, however, he said that Fed probably has just nudged up its funds rate goal to around 6.25 to 6.35 pct from six to 6.10 pct previously.  Reuter 3;
-19870409	ANCHOR FINANCIAL <AFCX> TO MAKE ACQUISITION Anchor Financial Corp said it has agreed to acquire Waccamaw State Bank of Surfside Beach, S.C., in an exchange of 1.435 Anchor shares for each Waccamaw share, subject to regulatory and shareholder approvals.     Waccamaw had assets of 22.8 mln dlrs as of March 31.  Reuter 3;
-19870409	ARGENTINE 1986/87 GRAIN OILSEED REGISTRATIONS Argentine grain board preliminary figures show 1986/87 crop export registrations of grains and oilseeds in the week to April 8, were as follows, in tonnes, compared with the previous week and the comparable week a year earlier.     BREAD WHEAT         nil        nil       nil     MAIZE              113,500    21,800    51,300     SORGHUM             13,600      nil     26,500     SOYBEAN             30,000    36,000    72,000     SUNFLOWERSEED        nil        nil     19,100     Cumulative figures export registrations for the 1986/87 crop to April 8, 1987, with comparative figures for the 1985/86 crop up to April 9, 1986, in brackets, were in thousands of tonnes.     BREAD WHEAT            2,692,4    (4,161.0)     MAIZE                  2,305.1    (5,200.0)     SORGHUM                  220.5      (625.7)     SOYBEAN                  561.3      (524.5)     SUNFLOWERSEED             45.7      (213.2)  REUTER 3;
-19870409	ARGENTINE CATTLE MARKET REPORT ABOUT 3,314 HEAD OF CATTLE WERE AUCTIONED IN LINIERS CATTLE MARKET, AGAINST 13,952 ON WEDNESDAY AND 9,217 LAST THURSDAY, TRADE SOURCES SAID.     MAXIMUN PRICES, IN AUSTRALES PER KILO, WITH DOLLAR EQUIVALENT IN BRACKETS, INCLUDED:                                TODAY     WEDNESDAY     STEERS OVER 480 KILOS   1.02(0.658) 1.015(0.654)     STEERS 460 TO 480 KILOS 1.05(0.677) 1.032(0.665)     COWS FOR CANNING        0.56(0.361) 0.56 (0.361) REUTER 3;
-19870409	ARGENTINE GRAIN BELT WEATHER REPORT ARGENTINE GRAIN BELT TEMPERATURES (CENTIGRADE) AND RAIN (MM) IN THE 24 HOURS TO 12.00 GMT WERE:     ...............MAX TEMP..MIN TEMP..RAINFALL     BUENOS AIRES.......24.......12............0     BAHIA BLANCA.......22........7............0     TRES ARROYOS.......22........8............0     TANDIL.............22........7............0     JUNIN..............24.......11............0     SANTA ROSA.........--........6............0     CORDOBA............23.......12............1     SANTA FE...........21.......18...........17 REUTER 3;
-19870409	ARGENTINE GRAIN MARKET REVIEW The Argentine grain market was quiet in the week to Wednesday, with prices rising slightly on increased interest in wheat, millet and birdseed.     Wheat for domestic consumption rose six Australs per tonne to 118.     For export it rose eight to 108 per tonne from Bahia Blanca, increased 0.50 to 104 at Necochea and was unchanged at Rosario at 108.30.     Maize increased one to 90 per tonne at Buenos Aires, was unchanged at 82 in Bahia Blanca, increased 0.50 to 85 at Necochea and fell one to 88 at Parana River ports.     Sorghum from Bahia Blanca increased 0.50 Australs to 76.50 per tonne and dropped one to 75 at Rosario.     It was quoted at 75 at Villa Constitucion, San Nicolas and Puerto Alvear.     Oats were unchanged at 168 per tonne at Buenos Aires.     Millet from Buenos Aires and Rosario rose five per tonne to 140 and birdseed rose 15 to 205 at Buenos Aires.  REUTER 3;
-19870409	ARUS <ARSCC> GETS 5.2 MLN DLR ORDER Arus Corp said it has received a letter of intent from Winston Financial Corp for the purchase of over 5,200,000 dlrs in telephone diagnostic testing equipment.     It said it expects to negotiate a firm order in May.     The company said the total value of the order is at least 5,200,000 dlrs and could be more, depending on circuit configurations required.  Reuter 3;
-19870409	ASARCO UPS U.S. LEAD PRICE 0.50 CT TO 26.50 CTS Asarco Inc said it is increasing its base spot sales price for refined lead by one-half cent to 26.50 cents a lb, FOB, delivered in carload lots, effective immediately.  Reuter 3;
-19870409	ASSETS OF U.S. MONEY FUNDS ROSE IN WEEK Assets of money market mutual funds increased 1.39 billion dlrs in the week ended yesterday to 236.77 billion dlrs, the Investment Company Institute said.     Assets of 93 institutional funds were up 481.1 mln dlrs to 65.65 billion dlrs, 93 broker-dealer funds rose 285.3 mln dlrs to 107.31 billion dlrs, and 197 general purpose funds gained 625.5 mln dlrs to 63.8 billion dlrs.  Reuter 3;
-19870409	AUSTRALIAN UNIONS AND NSW GOVERNMENT REACH DEAL Union and New South Wales government officials have reached a compromise in a dispute over workers compensation, averting increased industrial action in the state, union sources said.     But some unions, including those of building and mining workers, said they were dissatisfied with the deal and would continue their strikes for a few more days.     State officials said the government had agreed to revise its proposals to cut compensation and would allow slightly higher cash benefits for injured workers.     Under the original proposal, which sparked strikes and other industrial action in the state on April 7, workers' compensation would have been cut by one third. Full details of the compromise package are not yet known.     The Labour Council, affiliated to the Australian Council of Trade Unions (ACTU), had threatened to paralyse New South Wales unless the government modified its pending legislation on the issue.     State 
 officials said the only sectors affected in the past three days were some government building projects, railway freight movement and cargo handling in Sydney's ports.  REUTER 3;
-19870409	AVERAGE YEN CD RATES FALL IN LATEST WEEK Average interest rates on yen certificates of deposit (CD) fell to 4.13 pct in the week ended April 8 from 4.33 pct the previous week, the Bank of Japan said.     New rates (previous in brackets) -     Average CD rates all banks 4.13 pct (4.33)     Money Market Certificate (MMC) ceiling rates for week starting from April 13 -       3.38 pct (3.58)     Average CD rates of city, trust and long-term banks -     Less than 60 days          4.15 pct (4.41)     60-90 days                 4.14 pct (4.29)     Average CD rates of city, trust and long-term banks -     90-120 days                4.12 pct (4.25)     120-150 days               4.12 pct (4.23)     150-180 days               unquoted (4.03)     180-270 days               4.05 pct (4.05)     Over 270 days              4.05 pct (unqtd)     Average yen bankers acceptance rates of city, trust and long-term banks -     30 to less than 60 days    3.98 pct (4.20)     60-90 days            
      4.03 pct (3.97)     90-120 days                unquoted (unqtd)  REUTER 3;
-19870409	BANK OF FRANCE LEAVES INTERVENTION RATE UNCHANGED The Bank of France said it left its intervention rate unchanged at 7-3/4 pct when it injected funds in the market against first category paper in today's money market intervention tender.     Money market dealers had earlier expressed mixed views on the possibility of quarter point cut.     The rate was last adjusted on March 9, when it was cut to 7-3/4 pct from the eight pct rate set in January.  REUTER 3;
-19870409	BANK OF FRANCE TO HOLD MONEY MARKET TENDER TODAY The Bank of France said it has invited offers of first category paper today for a money market intervention tender.     Money market operators were divided over whether the Bank of France will use to occasion to cut its intervention rate, which has stood at 7-3/4 pct since March 9.     Some thought a price cut unlikely while others said there was room for a further 1/4 point cut by the bank.  REUTER 3;
-19870409	BANK OF JAPAN BUYS DOLLARS IN TOKYO, DEALERS SAY The Bank of Japan bought a modest amount of dollars at around 145.10 yen just after the market here opened, dealers said.     Just before the opening, the dollar dropped swiftly as speculators concluded the Group of Seven (G-7) comminuique issued in Washington contained nothing basically new, they said. It fell about a half yen, to around 145.     The G-7 reaffirmed that their currencies around current levels reflect economic fundamentals.     One dealer said the Bank of Japan probably intervened in Australia before the opening here, but could not confirm this.  REUTER 3;
-19870409	BANKERS TRUST <BT> FILES 400 MLN DLR OFFERING Bankers Trust New York Corp filed with the Securities and Exchange Commission for a shelf offering of up to 400 mln dlrs of subordinated debentures on terms to be set at the time of sale.     The bank holding company said proceeds will be used for general corporate purposes including investments in or extensions of credit to its subsidiaries.     Underwriters were not named in the draft prospectus.  Reuter 3;
-19870409	BANKS OF MID-AMERICA INC <BOMA> 1ST QTR NET Shr loss 18 cts vs loss 89 cts     Net profit 161,000 vs loss 5,938,000     Assets 3.43 billion vs 3.46 billion     Deposits 2.68 billion vs 2.67 billion     Loans 1.45 billion vs 1.64 billion     Note: Shr data after payment of preferred dividends.  Reuter 3;
-19870409	BAYBANKS INC <BBNK> 1ST QTR NET Oper shr 1.08 dlrs vs 96 cts     Oper shr diluted 1.02 dlrs vs 89 cts     Oper net 16.1 mln vs 12.8 mln     Avg shrs 14.9 mln vs 13.4 mln     Avg shrs 16.1 mln vs 14.8 mln     NOTE: 1987 net excludes gain 4,820,000 dlrs from cumulative effect of change in calculating depreciation expense.  Reuter 3;
-19870409	BELGIAN CURRENT ACCOUNT SURPLUS WIDENS IN 1986 Belgium's current account surplus, measured on a cash basis, widened sharply to 134.9 billion francs last year from 17.5 billion in 1985, the Finance Ministry said.     The increase was due almost entirely to a sharp rise in the goods trade surplus to 126.1 billion francs from 20.4 billion.     The services trade surpluses increased to 52.4 billion francs from 38.9 billion while the deficit on transfers rose slightly to 43.6 billion from 41.8 billion.     Private sector capital operations showed a steeply higher deficit of 160.7 billion francs after 56.9 billion in 1985.  Reuter 3;
-19870409	BELGIUM LAUNCHES BONDS WITH GOLD WARRANTS The Kingdom of Belgium is launching 100 mln Swiss francs of seven year notes with warrants attached to buy gold, lead manager Credit Suisse said.     The notes themselves have a 3-3/8 pct coupon and are priced at par. Payment is due April 30, 1987, and final maturity April 30, 1994.     Each 50,000 franc note carries 15 warrants. Two warrants are required to allow the holder to buy 100 grammes of gold at a price of 2,450 francs, during the entire life of the bond.     The latest gold price in Zurich was 2,045/2,070 francs per 100 grammes.  Reuter 3;
-19870409	BELGIUM LAUNCHES BONDS WITH GOLD WARRANTS The Kingdom of Belgium is launching 100 mln Swiss francs of seven year notes with warrants attached to buy gold, lead mananger Credit Suisse said.     The notes themselves have a 3-3/8 pct coupon and are priced at par. Payment is due April 30, 1987 and final maturity April 30, 1994.     Each 50,000 franc note carries 15 warrants. Two warrants are required to allow the holder to buy 100 grammes of gold at a price of 2,450 francs, during the entire life of the bond.     The latest gold price in Zurich was 2,045/2,070 francs per 100 grammes.  REUTER 3;
-19870409	BELGIUM TO ISSUE GOLD WARRANTS, SOURCES SAY Belgium plans to issue Swiss franc warrants to buy gold, with Credit Suisse as lead manager, market sources said.     No confirmation or further details were immediately available.  REUTER 3;
-19870409	BERLINER BANK ISSUES 50 MLN AUSTRALIAN DLR BOND Berliner Bank AG Berlin is issuing a 50 mln Australian dlr eurobond due November 13, 1990 paying 14-1/4 pct and priced at 101-1/2 pct, lead manager Banque Paribas Capital Markets said.     The non-callable bond is available in denominations of 1,000 Australian dlrs and will be listed in Luxembourg. The selling concession is one pct while management and underwriting combined pays 5/8 pct.     The payment date is May 13 and there will be a long first coupon period.  REUTER 3;
-19870409	BERMUDA SEEKS 40 MLN DLR REVOLVING CREDIT The Government of Bermuda is seeking a 40 mln dlr, seven year revolving credit, which will be the only credit outstanding in its own name, N.M. Rothschild and Sons Ltd said as arranger and agent.     The credit will pay a margin of 20 basis points over U.S. Dollar London Interbank Offered Rates (LIBOR) and will incorporate a tender panel for U.S. Dlr advances.     There is a 10 basis point annual facility fee in years one to four, rising to 12-1/2 points thereafter.  A 7-1/2 basis point participation fee is payable on the transaction, which started syndication this week.  Reuter 3;
-19870409	BEVIS <BEVI> RECEIVES TAKEOVER INQUIRIES Bevis Industries Inc, which has been seeking to be acquired, said it recently received inquiries concerning the purchase of the company.     The company did not identify the parties that made the inquiries, but it said they had been referred to its investment bankers, Tucker, Anthony and R.L. Day Inc, for study.     On March 18, the company said it engaged Tucker, Anthony to seek purchasers of its operating units, Greenville Tube Corp and MD Pneumatics Inc.  Reuter 3;
-19870409	BFIM-SOVAC OFFERS BOND REDEMPTION Banque de Financement Immobilier SOVAC, BFIM-SOVAC, launched an offer to repurchase its 14.30 pct 1980 bond issue at a price of 2,180 francs per bond, a Paris Bourse statement said.     The repurchase offer, managed by Lazard Freres et Cie, opens April 10 and closes April 27. The 140 mln franc issue comprised 70,000 bonds of 2,000 franc nominal value each.  Reuter 3;
-19870409	BOND INTERNATIONAL SELLS H.K. RESIDENTIAL BUILDING <Bond Corp International Ltd> said it has sold a residential block at Hong Kong's mid-levels to a joint venture between Sun Hung Kai Properties Ltd <SHKP.HK> and <New Town (N.T.) Properties Ltd> for 138 mln H.K. Dlrs.     Bond International, a subsidiary of the Australia based Bond Corp Holdings Ltd <BONA.S>, will receive net profits of about 16 mln dlrs from the deal.     The firm bought the building, which has total floor spaces of 110,580 sq ft and is now fully let, as part of a parcel of properties which it acquired from Hongkong Land Co Ltd <HKLD.HK> for 1.43 billion dlrs late last year.  REUTER 3;
-19870409	BRAMALL TO ACQUIRE GELCO FOR UP TO 26.3 MLN DLRS <C.D. Bramall Plc> said in a statement accompanying its annual results that it proposed to acquire Gelco U.K. For some 26.3 mln dlrs.     Part of the cost will be met by the issue of 2.14 mln new ordinary Bramall shares which are being placed at 265p each.     The acquisition will be satisfied by an initial payment of some 25.3 mln dlrs in cash with further payments of 500,000 dlrs up to a maximum 26.3 mln dlrs. These further payments will only be made if profits achieved by Gelco for the year ending July 31, 1987 reach a certain level.     Bramall shares were trading 6p lower at 278p.  REUTER 3;
-19870409	BRAZIL COCOA EXPORTERS UNLIKELY TO LIMIT SALES Brazilian cocoa exporters are not likely to follow the example of Cocoa Producers Alliance, CPA, members, who may limit sales of the product in an effort to boost world prices, trade sources said.     They said a similar procedure was taken in the past in Brazil and that it did not work out according to plans.     "The cocoa market is completely free. Unlike coffee, which is controlled through export registrations, cocoa exporters in Brazil operate at their own free will," a trade source said.     The traders were responding to questions whether they would follow the example of CPA members meeting in Yaounde.     The sources said the Banco do Brasil's Foreign Trade Department, CACEX, never interferes in the cocoa market by rejecting sales that do not meet certain price or shipment criteria.     "The position of local producers is always to negotiate as they please. If they buy for ten and sell for eleven and think it's a good d
 eal, they are free to go ahead," one source added.  Reuter 3;
-19870409	BRAZIL COTTON CROP LOWER -- USDA REPORT Brazil's 1986/87 cotton crop estimate has been reduced to 710,000 from 735,000 tonnes (lint basis), the U.S. Agriculture Department's officer in Sao Paulo said in a field report.     The report, dated April 7, said the reduction is based on an expected smaller harvest in the center-south region.     The center-south crop is now estimated at 550,000 tonnes -- 25,000 tonnes below the previous estimate.     Hot, dry weather during part of January and excessive rains in some areas in February reduced yield prospects and may have affected quality, the report said.     Nearly 60 pct of the crop has been harvested in Parana and slightly less in Sao Paulo, it said. Cotton entering gins is of fairly good quality, according to trade sources, it said.  Reuter 3;
-19870409	BRAZIL SOYBEAN YIELDS SEEN AVERAGE - USDA REPORT Based on field travel in the Brazilian state of Parana, soybean yields should be about average or 2.0 to 2.2 tonnes per hectare, the U.S. Agriculture Department's officer in Sao Paulo said in a field report.     The report, dated March 24, noted Parana accounts for about 20 to 24 pct of Brazil's total soybean crop.     It said generally favorable weather from early December through February helped compensate for earlier dryness.     However, hot, dry weather during the past 20 to 30 days followed by an unseasonably brief cold spell during the second week of march has raised concern about late planted soybeans which are still immature, but the impact may be localized, the report said.     The corn crop is expected to be a record and will create serious storage problems, the report said.     Due to favorable support prices, corn area increased by more than 25 pct at the expense of soybeans, and yields are expected to be above a
 verage, it said.     Due to late plantings only about 20 pct of the corn crop crop has been harvested.     During the field trip long truck lines were noted at grain elevators where preference is given to soybeans over corn, the report said.     New crop wheat plantings are expected to decline  -- Parana accounts for about 60 pct of total production. Major reasons for the decline are expected reduced government support price and good summer crop harvests.  Reuter 3;
-19870409	BRAZILIAN SOY RAINFALL THE FOLLOWING RAINFALL WAS RECORDED IN THE 24 HOURS UP TO (1200) GMT TODAY     PARANA STATE: CASCAVEL NIL, PONTA GROSSA NIL,CAMPO MOURAO NIL, LONDRINA NIL, MARINGA NIL.     RIO GRANDO DO SUL STATE: PASSO FUNDO NIL, SANTA MARIA 7.0 MILLIMETRES, CRUZ ALTA 8.5 MM, SAO LUIZ GONZAGA 4.4 MM. REUTER 3;
-19870409	BRENDA MINES SELLING KERR ADDISON SHARES <Brenda Mines Ltd> said it sold 2,830,390 <Kerr Addison Mines Ltd> shares to a group of underwriters led by Wood Gundy Inc and Brown, Baldwin Nisker Ltd for redistribution.     Financial terms were undisclosed.  Reuter 3;
-19870409	BRITISH AIRWAYS ISSUES 100 MLN STG EUROBOND British Airways Plc <BAB.L> is issuing a 100 mln stg eurobond due May 6, 1997, paying 9-1/2 pct and priced at 101-1/2, lead manager Union Bank of Switzerland said.     The non-callable bond is available in denominations of 1,000 and 10,000 stg and will be listed in London. The selling concession is 1-1/4 pct while management and underwriting combined pays 3/4 pct.     Payment date is May 6.  REUTER 3;
-19870409	BUNDESBANK SEES NO CHANGE IN MONETARY COURSE The Bundesbank sees no current reason to change monetary course, vice-president Helmut Schlesinger told Reuters in a telephone interview.     Schlesinger was responding to questions following remarks yesterday by Bundesbank board member Claus Koehler and West Berlin state central bank president Dieter Hiss, which, dealers said, revived some speculation that German interest rate cuts may once again be under discussion.     Schlesinger said he had no comment on the remarks of his two central bank council colleagues.     But he added that the last central bank council meeting on April 2 had discussed the economic situation with a mood of "subdued optimism," particularly influenced by the news brought by several state central bank presidents.     "Much is going better than the impression gained by the public from the January figures, which have been in the meantime superseded," he said.     German January industrial output fell 3.0 p
 ct after a decline of 0.9 pct in December. New industry orders fell 1.9 pct after they had been unchanged in December.     Bank economists said that the two together showed the economy would either stagnate or contract in the first quarter of 1987.     Aside from the economic developments, Schlesinger added, a steady monetary course was important to hold the dollar/mark rate around current levels as Bundesbank president Karl Otto Poehl had said while attending the Washington World Bank/IMF meeting.     Asked, however, if the Bundesbank could move to cut rates on repurchase agreements at the setting of the next repurchase tender, due next Tuesday, Schlesinger said, "Since the central bank council gives its opinion on this theme only every 14 days, this is hardly probable."     Responding to the question whether the Bundesbank had moved away from a policy of targetting monetary growth toward one of targetting currency rates, Schlesinger said he could have no comment on the subject whi
 le negotiations were still in progress in Washington.  REUTER 3;
-19870409	BURLINGTON INDUSTRIES <BUR> SELLS CONVERTIBLES Burlington Industries Inc is raising 75 mln dlrs through an offering of convertible subordinated debentures due 2012 with a 6-1/4 pct coupon and par pricing, said lead manager Kidder, Peabody and Co Inc.     The debentures are convertible into the company's common stock at 63.50 dlrs per share, representing a premium of 18.1 pct over the stock price when terms on the debt were set.     Non-callable for three years, the issue is rated Ba-2 by Moody's Investors Service Inc and BBB by Standard and Poor's Corp. Merrill Lynch Capital Markets and Salomon Brothers Inc co-managed the deal.  Reuter 3;
-19870409	BURMAH OIL PROSPECTS REMAIN FAVOURABLE The current year has opened well, with trading prospects remaining favourable, Burmah Oil Co Plc <BURM.L> said in a statement with its 1986 results.     The company plans to maintain a steady rate of investment in its marketing operations and to obtain improved profit margins on its liquified natural gas, LNG, project.     Burmah has the financial capacity to continue making acquisitions within its business sectors, it added. The rationalisation programme, including sale of the Bahamas oil terminal and all peripheral activities, is now complete.     Pre-tax profit for 1986 rose to 105.9 mln stg from 79.6 mln. REUTER^M 3;
-19870409	C.O.M.B. <CMCO> MAKES ACQUISITION C.O.M.B. Co said it acquired for 8.7 mln dlrs the principal assets of National Tech Industries Inc and Telkon Corp.     The companies are engaged in servicing, sales and telemarketing of consumer electronic merchandise.  Reuter 3;
-19870409	C.O.M.B. <CMCO> MAKES ACQUISITION C.O.M.B. Co said it has acquired the principal assets of National Tech Industries Inc and Telkom Corp, which are engaged in the sale and telemarketing of consumer electronic merchandise and do business as House of Imports and N.L. Industries respectively.     The company said it paid a total of 8,700,000 dlrs, including the assumption of liabilities.     National Tech had sales of about 23 mln dlrs for 1986, it said.  Reuter 3;
-19870409	CADILLAC FAIRVIEW SAYS IT RECEIVED TAKEOVER BIDS <Cadillac Fairview Corp Ltd> said it received proposals to acquire the company, following its announcement last August that it had retained investment dealers to solicit offers for all outstanding common shares.     Cadillac Fairview said the offers are subject to clarification and negotiation and offered no further details.  Reuter 3;
-19870409	CANADA FEBRUARY TRADE SURPLUS 1.2 BILLION DLRS Canada had a trade surplus of 1.25 billion dlrs in February compared with an upward revised 623 mln dlrs surplus in January, Statistics Canada said.     The January surplus originally was reported at 533 mln dlrs. The February surplus last year was 189 mln dlrs.     February exports, seasonally adjusted, were 10.44 billion dlrs against 9.85 billion in January and 10.05 billion in February, 1986.     February imports were 9.19 billion dlrs against 9.23 billion in January and 9.86 billion in February, 1986.  Reuter 3;
-19870409	CANADA TRADE RISE SEEN AS START OF RECOVERY Canada's trade picture has brightened considerably, underscoring economists' predictions the sector would post a long awaited recovery this year.     The federal government reported today that the monthly surplus soared to 1.25 billion Canadian dlrs in February, double January's 623 mln dlrs surplus and sharply higher than February 1986's 189 mln dlr tally.     "Hopefully it's the beginning of a trend," said Richardson Greenshields of Canada Ltd economist Susan Clark in Toronto.     Economists generally don't expect such large gains over the next months, but are looking for an upward trend throughout the year.     "We thought the trade balance would improve ... over the year, and it certainly looks as if this morning's figure is indicative of that," commented economist James Donegan at the Toronto securities firm of Midland Doherty Ltd.     Statistics Canada reported the surplus was driven by a 23 pct gain in automobile product ex
 ports to a record 3.2 billion dls in the month.     "Recovery in the automotive sector helped push the value of exports up by 5.9 pct in February," the agency said in its monthly report.     Total exports expanded to 10.44 billion dlrs from 9.85 billion dlrs in February, while imports slipped to 9.19 billion dlrs from 9.23 billion dlrs.     Economists have predicted the 1987 trade surplus would end up three to five billion dlrs higher than last year's dismal 10.1 billion dlr total. In 1985 the surplus was 17.48 billion dlrs.     Money market analysts said the positive trade news touched off a modest rally in the Canadian dollar, which rose to 76.85 U.S. cts on North American markets early this morning after closing at 76.58 cts Wednesday.     The currency was hovering around 76.78 cts in early afternoon trading.     Economists have been banking on an improved trade performance this year to stimulate an otherwise sluggish Canadian economy.     Money market analysts said the positive 
 trade news touched off a modest rally in the Canadian dollar, which rose to 76.85 U.S. cts on North American markets early this morning after closing at 76.58 cts Wednesday.     The currency was hovering around 76.78 cts in early afternoon trading.     Economists have been banking on an improved trade performance this year to stimulate an otherwise sluggish Canadian economy.     They say the country's consumers, who have been spending at a torrid pace in recent years, will sharply curtail outlays this year and this should help curtail the flow of imports into the country.     Meanwhile, demand for Canadian exports in the United States, by far the country's largest market, is expected to be strong as a result of a projected rise in American consumer spending and the relatively low value of the Canadian currency.     "We maintain what's going to drive Canada's export performance is income growth in the U.S.," said Midland's Donegan.     But at the Bank of Nova Scotia, deputy chief eco
 nomist Warren Jestin was less optimistic about the U.S. outlook and said it could be a mistake to read too much into February's trade upturn.     Jestin said, "Given the fact the U.S. economy is showing signs of weakening--particularly car sales--it would indicate that part of the strength (in Canada's trade figures) is probably transitory."  Reuter 3;
-19870409	CANADIAN BANK RATE RISES IN WEEK Canada's key bank rate rose to 7.20 pct from 7.15 pct the week before, Bank of Canada said.     Bank rate is set 1/4 percentage point above the average yield on the weekly issue of 91-day treasury bills. This week's yield was 6.95 pct compared with the previous week's 6.90 pct.     Tenders were accepted for 2.55 billion dlrs of 91-day bills at an average price of 98.296 dlrs against 98.310 dlrs last week.     The 1.40 billion dlrs of 182-day bills were priced at an average 96.488 dlrs against 96.549 dlrs last week, to yield an average 7.30 pct, versus 7.17 pct last week.     The 500 mln dlrs of 364-day bills were priced at an average 92.969 dlrs against 93.159 dlrs last week, to yield an average 7.58 pct versus 7.38 pct last week.     Tenders will be received next week for 2.50 billion dlrs of  91-day bills, 1.40 billion dlrs of 182-day bills and 500 mln dlrs of 364-day bills.            Reuter 3;
-19870409	CANAM MANAC WINS 8.5 MLN DLR CONTRACT (The Canam Manac Group Inc) said its Canam Steel Works unit received a contract valued at 8.5 mln dlrs to supply steel trusses to (Canron Inc) for a new car plant in Ingersoll, Ontario.     Canam Manac said it will produce the trusses at its Quebec and Ontario plants and delivery will be completed by August.  Reuter 3;
-19870409	CANNON INT'L <CAN> SETS PHILIPPINES FILM PACT Cannon International said <Viva Films International> agreed to exclusively distribute Cannon films in the Philippines for the new four years.     The company said the agreement covers both theatrical and video distribution. Terms were not disclosed.   Reuter 3;
-19870409	CARGILL CONFIRMS WHITE SUGAR SALE TO INDIA London-based trader Cargill (U.K.) Ltd confirmed it sold one cargo of white sugar to India for shipment April 15/May 15 at yesterday's tender.     Price details were not immediately available but some traders suggested business had been done around 220 dlrs a tonne cif.     India tendered for one or two cargoes of white sugar. There was no specific requirement on shipping period.  REUTER 3;
-19870409	CCC GUARANTEES TO IRAQ SWITCHED --USDA The Commodity Credit Corporation (CCC) has transferred 12.0 mln dlrs in credit guarantees previously earmarked for sales of U.S. hatching eggs and 7.0 mln dlrs in guarantees for breeder livestock to increase coverage on sales of U.S. protein concentrates to Iraq, the U.S. Agriculture Department said.     The action was taken at the request of Iraq's State Trade Organization for Grains and Foodstuffs and reduces the line for hatching eggs to zero and the line for breeder livestock from 15.0 mln dlrs to 8.0 mln dlrs, the department said.     The guarantee line for sales of protein concentrates has been increased from 25.0 mln dlrs to 44.0 mln dlrs, it said.      Reuter 3;
-19870409	CCF REPORTS 34.8 PCT PROFIT BOOST, SHARE SPLIT SEEN Credit Commercial de France <CCFP.PA> reported a parent company net profit up 34.8 pct to 140.1 mln francs from 103.9 mln francs a few weeks before its denationalisation around the end of this month.     Official sources said the bank, France's sixth largest in terms of its deposits and seventh in terms of its assets,  planned a share split to increase the number of shares on offer ahead of the sale of 40 pct of its ordinary share capital to the public, of 10 pct to staff and 20 pct abroad.     Previously one of France's biggest private banks, it was nationalised by the Socialists in 1982.     The sources said it was too early to give details of the planned split or of the share price, but cited April 27 as a likely date for the flotation launch.     So far 30 pct of the group's capital, currently at 10.33 mln shares of 100 francs nominal, has been offered for sale to large private investors to constitute a solid core of e
 ight to ten shareholders before the flotation.     The private tender offer closes on April 16, while a 12 mln franc advertising campaign for the flotation begins on Sunday. "The privatisation will be a way of attracting extra clients," CCF deputy director-general Rene de la Serre told Reuters.     Market sources put the total value of CCF's privatisation at between four and five billion francs.     De la Serre said the bank was likely to attract at least the same number of investors as <Sogenal>, another recently privatised bank in which 850,000 people bought shares.     The government's sweeping privatisation programme has also included the sale of Saint-Gobain <SGEP.PA>, and Cie Financiere de Paribas <PARI.PA>. The sale of <Banque du Batiment et des Travaux Publics> and <Banque Industrielle et Mobiliere Privee> should be completed this month, while third largest French bank Societe Generale <SGEN.PA> will be privatised later this year.  REUTER 3;
-19870409	CENTEL <CNT> COMPLETES ACQUISITION Centel Corp said it completed the acquisition of Welbac Cable Television Corp, which serves more than 2,500 cable television subscribers in east central Michigan.     Terms were not disclosed.     With the addition of Welbac customers, Centel Cable Television Co of Michigan serves more than 83,000 customers. Overall, Centel has nearly 495,000 customers in seven states.  Reuter 3;
-19870409	CENTEL <CNT> SELLS DEBENTURES AT 9.233 PCT Centel Corp is raising 50 mln dlrs through an offering of debentures due 2017 yielding 9.233 pct, said lead manager Smith Barney, Harris Upham and Co Inc.     The debentures have a 9-1/8 pct coupon and were priced at 98.90 to yield 117 basis points over comparable Treasury securities.     Non-callable for five years, the issue is rated A-3 by Moody's Investors Service Inc and A by Standard and Poor's Corp.     E.F. Hutton and Co Inc and UBS Securities Inc co-managed the deal.  Reuter 3;
-19870409	CERTIFICATED COTTON STOCKS Certificated cotton stocks deliverable on the New York Cotton Exchange No 2 cotton futures contract as of April 8 were reported at 34,661 bales, down 421 bales from the previous day's figure. There were no bales awaiting review and 1,218 bales awaiting decertification.  Reuter 3;
-19870409	CHICAGO PACIFIC <CPAC> SELLS CONVERTIBLE DEBT Chicago Pacific Corp is raising 150 mln dlrs through an offering of convertible subordinated debentures due 2012 with a 6-1/2 pct coupon and par pricing, said lead manager Goldman, Sachs and Co.     The debentures are convertible into the company's common stock at 62.50 dlrs per share, representing a premium of 25.63 pct over the stock price when terms on the debt were set.     Non-callable for two years, the issue is rated B-1 by Moody's Investors Service Inc and B by Standard and Poor's Corp. First Boston Corp and Lazard Freres and Co co-managed the deal.  Reuter 3;
-19870409	CHILEAN TRADE SURPLUS NARROWS SLIGHTLY IN FEBRUARY chile's trade surplus narrowed to 102.2 mln dlrs in february, from 105.4 mln dlrs in the same month last year, but it was above the 18.2-mln-dlr surplus recorded in january 1987, the central bank said.     Exports in february totalled 379.4 mln dlrs, 17.2 pct above the january figure. Imports fell 9.2 pct from the previous month to 277.2 mln dlrs. The figures for the same month last year were 314 mln and 208.6 mln dlrs, respectively.     The accumulated trade surplus over the first two months of 1987 stands at 120.4 mln dlrs against 132.8 mln dlrs the previous year.  Reuter 3;
-19870409	CHINA LIGHT UNIT RENEWS COMMERCIAL PAPER FACILITY <Kowloon Electricity Supply Co Ltd>, a joint venture of China Light and Power Co Ltd <CLPH.HK> and Exxon Corp <XON>, has renewed and increased an existing commercial paper program, arranger <Schroders Asia Ltd> said.     The fully underwritten program, which expires this month, has been extended to December 1990 and increased to 540 mln H.K. Dlrs from the original 500 mln dlrs, it said.     The underwriting fee is 1/8 of a percentage point over the Hong Kong interbank offered rate.     Commercial paper in tenures of one to three months will be issued in denominations of one mln dlrs, it said.     The program offers a U.S. Dlr option whereby commercial paper in denominations of 100,000 U.S. Dlrs will be issued subject to the same underwriting margin.     Joining Schroders as underwriters are Barclays Bank Plc, Citicorp International Ltd, Paribas Asia Ltd, Sanwa International Finance Ltd and Sumitomo Finance (Asia) Ltd.     Th
 e six underwriters will be joined by 11 other financial institutions in the tender panel.  REUTER 3;
-19870409	CHINA'S WHEAT CROP THREATENED BY PESTS, DISEASE Pests and disease, which destroyed 1.1 mln tonnes of wheat in China in 1986, are threatening crops on 11.64 mln hectares this year, the China Daily said.     About 14.54 mln hectares of wheat were affected in 1986.     The paper said abnormal weather conditions had encouraged the spread of wheat midges in 2.47 mln hectares in Shanxi, Henan, Sichuan, Anhui, Hebei and Jiangsu.     In Henan, Shandong and Hebei wheat aphids are affecting 4.67 mln hectares, wheat red mite 2.8 mln hectares and wheat powdery mildew 1.7 mln hectares.  REUTER 3;
-19870409	CHINESE BANK TO MAKE FIRST FOREIGN BORROWING The state-owned People's Construction Bank of China is making its first foreign borrowing, 300 mln dlrs to finance a large ethylene plant in Shanghai, the People's Daily said.     The newspaper's overseas edition said the plant will produce 300,000 tonnes of ethylene a year.     It said the bank last year started foreign exchange services for the first time on an experimental basis in Shenzhen, Zhuhai and Xiamen, but it gave no more details.  REUTER 3;
-19870409	CIBC UNIT ISSUES AUSTRALIAN DLR ZERO COUPON BOND CIBC Australia Ltd is issuing a zero coupon eurobond with a total redemption amount of 125 mln Australian dlrs due May 15, 1992 priced at 54 pct, sole lead manager CIBC Ltd said.     The issue is available in denominations of 1,000 and 10,000 Australian dlrs and is guaranteed Canadian Imperial Bank of Commerce. The selling concession is 3/4 pct, while management and underwriting combined pays 5/8 pct.     The payment date is May 15.  REUTER 3;
-19870409	CLEVITE <CLEV> AMENDS RIGHTS PLAN Clevite Industries Inc, which earlier received a 96 mln dlr takeover offer from J.P. Industries Inc <JPI>, said it amended its Shareholder Rights Plan so that certain provisions of the plan cannot occur until the board determines that it is in the best interests of the company and stockholders.     The plan, adopted in December 1986, permits Clevite to issue shares at half price to existing stockholders and allows stockholders to buy shares of an unfriendly bidder at half price.     Clevite said the amendments by its board effectively mean that the so-called flip-in and flip-over provisions of its rights plan can only be triggered by affirmative board approval.     The company said it acted inview of the proposed acquisition and because certain debt restrictions could block its ability to redeem the rights.  Reuter 3;
-19870409	CLEVITE <CLEV> GETS 13.50 DLR/SHR OFFER Clevite Industries Inc said it received a written proposal from J.P. Industries Inc <JPI> seeking to buy all of its outstanding shares for 13.50 dlrs a share.     Clevite's stock was trading on NASDAQ at 13-1/4.     J.P. Industries recently completed the acquisition of Clevite's Engine Parts Division.     J.P. Industries said its proposed transaction would be financed through borrowings under its available bank lines and a bridge financing facility which Donaldson Lufkin and Jenrette Securities Corp agreed to arrange.     To expedite the transaction, J.P. Industries said it would be willing to start a cash tender for Clevite's shares within five days after agreeing upon a definitive merger and confirmation of Clevite's financial results and condition.   Reuter 3;
-19870409	COAST SAVINGS <CSA> IN TALKS ON BUYING BANK Coast Savings and Loan Association said it is in talks with the Federal Savings and Loan Insurance Corp on the acquisition of Central Savings and Loan Association of San Diego.     Central, which operates 46 branches, has been under management guidance of the FSLIC since May 1985.     Coast said the acquisition would give it an entry into the San Joaquin Valley market besides strengthening its presence in the San Diego, Los Angeles and Orange Counties areas.  Reuter 3;
-19870409	COLONIAL BANCGROUP <CLBGA> MAKES ACQUISITION Colonial BancGroup said it has signed letter of intent to acquire Community Bank and Trust of Hartselle, Ala., with assets of 26 mln dlrs, for undisclosed terms, subject to approval by regulatory authorities and Community Bank shareholders.     Completion is expected within the next year, it said.  Reuter 3;
-19870409	COMDATA <CDN> GETS MERGER FINANCING Comdata Network Inc said it has received a letter from Drexel Burnham Lambert Inc stating that, subject to conditions, the company could raise up to 235 mln dlrs in debt securities to finance the previously announced merger of a newly formed corporation controlled by <Welsh, Carson, Anderson and Stowe IV> and Comdata.     Comdata said the letter was in accordance with the previously announced terms with Welsh, Carson.  Reuter 3;
-19870409	COMINCO <CLT> TO FORM EXPLORATION UNIT Cominco Ltd said it is forming a new publicly held company, Cominco Resources International Ltd, to continue exploration and development of its mineral holdings outside Canada, Alaska and Australia.     Cominco will maintain a majority position in the company, but the remaining interest will be sold in offerings led by Wood Gundy Inc and First Marathon Securities Ltd in Canada, and S.G. Warburg Securities and Wood Gundy Inc internationally.     Cominco said it is filing a preliminary prospectus with securities regulators in all Canadian provinces.                             Reuter 3;
-19870409	COMMONWEALTH EDISON <CWE> FILES DEBT OFFER Commonwealth Edison Co filed with the Securities and Exchange Commission for the sale of 375 mln dlrs in first mortgage bonds.     It said the proceedings would be used to discharge or refund outstanding obligations.     No underwriter was named.  Reuter 3;
-19870409	COMMUNITY BANK SYSTEM INC <CBSI> 1ST QTR NET Shr 46 cts vs 49 cts     Net 1,101,551 vs 831,398     NOTE: Share adjusted for two-for-one stock split in May 1986.  Reuter 3;
-19870409	CONSENSUS SEEN ON TIN PACT EXTENSION The quarterly session of the International Tin Council (ITC) continued without formal agreement on an extension of the sixth International Tin Agreement (ITA), but delegates said it was apparent there was a general consensus the Agreement should be prolonged.     Some delegations are still awaiting formal instructions from capitals, but informally most have indicated they favour an extension, delegates said.     This afternoon's session was used by delegates to seek further clarification on some of the issues involved, and to discuss internal matters.     Some sources were optimistic a resolution on an extension could be passed tomorrow but others suggested a special session would be convened to adopt the resolution after the Association of Tin Producing Countries meeting April 14 to 16.     The full Council session resumes tomorrow at 1330 GMT after a European Community coordination meeting at 1100.  Reuter 3;
-19870409	CONSUMERS POWER <CMS> TO REDEEM BONDS Consumers Power Co said it has 56 mln dlrs available to be used to redeem at par any 15 pct series first mortgage bonds that are not exchanged under an outstanding bond exchange program.     The utility on March 17 offered to exchange its 15 pct first mortgage bonds due March 1, 1994 for a new series of first mortgage bonds, 9-1/4 pct due April 1, 1997. The offer will expire April 14, 1987.  Reuter 3;
-19870409	CONTI SHARES OPEN HIGHER ON GOOD NEW TYRE REVIEWS Shares of Continental Gummi-Werke AG <CONG.F> opened eight marks stronger in an otherwise mixed Frankfurt market and dealers attributed the trend to favourable press reports about a new tyre system the company is developing.     The shares later eased to 344.50.     A spokesman for the West German Automobile Association, ADAC, said the ADAC magazine in a recent edition described advantages of the new tyre.  REUTER 3;
-19870409	COUPON CUT ON BANK OF TOKYO DOLLAR CONVERTIBLE The coupon on the 100 mln dlr, 15-year, convertible eurobond for the Bank of Tokyo Ltd has been cut to 1-3/4 pct from the two pct initially indicated, lead manager Bank of Tokyo International Ltd said.     The foreign exchange rate has been set at 146.40 yen to the dollar but details of the conversion price were not immediately available.  REUTER 3;
-19870409	COUPON CUT ON BANK OF TOKYO SWISS FRANC ISSUE The coupon on the Bank of Tokyo Ltd's 100 mln Swiss franc convertible has been cut to 7/8 pct from the indicated 1-1/4 pct, lead manager Swiss Bank Corp said.     The conversion price has been set at 1,590 yen, the same as today's close.     The exchange rate has been set at 96.84 yen to the franc.     Payment is due April 30. The conversion period is from May 20, 1987 until September 20, 1992.  REUTER 3;
-19870409	CRAY <CYR> GETS 6.6 MLN DLRS ORDER FROM BP <BP> Cray Research Inc said British Petroleum ordered a CRAY X-MP/24 supercomputer valued at about 6.6 mln dlrs.     The leased system will be installed at BP Exploration Co Ltd's London headquarters in the fourth quarter of 1987, pending export license approval, it said.     The CRAY X-MP/24 will replace a CRAY X-MP/12 supercomputer in operation since 1985, it added.     Separately, the company said that a CRAY X-MP/24 system valued at 8.5 mln dlrs was installed at Lockheed Missiles and Space Co.  Reuter 3;
-19870409	CREDIT NATIONAL ISSUES BILLION FRANC CONVERTIBLE Credit National is issuing a one billion franc convertible bond issue in two tranches both paying 8.50 pct and in 5,000 franc units, lead managers Caisse Nationale de Credit Agricole, Union de Garantie et de Placement and Morgan et Cie said.     Both tranches will be redeemable at the end of their lives and both have a payment date of April 27.     One seven year tranche will be priced at 99.94 pct. Each bond will be convertible on a one-for-one basis for a 8-1/2 year, 8.50 pct bond priced at 98.76 pct, redeemable at the end of its life.     This bond will pay a first coupon of 4.25 pct on April 27 next year and the payment date will be October 27, 1987.     A 13-year tranche, priced at 97.74 pct, will also be convertible until October 10, 1987 on a one for one basis for a 8.50 pct, 10-1/2 year year bond priced at 98.08 pct.     This bond will pay a first coupon of 212.50 francs on October 27 next year and the payment date wi
 ll be October 27 this year.  REUTER 3;
-19870409	CRUDE OIL NETBACKS UP SHARPLY IN EUROPE, U.S. Crude oil netback values in complex refineries rose sharply in Europe and firmed in the U.S. last Friday from the previous week but fell sharply in Singapore, according to calculations by Reuters Pipeline.     The firmer tone to refining margins in Europe and the U.S. relected higher prices for petroleum products, particularly gasoline, and support from crude oil prices.     Netback values for crude oil refined in Northern Europe rose substantially following strong gains in gasoline prices there. Brent is valued at 19.45 dlrs, up 56 cts a barrel or three pct from the previous week.     In the U.S. Gulf, sweet crudes rose in value by 14 cts to 19.33 dlrs for West Texas Intermediate, up about 0.7 pct.     Sour grades in the U.S. Gulf showed an increase of 33 cts a barrel for Alaska North Slope, up 1.7 pct.     But netbacks for crude oil refined in Singapore fell sharply, down 15 cts to as much as 68 cts a barrel as ample distillat
 e supplies weighed on petroleum product prices.     Attaka in Singapore is valued at 18.55 dlrs, a decline of 68 cts a barrel or 3.5 pct from the previous week.     For refineries in the Mediterranean, netback values were mostly lower, with declines of seven to 14 cts. The value of Kuwait crude fell 14 cts to 18.37 dlrs, while Iranian Light fell 11 cts to 19.14 dlrs.     On the U.S. West Coast, netback values for ANS CIF L.A. also jumped sharply, up 40 cts a barrel or 2.2 pct to 18.82 dlrs on higher gasoline prices.  Reuter 3;
-19870409	DAYTON HUDSON <DH> MARCH SALES OFF 4.9 PCT Dayton Hudson Corp said retail sales for the five weeks ended April Four were 791.8 mln dlrs compared to 755.6 mln dlrs a year ago. On a comparable store basis, it said sales declined 4.9 pct.     Sales for the nine months were 1.39 billion dlrs, up from 1.26 billion dlrs in the same 1986 period. On a comparable store basis, the sales rose 1.2 pct.  Reuter 3;
-19870409	DEKALB CORP <DKLBB> 2ND QTR FEB 28 NET Shr 20 cts vs 14 cts     Net 2.4 mln vs 1.7 mln     Revs 136.7 mln vs 174.4 mln     Six Mths     SDhr 72 cts vs 82 cts     Net 8.6 mln vs 9.9 mln     Revs 212.5 mln vs 268.8 mln  Reuter 3;
-19870409	DIAMOND CRYSTAL <DSLT> MIGHT SELL SALT UNIT Diamond Crystal Salt Co said it might sell its salt division.     The company said it retained First Boston Corp to assist it with the possible sale of the division, "assuming a fair price and reasonable terms can be obtained."     Diamond Crystal said sale of the unit was in the best long-term interests of its shareholders.     The company also said it incorporated its Packet Products Division as of April one. The unit will be an indirect wholly owned subsidiary called Diamond Crystal Specialty Foods Inc. Current management of the division will remain.  Reuter 3;
-19870409	DISEASE PUTS ZIMBABWE BEEF EXPORTS IN JEOPARDY Zimbabwe's beef exports to the European Community (EC), potentially worth 70 mln Zimbabwean dlrs this year, may be jeopardised by an outbreak of foot and mouth disease in southwestern Matabeleland, industry sources said.     The country has temporarily suspended beef exports to the EC because of the outbreak and awaits a decision from the EC veterinary committee, which is considering a formal ban.     The outbreak in the country's main ranching province has already led neighbouring beef-producing Botswana and Zambia to bar beef and dairy imports from Zimbabwe, threatening the dairy industry with a loss of at least one mln dlrs in export revenue.     "The situation is still uncertain at the moment. Normally when an outbreak occurs there is an automatic suspension of beef exports," one industry source said yesterday.      Commenting on EC policy, he explained, "Depending on the seriousness of the outbreak the (veterinary) committ
 ee then decides on three options, allowing us to continue exporting beef from disease-free areas, clamping a three-month suspension on exports or banning us from exporting for a year. We are still awaiting their decision," he added, asking not to be identified.     Zimbabwe was granted an export quota of 8,100 tonnes of high-grade beef to EC markets in 1985 after the country had spent millions of dollars erecting disease-control fences and upgrading abattoirs to meet stringent EC rules.     Should the EC ban Zimbabwean exports, the country will be forced to sell its beef on glutted world beef markets at low prices, the source said. Projected earnings from beef sales could fall about 23 mln dlrs as a result, he said.  Reuter 3;
-19870409	DISNEY FAMILY MAKES BID FOR HOLLY SUGAR <HLY> The Roy Disney family disclosed in a filing with the Securities and Exchange Commission that it made a bid to acquire Holly Sugar Corp for a package of cash and securities.     Shamrock Holdings of California Inc, a Disney family company, said it submitted the bid on April 8 to Salomon Brothers Inc, Holly Sugar's investment banker.     The offer was for 45 dlrs in cash, securities with a face value of 70 dlrs, and a "contingent payment certificate" that would pay out as much as 70 dlrs over a 20-year period for each share of Holly Sugar outstanding.     The Disney family already holds 101,300 Holly Sugar shares or 9.0 pct of the total outstanding following purchases of 12,500 shares March 13-April 17, Shamrock told the SEC.     Shamrock said it had asked for certain information about Holly Sugar's financial condition but had been turned down. It said its offer was therefore subject to further discussions.     "Once we have had a
 n opportunity to complete our due diligence evaluation of the company, including inspections of certain facilities and meetings with key management personnel, we would be prepared to negotiate all aspects of our proposal, including price," it said in its April 8 letter. REUTER^M 3;
-19870409	DOE RUN RAISES LEAD PRICE 0.50 CT TO 26.50 CTS Doe Run Company said it is increasing the price of its corroding grade lead by one-half cent to 26.50 cents a lb, effective immediately.     The price is quoted FOB, Herculaneum, Mo., and FOB, Boss, Mo., with freight allowed for carload quantities.      Reuter 3;
-19870409	DOLLAR ENDS LOWER IN LACKLUSTRE FRANKFURT The dollar drifted down to end one pfennig lower after a lacklustre session, held in limits by the lack of concrete news from the Group of Seven meeting and comments on the edge of the Washington IMF/World Bank meeting.     Dealers said the communique early in the European morning from the G-7 meeting contained no significant new factors and although the dollar dipped it generally resisted further attempts to push it lower through the day.     The U.S. Currency ended at 1.8270/80 marks, below yesterday's last 1.8365/75.     Koch said the assessment of the dollar's direction was based on a global view, with operators paying most attention to comments by finance officials to see how closely they stated adherence to international agreements such as those set at the Plaza Hotel in 1985 and in Paris on February 22.     Koch described the wording of the communique from the G-7 as "soft as wax."     Bundebank vice-president Helmut Schlesin
 ger told Reuters in a telephone interview that the German central bank sees no current reason to change monetary course at present.     Schlesinger was responding to questions following remarks yesterday by Bundesbank board member Claus Koehler and West Berlin state central bank president Dieter Hiss, which dealers said revived some speculation that German interest rate cuts may be under consideration.     German call money was slightly softer today, at around 3.70 pct after 3.80 yesterday.     Some dealers said rates on new liquidity injections added via Bundesbank securities repurchase agreements may be cut next week. Hopes of a cut were dashed on Tuesday with an allocation at an unchanged 3.80 pct.     But speaking of the pact tender rate next week, Schlesinger said, "since the central bank council gives its opinion on this theme only every 14 days, this is hardly probable."     Euromark rates scarcely responded to the central bankers comments, with six months funds ending unalte
 red at around 3-7/8 pct. Eurodollars for the same maturity rose a fractional 1/16 pct from yesterday to around 6-11/16 pct.     Sterling dipped to end at 2.952/956 marks after 2.960/965 last night. The Swiss franc firmed slightly to 120.30/45 marks per 100 from 120.25/40, with the yen soaring however to 1.2570/90 marks per 100 from 1.2515/35 yesterday.     EMS currencies saw the French franc end unchanged from last night at 30.03/06 marks per 100, with the Belgian franc easing however to 4.829/831 marks per 100 from 4.831/833.  REUTER 3;
-19870409	DOLLAR FALLS BELOW 143 YEN IN TOKYO The dollar fell below 143 yen in hectic early Tokyo trading despite aggressive Bank of Japan intervention, dealers said.     After opening at a Tokyo low of 143.75 yen, the dollar fell as low as 142.90 yen on heavy selling led by securities firms and institutional investors, they said.  REUTER 3;
-19870409	DOLLAR OPENS AT TOKYO RECORD LOW OF 143.75 YEN The dollar opened at a record Tokyo low of 143.75 yen despite aggressive Bank of Japan intervention, dealers said.     The previous record low was 144.70 yen set on March 30. The opening compares with 143.90/144.00 yen at the close in New York.     The central bank bought dollars through Tokyo brokers just before and after the market opening, the dealers said.     The intervention took place when the dollar fell to 143.20 yen, one dealer said.     The dollar opened at 1.8155/60 marks against 1.8187/97 in New York.     The dollar fell as low as 142.90 yen despite central bank intervention at 143.00 yen, dealers said.     Selling pressure was strong from securities houses and institutional investors in hectic and nervous trading on underlying bearish sentiment for the dollar, they said.     Most dealers were surpised by the dollar's sharp fall against the yen in New York, although many had expected such a drop to happen eventuall
 y.     Institutional investors are expected to sell the dollar aggressively if it rises to around 143.50 yen, dealers said.     The U.S. Currency steadied well above 143.00 yen after Bank of Japan intervention and scattered short-covering, they said.     The dollar opened at 1.5120/30 Swiss francs against 1.5085/00 at the New York close.     Sterling started at 1.6190/00 dlrs against 1.6195/05.  REUTER 3;
-19870409	E.F. HUTTON <EFH> UNIT'S PUROLATOR OFFER EXPIRES E.F. Hutton LBO Inc said the tender offer by its wholly owned unit, PC Acquisition Inc, for Purolator Courier Corp <PCC> expired at 2400 EDT yesterday without the purchase of any Purolator common stock.     Hutton added that PC Acquisition also terminated its merger agreement with Purolator.     Hutton said the offer, which had been conditioned upon the tender of at least 5,116,892 Purolator shares, or about two-thirds of the outstanding shares, was terminated because the minimum number of shares was not tendered.     Purolator had entered into a definitive agreement with PC Acquisition, part-owned by E.F. Hutton LBO Inc, a unit of E.F. Hutton, and some officers of Purolator's U.S. courier division, in which PC offered to purchase 6,332,471 Purolator common stock shares for 35 dlrs a share.     Following that move, PC Acquisition planned to merge a subsidiary into Purolator, converting all outstanding Purolator common it did 
 not own into an aggregate 46 mln dlrs principal amount of 12 pct guaranteed debentures due 2002 and warrants to purchase 15 pct of a Purolator unit comprised of Purolator's U.S courier operations.     Hutton said as of 2400 EDT yesterday about 181,000 shares of Purolator common stock, or about 2.4 pct of the outstanding shares, had been validly tendered and not withdrawn.     PC Acquisition has instructed its depository for the offer to return promptly the Purolator stock deposited by, or on behalf of, tendering shareholders, Hutton said.  Reuter 3;
-19870409	EC COMMISSION AUTHORISED TO BUY MAIZE IN JUNE The European Commission was authorised to buy up to one mln tonnes of maize into intervention stores in the second half of June, although sales into intervention normally end on April 30, Commission sources said.     They said approval was given by the EC's Cereals Management Committee because of the possible disturbance of the market due to heavy imports of maize under the agreement between the EC and the United States.     The agreement guarantees access to the Spanish market for two mln tonnes of non-EC maize a year for the next four years.     The sources said the intervention price for the maize would be 201.49 Ecus a tonne.     They said at this price it seemed unlikely that the full     They added the decision is also designed to prevent massive offers of maize for intervention just ahead of the normal April 30 deadline, which could be caused by speculation about the implementation of the accord with the United States.  R
 euter 3;
-19870409	EC GRANTS FREE MARKET BARLEY, MAIZE EXPORTS The European Commission authorised the export of 65,000 tonnes of free market barley at today's tender at a maximum rebate of 138.75 European currency units and 55,000 tonnes of French maize at 130 Ecus, grain traders here said.     It rejected bids for breadmaking and feed wheat, they said.  Reuter 3;
-19870409	EC LAUNCHES ANTI-DUMPING PROBE ON JAPANESE CHIPS The European Community launched an investigation into allegations of dumping by Japanese semiconductor makers in a move which diplomats said could mark an intensification of world trade strains.     Tokyo already faces a deadline of April 17 from Washington for the imposition of 300 mln dlrs worth of tariffs on chips it imports into the U.S.     The EC Executive Commission said today the European Electrical Component Manufacturers Association complained that Japanese firms were selling high capacity EPROM type (erasable programmable read only memory) chips at unfairly low prices.     Japan last year took 78 pct of the 170 mln dlr EC EPROM market, up from 60 pct in 1984. The EC firms said they had been forced to offer their products at a discount of up to 30 pct in order to compete with the Japanese.     The Commission said it believed the Association had given sufficient elements of proof for dumping to warrant an investigati
 on, which could lead it to impose duties if it found the complaints were justified.     The Commission claims last year's accord between the U.S. And Japan on microchip pricing gives U.S. Firms privileged access to the Japanese market.  REUTER 3;
-19870409	EC SUGAR TENDER SEEN MARKING NO CHANGE IN POLICY The maximum export rebate granted at yesterday's EC sugar tender marked no change in policy over producer complaints that they are not obtaining the EC intervention price in exporting sugar outside the Community, EC Commission sources said.     The maximum rebate was 46.496 Ecus per 100 kilos for 118,350 tonnes of sugar, down from 46.864 Ecus the previous week, but the change is explained by world market conditions.     Producers claim the rebate was short of the level needed to obtain a price equivalent to the intervention price by over one Ecu per 100 kilos, and was 0.87 Ecu short the previous week, the sources said.     They said this was despite the fact that the Commission had to accept 785,000 tonnes of sugar into intervention from operators protesting that rebates are too low.     Operators have now until early May to withdraw this sugar. But they have not given any sign of planned withdrawals unless the Commission rev
 iews its export policy, they said.  REUTER 3;
-19870409	ECONOMIC SPOTLIGHT - TELECOM IS KEY JAPAN MINISTRY Japan's little-known Ministry of Posts and Telecommunications (MPT) has emerged as an international force to be reckoned with, political analysts said.     MPT, thrust into the spotlight by trade rows with the U.S. And Britain, is in a position of strength due to its control of a lucrative industry and its ties with important politicians, they said.     "The ministry is standing athwart the regulatory control of a key industrial sector, telecommunications and information," said one diplomatic source.     "They are a potent political force," the diplomatic source said.     But MPT is finding domestic political prowess does not always help when it comes to trade friction diplomacy, analysts said.     "The ministry was a minor ministry and its people were not so internationalized," said Waseda University professor Mitsuru Uchida. "Suddenly they're standing at the centre of the world community and in that sense, they're at a lo
 ss (as to) how to face the situation."     Most recently the ministry has been embroiled in a row with London over efforts by Britain's Cable and Wireless Plc to keep a major stake in one of two consortia trying to compete in Japan's lucrative overseas telephone business.     The ministry has favoured the merger of the two rival groups, arguing the market cannot support more than one competitor to Kokusai Denshin Denwa Co Ltd, which now monopolizes the business.     It has also opposed a major management role in the planned merger for any non-Japanese overseas telecommunications firm on the grounds that no such international precedent exists.     The ministry's stance has outraged both London, which has threatened to retaliate, and Washington, which says the merger plan is evidence of Japan's failure to honour pledges to open its telecommunications market.     Washington is also angry over other ministry moves which it says have limited access for U.S. Firms to Japan's car telephone
  and satellite communications market.     Much of MPT's new prominence stems from the growth of the sector it regulates.     "What has been happening is an important shift in the economy which makes the ministry a very important place," said James Abegglen, head of the consulting firm Asia Advisory Service Inc.     A decision to open the telecommunications industry to competition under a new set of laws passed in 1985 has boosted rather than lessened MPT's authority, analysts said.     "With the legal framework eased, they became the de facto legal framework," said Bache Securities (Japan) analyst Darrell Whitten.     Close links with the powerful political faction of the ruling Liberal Democratic Party (LDP) nurtured by former Prime Minister Kakuei Tanaka are another key to MPT's influence, the analysts said.     "Other factions ignored MPT (in the 1970s), but the Tanaka faction was forward looking and ... Recognized the importance of MPT," Uchida said. Many former bureaucrats beca
 me members of the influential political group, he added.     The ministry also has power in the financial sector due to the more than 100,000 billion yen worth of deposits in the Postal Savings System, analysts said.     MPT has helped block Finance Ministry plans to deregulate interest rates on small deposits, a key element in financial liberalisation, since the change would remove the Postal Savings System's ability to offer slightly higher rates than banks, they said.     Diplomatic sources, frustrated with what they see as MPT's obstructionist and protectionist posture, have characterized the ministry as feudal.     Critics charge MPT with protecting its own turf, limiting competition and sheltering the former monopolies under its wing. Providing consumers with the best service at the lowest price takes a back seat to such considerations, they said.     But many of the ministry's actions are not unlike those of its bureaucratic counterparts in much of the Western world including
  Britain, several analysts said.     "The United States is really the odd man out," Abegglen said. "For a government to take the view that it wants to keep order in utilities markets is not an unusual and/or unreasonable view," he said.  REUTER 3;
-19870409	ECUADOR CRUDE OIL OUTPUT TO RESUME NEXT MONTH Ecuador is due to resume limited crude oil output on May 8 when a new 43 km pipeline to neighbouring Colombia should be finished, an energy ministry spokesman said.     Oil output was halted on March 5 by an earthquake which damaged 50 km of the main pipeline linking jungle oilfields at Lago Agrio to the Ecuadorean port of Balao on the Pacific.     About 13 km of the new link, capable of carrying some 50,000 barrels per day (bpd), has been built, he said.     Ecuador pumped 245,000 to 250,000 bpd before the earthquake.     The new link will connect Lago Agrio to Puerto Colon in Colombia, the starting point of Columbia's pipeline to the Pacific ocean port of Temuco.     The government estimates it will take about four more months to repair the Lago Agrio to Balao pipeline and return output to normal levels, the spokesman said.  REUTER 3;
-19870409	EGYPT BUYS PL 480 WHEAT FLOUR - U.S. TRADERS Egypt bought 125,723 tonnes of U.S. wheat flour in its PL 480 tender yesterday, trade sources said.     The purchase included 51,880 tonnes for May shipment and 73,843 tonnes for June shipment. Price details were not available.  Reuter 3;
-19870409	EGYPT CANCELS WHEAT TENDER Egypt has cancelled its April 2 tender for 200,000 tonnes of any origin wheat for April 15-30 shipment, trade and Egyptian official sources said.     Trade sources said the cancellation followed an offer by an Egyptian company, Islamic Corp, at 85.80 dlrs/tonne cost and freight, undercutting other traders' offers of between 93.90 and 94.49 dlrs/tonne.     An Egyptian trade official in Paris confirmed cancellation of the tender following the Islamic Corp offer, which he said the government had refused for legal reasons.     The official denied trade reports that the government might have substituted a private deal with Islamic Corp for the original tender.  Reuter 3;
-19870409	EGYPT SEEKING 500,000 TONNES CORN - U.S. TRADERS Egypt is expected to tender April 22 for 500,000 tonnes of corn for May through September shipments, private export sources said.  Reuter 3;
-19870409	EIB ISSUES 40 BILLION YEN EUROBOND The European Investment Bank (EIB) is issuing a 40 billion yen eurobond due May 6, 1994 paying 4-5/8 pct and priced at 101-1/2, lead Nomura International Ltd said.     The non-callable bond is available in denominations of one mln yen and will be listed in Luxembourg. The selling concession is 1-1/8 pct while management and underwriting combined pays 1/2 pct. The payment date is May 6.     There is a mandatory purchase fund operating in years one and two, except for the first month after the payment date, whereby the EIB can purchase up to five pct of the issue each year if it is trading below par.  REUTER 3;
-19870409	EQUITICORP H.K. UNIT TO RAISE 30 MLN U.S. DLRS <Equiticorp Hongkong Ltd> is planning a 30 mln U.S. Dlr transferrable loan facility to raise working capital, lead managers <Manufacturers Hanover Asia Ltd> and <Manufacturers Hanover Ltd>, said.     The two year loan with bullet repayment carries interest at 5/8 of a percentage point over the London interbank offered rate. It will be guaranteed by parent company <Equiticorp Holdings Ltd> of New Zealand, the managers said.     Syndication is proceeding and managers and participants are being invited to participate at four levels with management fees ranging from 15 to 30 basis points, it said.  REUTER 3;
-19870409	EUROPEAN MARKETS REACT QUIETLY TO G-7 COMMUNIQUE European currency markets reacted quietly to the G-7 communique, with comments from bankers and dealers ranging from disappointment that it was not more concrete to surprise that the markets should have expected so much.     The dollar opened lower against virtually all currencies and traded in a narrow range after the communique, which reaffirmed support for the Paris accord on currency stabilisation but contained no moves to strengthen it.     Dealers in Frankfurt and Zurich saw the dollar remaining broadly entrenched in its current trading range.     "The dollar is likely to stay within a range of 1.80 to 1.84 marks," said Gisela Steinhaeuser, senior dealer at Chase Bank AG. She said there was some resistance to further climbs.     However, she said the dollar could break out of the range with major surprises such as a worse-than-expected U.S. Merchandise trade deficit, due next Tuesday.     Theodor Stadelmann, dealer with
  Bank Julius Baer and Co Ltd in Zurich, said he expects the dollar to hold steady against the mark and Swiss franc but to weaken further against the yen, possibly to 140 yen.     A Milan banker shared Stadelmann's view, saying he expects a dollar-yen range of 140-150 in the short term.     London traders said the G-7 communique failed to curb underlying bearishness toward the dollar but this negative sentiment was not yet strong enough to tempt interbank operators to test the downside.     Concern that finance ministers and officials still in Washington could issue more concrete statements in favour of currency stabilisation kept players sidelined, along with worries about provoking fresh central bank intervention in the near term, the traders said.     Most Paris dealers expressed disappointment at the communique, saying nothing has changed to reverse the dollar's downward trend.     Traders in several centres said the market would look for fresh opportunities to test the willingne
 ss of central banks to defend current ranges, which the commun

<TRUNCATED>

[4/7] lucene-solr:jira/gradle: Move queryparser test's resources to a right place

Posted by da...@apache.org.
Move queryparser test's resources to a right place


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5e447a41
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5e447a41
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5e447a41

Branch: refs/heads/jira/gradle
Commit: 5e447a41a182f6da54ee4549b6e1ce1670b4a5ec
Parents: 4a12fff
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Nov 2 10:15:03 2018 +0000
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Nov 2 10:15:03 2018 +0000

----------------------------------------------------------------------
 .../messages/MessagesTestBundle.properties      |  17 -
 .../messages/MessagesTestBundle_ja.properties   |  17 -
 .../lucene/queryparser/xml/BooleanQuery.xml     |  28 --
 .../lucene/queryparser/xml/BoostingQuery.xml    |  33 --
 .../queryparser/xml/BoostingTermQuery.xml       |  18 -
 .../queryparser/xml/ConstantScoreQuery.xml      |  20 -
 .../queryparser/xml/DOCTYPE_TermQuery.xml       |  19 -
 .../queryparser/xml/DisjunctionMaxQuery.xml     |  24 -
 .../lucene/queryparser/xml/ENTITY_TermQuery.xml |  23 -
 .../queryparser/xml/FuzzyLikeThisQuery.xml      |  23 -
 .../lucene/queryparser/xml/LikeThisQuery.xml    |  33 --
 .../queryparser/xml/MatchAllDocsQuery.xml       |  25 -
 .../queryparser/xml/NestedBooleanQuery.xml      |  36 --
 .../lucene/queryparser/xml/PointRangeQuery.xml  |  31 --
 .../xml/PointRangeQueryWithoutLowerTerm.xml     |  31 --
 .../xml/PointRangeQueryWithoutRange.xml         |  31 --
 .../xml/PointRangeQueryWithoutUpperTerm.xml     |  31 --
 .../lucene/queryparser/xml/RangeQuery.xml       |  18 -
 .../apache/lucene/queryparser/xml/SpanQuery.xml |  55 --
 .../apache/lucene/queryparser/xml/TermQuery.xml |  18 -
 .../lucene/queryparser/xml/TermQueryEmpty.xml   |  18 -
 .../lucene/queryparser/xml/TermsQuery.xml       |  26 -
 .../lucene/queryparser/xml/UserInputQuery.xml   |  25 -
 .../xml/UserInputQueryCustomField.xml           |  18 -
 .../lucene/queryparser/xml/reuters21578.txt     | 498 -------------------
 .../messages/MessagesTestBundle.properties      |  17 +
 .../messages/MessagesTestBundle_ja.properties   |  17 +
 .../lucene/queryparser/xml/BooleanQuery.xml     |  28 ++
 .../lucene/queryparser/xml/BoostingQuery.xml    |  33 ++
 .../queryparser/xml/BoostingTermQuery.xml       |  18 +
 .../queryparser/xml/ConstantScoreQuery.xml      |  20 +
 .../queryparser/xml/DOCTYPE_TermQuery.xml       |  19 +
 .../queryparser/xml/DisjunctionMaxQuery.xml     |  24 +
 .../lucene/queryparser/xml/ENTITY_TermQuery.xml |  23 +
 .../queryparser/xml/FuzzyLikeThisQuery.xml      |  23 +
 .../lucene/queryparser/xml/LikeThisQuery.xml    |  33 ++
 .../queryparser/xml/MatchAllDocsQuery.xml       |  25 +
 .../queryparser/xml/NestedBooleanQuery.xml      |  36 ++
 .../lucene/queryparser/xml/PointRangeQuery.xml  |  31 ++
 .../xml/PointRangeQueryWithoutLowerTerm.xml     |  31 ++
 .../xml/PointRangeQueryWithoutRange.xml         |  31 ++
 .../xml/PointRangeQueryWithoutUpperTerm.xml     |  31 ++
 .../lucene/queryparser/xml/RangeQuery.xml       |  18 +
 .../apache/lucene/queryparser/xml/SpanQuery.xml |  55 ++
 .../apache/lucene/queryparser/xml/TermQuery.xml |  18 +
 .../lucene/queryparser/xml/TermQueryEmpty.xml   |  18 +
 .../lucene/queryparser/xml/TermsQuery.xml       |  26 +
 .../lucene/queryparser/xml/UserInputQuery.xml   |  25 +
 .../xml/UserInputQueryCustomField.xml           |  18 +
 .../lucene/queryparser/xml/reuters21578.txt     | 498 +++++++++++++++++++
 50 files changed, 1116 insertions(+), 1116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
deleted file mode 100644
index ec6cb51..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-Q0001E_INVALID_SYNTAX = Syntax Error: {0}
-
-Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = Truncated unicode escape sequence.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
deleted file mode 100644
index 68e449c..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-Q0001E_INVALID_SYNTAX = \u69cb\u6587\u30a8\u30e9\u30fc: {0}
-
-Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = \u5207\u308a\u6368\u3066\u3089\u308c\u305f\u30e6\u30cb\u30b3\u30fc\u30c9\u30fb\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u3002

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BooleanQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BooleanQuery.xml
deleted file mode 100644
index 67c3e08..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BooleanQuery.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery fieldName="contents">
-  <Clause occurs="should">
-    <TermQuery>merger</TermQuery>
-  </Clause>
-  <Clause occurs="mustnot">
-    <TermQuery>sumitomo</TermQuery>
-  </Clause>
-  <Clause occurs="must">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingQuery.xml
deleted file mode 100644
index e10ddca..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingQuery.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BoostingQuery>
-  <!-- Find docs about banks, preferably merger info and preferably not "World bank" -->
-  <Query>
-    <BooleanQuery fieldName="contents">
-      <Clause occurs="should">
-        <TermQuery>merger</TermQuery>
-      </Clause>
-      <Clause occurs="must">
-        <TermQuery>bank</TermQuery>
-      </Clause>
-    </BooleanQuery>  
-  </Query>
-  <BoostQuery boost="0.01">
-      <UserQuery>"world bank"</UserQuery>
-  </BoostQuery>
-</BoostingQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
deleted file mode 100644
index 65bbd61..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BoostingTermQuery fieldName="contents">sumitomo</BoostingTermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
deleted file mode 100644
index 13cbc1b..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<ConstantScoreQuery>
-  <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
-</ConstantScoreQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
deleted file mode 100644
index 28938ae..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE TermQuery SYSTEM "foo://bar.xyz/mydtd">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TermQuery fieldName="contents">sumitomo</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
deleted file mode 100644
index 0c94b00..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<DisjunctionMaxQuery>
-  <TermQuery fieldName="a">merger</TermQuery>
-  <DisjunctionMaxQuery tieBreaker="0.3">
-    <TermQuery fieldName="b">verger</TermQuery>
-  </DisjunctionMaxQuery>
-</DisjunctionMaxQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
deleted file mode 100644
index dc59613..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE TermQuery [
-<!ENTITY internalTerm "sumitomo">
-<!ENTITY externalTerm SYSTEM "foo://bar.xyz/external">
-<!ENTITY % myParameterEntity "foo://bar.xyz/param">
-]>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TermQuery fieldName="contents">&internalTerm;&externalTerm;</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
deleted file mode 100644
index 78173d8..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<FuzzyLikeThisQuery>
-  <!-- Matches on misspelt "Sumitomo" bank -->
-  <Field fieldName="contents">
-    Sumitimo bank 
-  </Field>
-</FuzzyLikeThisQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/LikeThisQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
deleted file mode 100644
index 6c04de6..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<LikeThisQuery percentTermsToMatch="5" stopWords="Reuter" minDocFreq="2">
-IRAQI TROOPS REPORTED PUSHING BACK IRANIANS Iraq said today its troops were pushing Iranian forces out of 
-  positions they had initially occupied when they launched a new offensive near the southern port of 
-  Basra early yesterday.     A High Command communique said Iraqi troops had won a significant victory 
-  and were continuing to advance.     Iraq said it had foiled a three-pronged thrust some 10 km 
-  (six miles) from Basra, but admitted the Iranians had occupied ground held by the Mohammed al-Qassem 
-  unit, one of three divisions attacked.     The communique said Iranian Revolutionary Guards were under 
-  assault from warplanes, helicopter gunships, heavy artillery and tanks.     "Our forces are continuing 
-  their advance until they purge the last foothold" occupied by the Iranians, it said.     
-  (Iran said its troops had killed or wounded more than 4,000 Iraqis and were stabilising their new positions.)     
-  The Baghdad communique said Iraqi planes also destroyed oil installations at Iran's southwestern Ahvaz field 
-  during a raid today. It denied an Iranian report that an Iraqi jet was shot down.     
-  Iraq also reported a naval battle at the northern tip of the Gulf. Iraqi naval units and forces defending an 
-  offshore terminal sank six Iranian out of 28 Iranian boats attempting to attack an offshore terminal, 
-  the communique said.      Reuter 3;
-</LikeThisQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
deleted file mode 100644
index d258393..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery>
-  <Clause occurs="must">
-    <MatchAllDocsQuery/>
-  </Clause>
-  <Clause occurs="filter">
-    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
deleted file mode 100644
index aecac7f..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!--
-  This query was added to demonstrate nested boolean queries - there
-  was a bug in the XML parser which added ALL child <Clause> tags to 
-  the top level tags ie. took child and grandchild elements instead
-  of just child elements. This was due to the use of the 
-  Element.getElementsByTagName() call in BooleanQueryBuilder
--->  
-<BooleanQuery fieldName="contents">  
-  <Clause occurs="should">
-    <BooleanQuery fieldName="contents">
-      <Clause occurs="must">
-        <TermQuery>doesNotExistButShouldBeOKBecauseOtherClauseExists</TermQuery>
-      </Clause>
-    </BooleanQuery>
-  </Clause>
-  <Clause occurs="should">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
deleted file mode 100644
index 45af138..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery fieldName="contents">
-  <Clause occurs="should">
-    <TermQuery>merger</TermQuery>
-  </Clause>
-  <Clause occurs="mustnot">
-    <TermQuery >sumitomo</TermQuery>    
-  </Clause>
-  <Clause occurs="must">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-  <Clause occurs="must">
-    <PointRangeQuery fieldName="date3" lowerTerm="19870409" upperTerm="19870412"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
deleted file mode 100644
index 2159c2c..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery fieldName="contents">
-  <Clause occurs="should">
-    <TermQuery>merger</TermQuery>
-  </Clause>
-  <Clause occurs="mustnot">
-    <TermQuery >sumitomo</TermQuery>    
-  </Clause>
-  <Clause occurs="must">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-  <Clause occurs="must">
-    <PointRangeQuery fieldName="date3" upperTerm="19870412"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
deleted file mode 100644
index dc18953..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery fieldName="contents">
-  <Clause occurs="should">
-    <TermQuery>merger</TermQuery>
-  </Clause>
-  <Clause occurs="mustnot">
-    <TermQuery >sumitomo</TermQuery>    
-  </Clause>
-  <Clause occurs="must">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-  <Clause occurs="must">
-    <PointRangeQuery fieldName="date3"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
deleted file mode 100644
index eca8573..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery fieldName="contents">
-  <Clause occurs="should">
-    <TermQuery>merger</TermQuery>
-  </Clause>
-  <Clause occurs="mustnot">
-    <TermQuery >sumitomo</TermQuery>    
-  </Clause>
-  <Clause occurs="must">
-    <TermQuery>bank</TermQuery>
-  </Clause>
-  <Clause occurs="must">
-    <PointRangeQuery fieldName="date3" lowerTerm="19870409"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/RangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/RangeQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/RangeQuery.xml
deleted file mode 100644
index 946fdf2..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/RangeQuery.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/SpanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/SpanQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/SpanQuery.xml
deleted file mode 100644
index fc37d96..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/SpanQuery.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<SpanOr fieldName="contents">
-  <SpanNear slop="8" inOrder="false" >    
-      <SpanOr>
-        <SpanTerm>killed</SpanTerm>
-        <SpanTerm>died</SpanTerm>
-        <SpanTerm>dead</SpanTerm>
-      </SpanOr>
-      <SpanOr>
-        <!-- a less verbose way of declaring SpanTerm declarations - these are analyzed
-          into a series of Tokens which are added as SpanTerm elements of a SpanOr
-        -->
-        <SpanOrTerms>miner miners</SpanOrTerms>
-        <!-- finds mine near worker or workers -->
-        <SpanNear slop="6" inOrder="false">    
-          <SpanTerm>mine</SpanTerm>          
-          <SpanOrTerms>worker workers</SpanOrTerms>
-          <BoostingTermQuery>heavy</BoostingTermQuery>
-        </SpanNear>
-      </SpanOr>
-  </SpanNear>  
-  <SpanFirst end="10">
-    <SpanOrTerms>fire burn</SpanOrTerms>
-  </SpanFirst> 
-  <!-- Other Span examples....
-    
-  <SpanNot>
-    <Include>
-        <SpanNear slop="2" inOrder="2">    
-            <SpanTerm>social</SpanTerm>
-            <SpanTerm>services</SpanTerm>
-        </SpanNear>        
-    </Include>
-    <Exclude>
-        <SpanTerm>public</SpanTerm>
-    </Exclude>
-  </SpanNot>
-    -->
-</SpanOr>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQuery.xml
deleted file mode 100644
index 14dae37..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQuery.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TermQuery fieldName="contents">sumitomo</TermQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
deleted file mode 100644
index 229a112..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<TermQuery fieldName="contents"></TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermsQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermsQuery.xml
deleted file mode 100644
index df93fc2..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/TermsQuery.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-    <!-- TermsQuery uses an analyzer to tokenize text and creates a BooleanQuery with nested
-      "should" TermQueries for each of the tokens encountered. This can be used for user input
-      which may include content or characters that would otherwise be illegal query syntax when
-      using the standard lucene query parser. Of course the downside is that none of the query 
-      operators (AND NOT ~ ^ : etc) will have an effect. For some scenarios queries are
-      not formed by people familiar with Lucene query syntax and they can inadvertently type illegal
-      query syntax so in these cases this is an appropriate and simple alternative
-    --> 
-<TermsQuery fieldName="contents">sumitomo bank</TermsQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQuery.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQuery.xml
deleted file mode 100644
index f7b6cae8..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQuery.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<BooleanQuery>
-  <Clause occurs="must">
-    <UserQuery>"Bank of England"</UserQuery>
-  </Clause>
-  <Clause occurs="filter">
-    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
-  </Clause>
-</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml b/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
deleted file mode 100644
index 7b35a63..0000000
--- a/lucene/queryparser/src/test/java/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<UserQuery fieldName="doesNotExist" boost="10">Bank^2</UserQuery>


[7/7] lucene-solr:jira/gradle: Adding solr:analysis-extras module

Posted by da...@apache.org.
Adding solr:analysis-extras module


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/6c070b4a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/6c070b4a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/6c070b4a

Branch: refs/heads/jira/gradle
Commit: 6c070b4a553f8c2da8f2481b1977f1ec239ae610
Parents: 5e447a4
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Nov 2 10:29:44 2018 +0000
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Nov 2 10:29:44 2018 +0000

----------------------------------------------------------------------
 lucene/analysis/common/build.gradle             |  13 +
 settings.gradle                                 |   3 +-
 solr/contrib/analysis-extras/build.gradle       |  17 +
 .../apache/solr/schema/ICUCollationField.java   | 311 ----------
 .../java/org/apache/solr/schema/package.html    |  23 -
 ...ractNamedEntitiesUpdateProcessorFactory.java | 577 -------------------
 .../apache/solr/update/processor/package.html   |  24 -
 .../analysis-extras/src/java/overview.html      |  21 -
 .../apache/solr/schema/ICUCollationField.java   | 311 ++++++++++
 .../java/org/apache/solr/schema/package.html    |  23 +
 ...ractNamedEntitiesUpdateProcessorFactory.java | 577 +++++++++++++++++++
 .../apache/solr/update/processor/package.html   |  24 +
 .../analysis-extras/src/main/java/overview.html |  21 +
 .../solr/collection1/conf/en-test-ner.bin       | Bin 2049 -> 0 bytes
 .../solr/collection1/conf/en-test-sent.bin      | Bin 1051 -> 0 bytes
 .../solr/collection1/conf/en-test-tokenizer.bin | Bin 15100 -> 0 bytes
 .../collection1/conf/schema-folding-extra.xml   |  52 --
 .../collection1/conf/schema-icucollate-dv.xml   |  57 --
 .../solr/collection1/conf/schema-icucollate.xml |  57 --
 .../conf/schema-icucollateoptions.xml           |  68 ---
 .../collection1/conf/schema-opennlp-extract.xml |  49 --
 .../collection1/conf/solrconfig-icucollate.xml  |  27 -
 .../conf/solrconfig-opennlp-extract.xml         | 206 -------
 .../solrconfig.snippet.randomindexconfig.xml    |  48 --
 .../TestFoldingMultitermExtrasQuery.java        |  87 +++
 .../solr/schema/TestICUCollationField.java      | 192 ++++++
 .../schema/TestICUCollationFieldDocValues.java  | 180 ++++++
 .../schema/TestICUCollationFieldOptions.java    | 119 ++++
 ...ractNamedEntitiesUpdateProcessorFactory.java | 195 +++++++
 .../TestFoldingMultitermExtrasQuery.java        |  87 ---
 .../solr/schema/TestICUCollationField.java      | 192 ------
 .../schema/TestICUCollationFieldDocValues.java  | 180 ------
 .../schema/TestICUCollationFieldOptions.java    | 119 ----
 ...ractNamedEntitiesUpdateProcessorFactory.java | 195 -------
 .../solr/collection1/conf/en-test-ner.bin       | Bin 0 -> 2049 bytes
 .../solr/collection1/conf/en-test-sent.bin      | Bin 0 -> 1051 bytes
 .../solr/collection1/conf/en-test-tokenizer.bin | Bin 0 -> 15100 bytes
 .../collection1/conf/schema-folding-extra.xml   |  52 ++
 .../collection1/conf/schema-icucollate-dv.xml   |  57 ++
 .../solr/collection1/conf/schema-icucollate.xml |  57 ++
 .../conf/schema-icucollateoptions.xml           |  68 +++
 .../collection1/conf/schema-opennlp-extract.xml |  49 ++
 .../collection1/conf/solrconfig-icucollate.xml  |  27 +
 .../conf/solrconfig-opennlp-extract.xml         | 206 +++++++
 .../solrconfig.snippet.randomindexconfig.xml    |  48 ++
 solr/core/build.gradle                          |   1 +
 46 files changed, 2326 insertions(+), 2294 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/lucene/analysis/common/build.gradle
----------------------------------------------------------------------
diff --git a/lucene/analysis/common/build.gradle b/lucene/analysis/common/build.gradle
index 73321f7..841f27c 100644
--- a/lucene/analysis/common/build.gradle
+++ b/lucene/analysis/common/build.gradle
@@ -1,5 +1,18 @@
 apply plugin: 'java'
 
+task jarTest (type: Jar) {
+    from sourceSets.test.output
+    classifier = 'test'
+}
+
+configurations {
+    testOutput
+}
+
+artifacts {
+    testOutput jarTest
+}
+
 dependencies {
 	compile project(':lucene:core')
     testCompile project(':lucene:codecs')

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 56554a7..5884dcb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -45,4 +45,5 @@ include 'solr:core'
 include 'solr:server'
 include 'solr:solrj'
 include 'solr:test-framework'
-include 'solr:example:example-DIH'
\ No newline at end of file
+include 'solr:example:example-DIH'
+include 'solr:contrib:analysis-extras'
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/build.gradle
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/build.gradle b/solr/contrib/analysis-extras/build.gradle
new file mode 100644
index 0000000..6eba4ad
--- /dev/null
+++ b/solr/contrib/analysis-extras/build.gradle
@@ -0,0 +1,17 @@
+apply plugin: 'java'
+
+dependencies {
+    compile library.icu4j
+    compile library.opennlp_tools
+    compile library.morfologik_fsa
+    compile library.morfologik_polish
+    compile library.morfologik_stemming
+
+	compile project(':solr:solrj')
+	compile project(':solr:core')
+	compile project(':lucene:analysis:icu')
+	compile project(':lucene:analysis:opennlp')
+
+	testCompile project(':solr:test-framework')
+	testCompile project(path: ':lucene:analysis:common', configuration: 'testOutput')
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
deleted file mode 100644
index f723a25..0000000
--- a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.schema;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
-import org.apache.lucene.analysis.util.ResourceLoader;
-import org.apache.lucene.collation.ICUCollationKeyAnalyzer;
-import org.apache.lucene.document.SortedDocValuesField;
-import org.apache.lucene.document.SortedSetDocValuesField;
-import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.SortField;
-import org.apache.lucene.search.TermRangeQuery;
-import org.apache.lucene.util.BytesRef;
-import org.apache.solr.common.SolrException.ErrorCode;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.response.TextResponseWriter;
-import org.apache.solr.search.QParser;
-import org.apache.solr.uninverting.UninvertingReader.Type;
-
-import com.ibm.icu.text.Collator;
-import com.ibm.icu.text.RuleBasedCollator;
-import com.ibm.icu.util.ULocale;
-
-/**
- * Field for collated sort keys. 
- * These can be used for locale-sensitive sort and range queries.
- * <p>
- * This field can be created in two ways: 
- * <ul>
- *  <li>Based upon a system collator associated with a Locale.
- *  <li>Based upon a tailored ruleset.
- * </ul>
- * <p>
- * Using a System collator:
- * <ul>
- *  <li>locale: RFC 3066 locale ID (mandatory)
- *  <li>strength: 'primary','secondary','tertiary', 'quaternary', or 'identical' (optional)
- *  <li>decomposition: 'no', or 'canonical' (optional)
- * </ul>
- * <p>
- * Using a Tailored ruleset:
- * <ul>
- *  <li>custom: UTF-8 text file containing rules supported by RuleBasedCollator (mandatory)
- *  <li>strength: 'primary','secondary','tertiary', 'quaternary', or 'identical' (optional)
- *  <li>decomposition: 'no' or 'canonical' (optional)
- * </ul>
- * <p>
- * Expert options:
- * <ul>
- *  <li>alternate: 'shifted' or 'non-ignorable'. Can be used to ignore punctuation/whitespace.
- *  <li>caseLevel: 'true' or 'false'. Useful with strength=primary to ignore accents but not case.
- *  <li>caseFirst: 'lower' or 'upper'. Useful to control which is sorted first when case is not ignored.
- *  <li>numeric: 'true' or 'false'. Digits are sorted according to numeric value, e.g. foobar-9 sorts before foobar-10
- *  <li>variableTop: single character or contraction. Controls what is variable for 'alternate'
- * </ul>
- * 
- * @see Collator
- * @see ULocale
- * @see RuleBasedCollator
- */
-public class ICUCollationField extends FieldType {
-  private Analyzer analyzer;
-
-  @Override
-  protected void init(IndexSchema schema, Map<String,String> args) {
-    properties |= TOKENIZED; // this ensures our analyzer gets hit
-    setup(schema.getResourceLoader(), args);
-    super.init(schema, args);
-  }
-  
-  /**
-   * Setup the field according to the provided parameters
-   */
-  private void setup(ResourceLoader loader, Map<String,String> args) {
-    String custom = args.remove("custom");
-    String localeID = args.remove("locale");
-    String strength = args.remove("strength");
-    String decomposition = args.remove("decomposition");
-    
-    String alternate = args.remove("alternate");
-    String caseLevel = args.remove("caseLevel");
-    String caseFirst = args.remove("caseFirst");
-    String numeric = args.remove("numeric");
-    String variableTop = args.remove("variableTop");
-
-    if (custom == null && localeID == null)
-      throw new SolrException(ErrorCode.SERVER_ERROR, "Either custom or locale is required.");
-    
-    if (custom != null && localeID != null)
-      throw new SolrException(ErrorCode.SERVER_ERROR, "Cannot specify both locale and custom. "
-          + "To tailor rules for a built-in language, see the javadocs for RuleBasedCollator. "
-          + "Then save the entire customized ruleset to a file, and use with the custom parameter");
-    
-    final Collator collator;
-    
-    if (localeID != null) { 
-      // create from a system collator, based on Locale.
-      collator = createFromLocale(localeID);
-    } else { 
-      // create from a custom ruleset
-      collator = createFromRules(custom, loader);
-    }
-    
-    // set the strength flag, otherwise it will be the default.
-    if (strength != null) {
-      if (strength.equalsIgnoreCase("primary"))
-        collator.setStrength(Collator.PRIMARY);
-      else if (strength.equalsIgnoreCase("secondary"))
-        collator.setStrength(Collator.SECONDARY);
-      else if (strength.equalsIgnoreCase("tertiary"))
-        collator.setStrength(Collator.TERTIARY);
-      else if (strength.equalsIgnoreCase("quaternary"))
-        collator.setStrength(Collator.QUATERNARY);
-      else if (strength.equalsIgnoreCase("identical"))
-        collator.setStrength(Collator.IDENTICAL);
-      else
-        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid strength: " + strength);
-    }
-    
-    // set the decomposition flag, otherwise it will be the default.
-    if (decomposition != null) {
-      if (decomposition.equalsIgnoreCase("no"))
-        collator.setDecomposition(Collator.NO_DECOMPOSITION);
-      else if (decomposition.equalsIgnoreCase("canonical"))
-        collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
-      else
-        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid decomposition: " + decomposition);
-    }
-    
-    // expert options: concrete subclasses are always a RuleBasedCollator
-    RuleBasedCollator rbc = (RuleBasedCollator) collator;
-    if (alternate != null) {
-      if (alternate.equalsIgnoreCase("shifted")) {
-        rbc.setAlternateHandlingShifted(true);
-      } else if (alternate.equalsIgnoreCase("non-ignorable")) {
-        rbc.setAlternateHandlingShifted(false);
-      } else {
-        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid alternate: " + alternate);
-      }
-    }
-    if (caseLevel != null) {
-      rbc.setCaseLevel(Boolean.parseBoolean(caseLevel));
-    }
-    if (caseFirst != null) {
-      if (caseFirst.equalsIgnoreCase("lower")) {
-        rbc.setLowerCaseFirst(true);
-      } else if (caseFirst.equalsIgnoreCase("upper")) {
-        rbc.setUpperCaseFirst(true);
-      } else {
-        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid caseFirst: " + caseFirst);
-      }
-    }
-    if (numeric != null) {
-      rbc.setNumericCollation(Boolean.parseBoolean(numeric));
-    }
-    if (variableTop != null) {
-      rbc.setVariableTop(variableTop);
-    }
-
-    analyzer = new ICUCollationKeyAnalyzer(collator);
-  }
-  
-  /**
-   * Create a locale from localeID.
-   * Then return the appropriate collator for the locale.
-   */
-  private Collator createFromLocale(String localeID) {
-    return Collator.getInstance(new ULocale(localeID));
-  }
-  
-  /**
-   * Read custom rules from a file, and create a RuleBasedCollator
-   * The file cannot support comments, as # might be in the rules!
-   */
-  static Collator createFromRules(String fileName, ResourceLoader loader) {
-    InputStream input = null;
-    try {
-     input = loader.openResource(fileName);
-     String rules = IOUtils.toString(input, "UTF-8");
-     return new RuleBasedCollator(rules);
-    } catch (Exception e) {
-      // io error or invalid rules
-      throw new RuntimeException(e);
-    } finally {
-      IOUtils.closeQuietly(input);
-    }
-  }
-
-  @Override
-  public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException {
-    writer.writeStr(name, f.stringValue(), true);
-  }
-
-  @Override
-  public SortField getSortField(SchemaField field, boolean top) {
-    return getStringSort(field, top);
-  }
-  
-  @Override
-  public Type getUninversionType(SchemaField sf) {
-    if (sf.multiValued()) {
-      return Type.SORTED_SET_BINARY; 
-    } else {
-      return Type.SORTED;
-    }
-  }
-
-  @Override
-  public Analyzer getIndexAnalyzer() {
-    return analyzer;
-  }
-
-  @Override
-  public Analyzer getQueryAnalyzer() {
-    return analyzer;
-  }
-
-  /**
-   * analyze the text with the analyzer, instead of the collator.
-   * because icu collators are not thread safe, this keeps things 
-   * simple (we already have a threadlocal clone in the reused TS)
-   */
-  private BytesRef getCollationKey(String field, String text) {
-    try (TokenStream source = analyzer.tokenStream(field, text)) {
-      source.reset();
-      
-      TermToBytesRefAttribute termAtt = source.getAttribute(TermToBytesRefAttribute.class);
-      
-
-      // we control the analyzer here: most errors are impossible
-      if (!source.incrementToken())
-        throw new IllegalArgumentException("analyzer returned no terms for text: " + text);
-      BytesRef bytes = BytesRef.deepCopyOf(termAtt.getBytesRef());
-      assert !source.incrementToken();
-      
-      source.end();
-      return bytes;
-    } catch (IOException e) {
-      throw new RuntimeException("Unable to analyze text: " + text, e);
-    }
-  }
-  
-  @Override
-  public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive) {
-    String f = field.getName();
-    BytesRef low = part1 == null ? null : getCollationKey(f, part1);
-    BytesRef high = part2 == null ? null : getCollationKey(f, part2);
-    if (!field.indexed() && field.hasDocValues()) {
-      return SortedSetDocValuesField.newSlowRangeQuery(
-          field.getName(), low, high, minInclusive, maxInclusive);
-    } else {
-      return new TermRangeQuery(field.getName(), low, high, minInclusive, maxInclusive);
-    }
-  }
-
-  @Override
-  protected void checkSupportsDocValues() { // we support DocValues
-  }
-
-  @Override
-  public List<IndexableField> createFields(SchemaField field, Object value) {
-    if (field.hasDocValues()) {
-      List<IndexableField> fields = new ArrayList<>();
-      fields.add(createField(field, value));
-      final BytesRef bytes = getCollationKey(field.getName(), value.toString());
-      if (field.multiValued()) {
-        fields.add(new SortedSetDocValuesField(field.getName(), bytes));
-      } else {
-        fields.add(new SortedDocValuesField(field.getName(), bytes));
-      }
-      return fields;
-    } else {
-      return Collections.singletonList(createField(field, value));
-    }
-  }
-
-  @Override
-  public Object marshalSortValue(Object value) {
-    return marshalBase64SortValue(value);
-  }
-
-  @Override
-  public Object unmarshalSortValue(Object value) {
-    return unmarshalBase64SortValue(value);
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/package.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/package.html b/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/package.html
deleted file mode 100644
index 27d68db..0000000
--- a/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/package.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!-- not a package-info.java, because we already defined this package in core/ -->
-<html>
-<body>
-<code>FieldType</code> plugins that have additional dependencies.
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java b/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
deleted file mode 100644
index d69c367..0000000
--- a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.update.processor;
-
-import java.io.IOException;
-import java.lang.invoke.MethodHandles;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-import opennlp.tools.util.Span;
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.opennlp.OpenNLPTokenizer;
-import org.apache.lucene.analysis.opennlp.tools.NLPNERTaggerOp;
-import org.apache.lucene.analysis.opennlp.tools.OpenNLPOpsFactory;
-import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-import org.apache.lucene.analysis.tokenattributes.FlagsAttribute;
-import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
-import org.apache.solr.common.SolrException;
-import org.apache.solr.common.SolrInputDocument;
-import org.apache.solr.common.SolrInputField;
-import org.apache.solr.common.util.NamedList;
-import org.apache.solr.common.util.Pair;
-import org.apache.solr.core.SolrCore;
-import org.apache.solr.request.SolrQueryRequest;
-import org.apache.solr.response.SolrQueryResponse;
-import org.apache.solr.schema.FieldType;
-import org.apache.solr.update.AddUpdateCommand;
-import org.apache.solr.update.processor.FieldMutatingUpdateProcessor.FieldNameSelector;
-import org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory.SelectorParams;
-import org.apache.solr.util.plugin.SolrCoreAware;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.solr.common.SolrException.ErrorCode.SERVER_ERROR;
-
-/**
- * Extracts named entities using an OpenNLP NER <code>modelFile</code> from the values found in
- * any matching <code>source</code> field into a configured <code>dest</code> field, after
- * first tokenizing the source text using the index analyzer on the configured
- * <code>analyzerFieldType</code>, which must include <code>solr.OpenNLPTokenizerFactory</code>
- * as the tokenizer. E.g.:
- *
- * <pre class="prettyprint">
- *   &lt;fieldType name="opennlp-en-tokenization" class="solr.TextField"&gt;
- *     &lt;analyzer&gt;
- *       &lt;tokenizer class="solr.OpenNLPTokenizerFactory"
- *                  sentenceModel="en-sent.bin"
- *                  tokenizerModel="en-tokenizer.bin"/&gt;
- *     &lt;/analyzer&gt;
- *   &lt;/fieldType&gt;
- * </pre>
- * 
- * <p>See the <a href="http://opennlp.apache.org/models.html">OpenNLP website</a>
- * for information on downloading pre-trained models.</p>
- *
- * Note that in order to use model files larger than 1MB on SolrCloud, 
- * <a href="https://lucene.apache.org/solr/guide/setting-up-an-external-zookeeper-ensemble#increasing-zookeeper-s-1mb-file-size-limit"
- * >ZooKeeper server and client configuration is required</a>.
- * 
- * <p>
- * The <code>source</code> field(s) can be configured as either:
- * </p>
- * <ul>
- *  <li>One or more <code>&lt;str&gt;</code></li>
- *  <li>An <code>&lt;arr&gt;</code> of <code>&lt;str&gt;</code></li>
- *  <li>A <code>&lt;lst&gt;</code> containing
- *   {@link FieldMutatingUpdateProcessor FieldMutatingUpdateProcessorFactory style selector arguments}</li>
- * </ul>
- *
- * <p>The <code>dest</code> field can be a single <code>&lt;str&gt;</code>
- * containing the literal name of a destination field, or it may be a <code>&lt;lst&gt;</code> specifying a
- * regex <code>pattern</code> and a <code>replacement</code> string. If the pattern + replacement option
- * is used the pattern will be matched against all fields matched by the source selector, and the replacement
- * string (including any capture groups specified from the pattern) will be evaluated a using
- * {@link Matcher#replaceAll(String)} to generate the literal name of the destination field.  Additionally,
- * an occurrence of the string "{EntityType}" in the <code>dest</code> field specification, or in the
- * <code>replacement</code> string, will be replaced with the entity type(s) returned for each entity by
- * the OpenNLP NER model; as a result, if the model extracts more than one entity type, then more than one
- * <code>dest</code> field will be populated.
- * </p>
- *
- * <p>If the resolved <code>dest</code> field already exists in the document, then the
- * named entities extracted from the <code>source</code> fields will be added to it.
- * </p>
- * <p>
- * In the example below:
- * </p>
- * <ul>
- *   <li>Named entities will be extracted from the <code>text</code> field and added
- *       to the <code>names_ss</code> field</li>
- *   <li>Named entities will be extracted from both the <code>title</code> and
- *       <code>subtitle</code> fields and added into the <code>titular_people</code> field</li>
- *   <li>Named entities will be extracted from any field with a name ending in <code>_txt</code>
- *       -- except for <code>notes_txt</code> -- and added into the <code>people_ss</code> field</li>
- *   <li>Named entities will be extracted from any field with a name beginning with "desc" and
- *       ending in "s" (e.g. "descs" and "descriptions") and added to a field prefixed with "key_",
- *       not ending in "s", and suffixed with "_people". (e.g. "key_desc_people" or
- *       "key_description_people")</li>
- *   <li>Named entities will be extracted from the <code>summary</code> field and added
- *       to the <code>summary_person_ss</code> field, assuming that the modelFile only extracts
- *       entities of type "person".</li>
- * </ul>
- *
- * <pre class="prettyprint">
- * &lt;updateRequestProcessorChain name="multiple-extract"&gt;
- *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
- *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
- *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
- *     &lt;str name="source"&gt;text&lt;/str&gt;
- *     &lt;str name="dest"&gt;people_s&lt;/str&gt;
- *   &lt;/processor&gt;
- *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
- *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
- *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
- *     &lt;arr name="source"&gt;
- *       &lt;str&gt;title&lt;/str&gt;
- *       &lt;str&gt;subtitle&lt;/str&gt;
- *     &lt;/arr&gt;
- *     &lt;str name="dest"&gt;titular_people&lt;/str&gt;
- *   &lt;/processor&gt;
- *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
- *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
- *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
- *     &lt;lst name="source"&gt;
- *       &lt;str name="fieldRegex"&gt;.*_txt$&lt;/str&gt;
- *       &lt;lst name="exclude"&gt;
- *         &lt;str name="fieldName"&gt;notes_txt&lt;/str&gt;
- *       &lt;/lst&gt;
- *     &lt;/lst&gt;
- *     &lt;str name="dest"&gt;people_s&lt;/str&gt;
- *   &lt;/processor&gt;
- *   &lt;processor class="solr.processor.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
- *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
- *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
- *     &lt;lst name="source"&gt;
- *       &lt;str name="fieldRegex"&gt;^desc(.*)s$&lt;/str&gt;
- *     &lt;/lst&gt;
- *     &lt;lst name="dest"&gt;
- *       &lt;str name="pattern"&gt;^desc(.*)s$&lt;/str&gt;
- *       &lt;str name="replacement"&gt;key_desc$1_people&lt;/str&gt;
- *     &lt;/lst&gt;
- *   &lt;/processor&gt;
- *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
- *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
- *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
- *     &lt;str name="source"&gt;summary&lt;/str&gt;
- *     &lt;str name="dest"&gt;summary_{EntityType}_s&lt;/str&gt;
- *   &lt;/processor&gt;
- *   &lt;processor class="solr.LogUpdateProcessorFactory" /&gt;
- *   &lt;processor class="solr.RunUpdateProcessorFactory" /&gt;
- * &lt;/updateRequestProcessorChain&gt;
- * </pre>
- *
- * @since 7.3.0
- */
-public class OpenNLPExtractNamedEntitiesUpdateProcessorFactory
-    extends UpdateRequestProcessorFactory implements SolrCoreAware {
-
-  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
-  public static final String SOURCE_PARAM = "source";
-  public static final String DEST_PARAM = "dest";
-  public static final String PATTERN_PARAM = "pattern";
-  public static final String REPLACEMENT_PARAM = "replacement";
-  public static final String MODEL_PARAM = "modelFile";
-  public static final String ANALYZER_FIELD_TYPE_PARAM = "analyzerFieldType";
-  public static final String ENTITY_TYPE = "{EntityType}";
-
-  private SelectorParams srcInclusions = new SelectorParams();
-  private Collection<SelectorParams> srcExclusions = new ArrayList<>();
-
-  private FieldNameSelector srcSelector = null;
-
-  private String modelFile = null;
-  private String analyzerFieldType = null;
-
-  /**
-   * If pattern is null, this this is a literal field name.  If pattern is non-null then this
-   * is a replacement string that may contain meta-characters (ie: capture group identifiers)
-   * @see #pattern
-   */
-  private String dest = null;
-  /** @see #dest */
-  private Pattern pattern = null;
-
-  protected final FieldNameSelector getSourceSelector() {
-    if (null != srcSelector) return srcSelector;
-
-    throw new SolrException(SERVER_ERROR, "selector was never initialized, inform(SolrCore) never called???");
-  }
-
-  @SuppressWarnings("unchecked")
-  @Override
-  public void init(NamedList args) {
-
-    // high level (loose) check for which type of config we have.
-    //
-    // individual init methods do more strict syntax checking
-    if (0 <= args.indexOf(SOURCE_PARAM, 0) && 0 <= args.indexOf(DEST_PARAM, 0) ) {
-      initSourceSelectorSyntax(args);
-    } else if (0 <= args.indexOf(PATTERN_PARAM, 0) && 0 <= args.indexOf(REPLACEMENT_PARAM, 0)) {
-      initSimpleRegexReplacement(args);
-    } else {
-      throw new SolrException(SERVER_ERROR, "A combination of either '" + SOURCE_PARAM + "' + '"+
-          DEST_PARAM + "', or '" + REPLACEMENT_PARAM + "' + '" +
-          PATTERN_PARAM + "' init params are mandatory");
-    }
-
-    Object modelParam = args.remove(MODEL_PARAM);
-    if (null == modelParam) {
-      throw new SolrException(SERVER_ERROR, "Missing required init param '" + MODEL_PARAM + "'");
-    }
-    if ( ! (modelParam instanceof CharSequence)) {
-      throw new SolrException(SERVER_ERROR, "Init param '" + MODEL_PARAM + "' must be a <str>");
-    }
-    modelFile = modelParam.toString();
-
-    Object analyzerFieldTypeParam = args.remove(ANALYZER_FIELD_TYPE_PARAM);
-    if (null == analyzerFieldTypeParam) {
-      throw new SolrException(SERVER_ERROR, "Missing required init param '" + ANALYZER_FIELD_TYPE_PARAM + "'");
-    }
-    if ( ! (analyzerFieldTypeParam instanceof CharSequence)) {
-      throw new SolrException(SERVER_ERROR, "Init param '" + ANALYZER_FIELD_TYPE_PARAM + "' must be a <str>");
-    }
-    analyzerFieldType = analyzerFieldTypeParam.toString();
-
-    if (0 < args.size()) {
-      throw new SolrException(SERVER_ERROR, "Unexpected init param(s): '" + args.getName(0) + "'");
-    }
-
-    super.init(args);
-  }
-
-  /**
-   * init helper method that should only be called when we know for certain that both the
-   * "source" and "dest" init params do <em>not</em> exist.
-   */
-  @SuppressWarnings("unchecked")
-  private void initSimpleRegexReplacement(NamedList args) {
-    // The syntactic sugar for the case where there is only one regex pattern for source and the same pattern
-    // is used for the destination pattern...
-    //
-    //  pattern != null && replacement != null
-    //
-    // ...as top level elements, with no other config options specified
-
-    // if we got here we know we had pattern and replacement, now check for the other two  so that we can give a better
-    // message than "unexpected"
-    if (0 <= args.indexOf(SOURCE_PARAM, 0) || 0 <= args.indexOf(DEST_PARAM, 0) ) {
-      throw new SolrException(SERVER_ERROR,"Short hand syntax must not be mixed with full syntax. Found " +
-          PATTERN_PARAM + " and " + REPLACEMENT_PARAM + " but also found " + SOURCE_PARAM + " or " + DEST_PARAM);
-    }
-
-    assert args.indexOf(SOURCE_PARAM, 0) < 0;
-
-    Object patt = args.remove(PATTERN_PARAM);
-    Object replacement = args.remove(REPLACEMENT_PARAM);
-
-    if (null == patt || null == replacement) {
-      throw new SolrException(SERVER_ERROR, "Init params '" + PATTERN_PARAM + "' and '" +
-          REPLACEMENT_PARAM + "' are both mandatory if '" + SOURCE_PARAM + "' and '"+
-          DEST_PARAM + "' are not both specified");
-    }
-
-    if (0 != args.size()) {
-      throw new SolrException(SERVER_ERROR, "Init params '" + REPLACEMENT_PARAM + "' and '" +
-          PATTERN_PARAM + "' must be children of '" + DEST_PARAM +
-          "' to be combined with other options.");
-    }
-
-    if (!(replacement instanceof String)) {
-      throw new SolrException(SERVER_ERROR, "Init param '" + REPLACEMENT_PARAM + "' must be a string (i.e. <str>)");
-    }
-    if (!(patt instanceof String)) {
-      throw new SolrException(SERVER_ERROR, "Init param '" + PATTERN_PARAM + "' must be a string (i.e. <str>)");
-    }
-
-    dest = replacement.toString();
-    try {
-      this.pattern = Pattern.compile(patt.toString());
-    } catch (PatternSyntaxException pe) {
-      throw new SolrException(SERVER_ERROR, "Init param " + PATTERN_PARAM +
-          " is not a valid regex pattern: " + patt, pe);
-
-    }
-    srcInclusions = new SelectorParams();
-    srcInclusions.fieldRegex = Collections.singletonList(this.pattern);
-  }
-
-  /**
-   * init helper method that should only be called when we know for certain that both the
-   * "source" and "dest" init params <em>do</em> exist.
-   */
-  @SuppressWarnings("unchecked")
-  private void initSourceSelectorSyntax(NamedList args) {
-    // Full and complete syntax where source and dest are mandatory.
-    //
-    // source may be a single string or a selector.
-    // dest may be a single string or list containing pattern and replacement
-    //
-    //   source != null && dest != null
-
-    // if we got here we know we had source and dest, now check for the other two so that we can give a better
-    // message than "unexpected"
-    if (0 <= args.indexOf(PATTERN_PARAM, 0) || 0 <= args.indexOf(REPLACEMENT_PARAM, 0) ) {
-      throw new SolrException(SERVER_ERROR,"Short hand syntax must not be mixed with full syntax. Found " +
-          SOURCE_PARAM + " and " + DEST_PARAM + " but also found " + PATTERN_PARAM + " or " + REPLACEMENT_PARAM);
-    }
-
-    Object d = args.remove(DEST_PARAM);
-    assert null != d;
-
-    List<Object> sources = args.getAll(SOURCE_PARAM);
-    assert null != sources;
-
-    if (1 == sources.size()) {
-      if (sources.get(0) instanceof NamedList) {
-        // nested set of selector options
-        NamedList selectorConfig = (NamedList) args.remove(SOURCE_PARAM);
-
-        srcInclusions = parseSelectorParams(selectorConfig);
-
-        List<Object> excList = selectorConfig.getAll("exclude");
-
-        for (Object excObj : excList) {
-          if (null == excObj) {
-            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
-                "' child 'exclude' can not be null");
-          }
-          if (!(excObj instanceof NamedList)) {
-            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
-                "' child 'exclude' must be <lst/>");
-          }
-          NamedList exc = (NamedList) excObj;
-          srcExclusions.add(parseSelectorParams(exc));
-          if (0 < exc.size()) {
-            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
-                "' has unexpected 'exclude' sub-param(s): '"
-                + selectorConfig.getName(0) + "'");
-          }
-          // call once per instance
-          selectorConfig.remove("exclude");
-        }
-
-        if (0 < selectorConfig.size()) {
-          throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
-              "' contains unexpected child param(s): '" +
-              selectorConfig.getName(0) + "'");
-        }
-        // consume from the named list so it doesn't interfere with subsequent processing
-        sources.remove(0);
-      }
-    }
-    if (1 <= sources.size()) {
-      // source better be one or more strings
-      srcInclusions.fieldName = new HashSet<>(args.removeConfigArgs("source"));
-    }
-    if (srcInclusions == null) {
-      throw new SolrException(SERVER_ERROR,
-          "Init params do not specify any field from which to extract entities, please supply either "
-          + SOURCE_PARAM + " and " + DEST_PARAM + " or " + PATTERN_PARAM + " and " + REPLACEMENT_PARAM + ". See javadocs" +
-          "for OpenNLPExtractNamedEntitiesUpdateProcessor for further details.");
-    }
-
-    if (d instanceof NamedList) {
-      NamedList destList = (NamedList) d;
-
-      Object patt = destList.remove(PATTERN_PARAM);
-      Object replacement = destList.remove(REPLACEMENT_PARAM);
-
-      if (null == patt || null == replacement) {
-        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' children '" +
-            PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM +
-            "' are both mandatory and can not be null");
-      }
-      if (! (patt instanceof String && replacement instanceof String)) {
-        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' children '" +
-            PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM +
-            "' must both be strings (i.e. <str>)");
-      }
-      if (0 != destList.size()) {
-        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' has unexpected children: '"
-            + destList.getName(0) + "'");
-      }
-
-      try {
-        this.pattern = Pattern.compile(patt.toString());
-      } catch (PatternSyntaxException pe) {
-        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' child '" + PATTERN_PARAM +
-            " is not a valid regex pattern: " + patt, pe);
-      }
-      dest = replacement.toString();
-
-    } else if (d instanceof String) {
-      dest = d.toString();
-    } else {
-      throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' must either be a string " +
-          "(i.e. <str>) or a list (i.e. <lst>) containing '" +
-          PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM);
-    }
-
-  }
-
-  @Override
-  public void inform(final SolrCore core) {
-
-    srcSelector =
-        FieldMutatingUpdateProcessor.createFieldNameSelector
-            (core.getResourceLoader(), core, srcInclusions, FieldMutatingUpdateProcessor.SELECT_NO_FIELDS);
-
-    for (SelectorParams exc : srcExclusions) {
-      srcSelector = FieldMutatingUpdateProcessor.wrap
-          (srcSelector,
-              FieldMutatingUpdateProcessor.createFieldNameSelector
-                  (core.getResourceLoader(), core, exc, FieldMutatingUpdateProcessor.SELECT_NO_FIELDS));
-    }
-    try {
-      OpenNLPOpsFactory.getNERTaggerModel(modelFile, core.getResourceLoader());
-    } catch (IOException e) {
-      throw new IllegalArgumentException(e);
-    }
-  }
-
-  @Override
-  public final UpdateRequestProcessor getInstance
-      (SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
-    final FieldNameSelector srcSelector = getSourceSelector();
-    return new UpdateRequestProcessor(next) {
-      private final NLPNERTaggerOp nerTaggerOp;
-      private Analyzer analyzer = null;
-      {
-        try {
-          nerTaggerOp = OpenNLPOpsFactory.getNERTagger(modelFile);
-          FieldType fieldType = req.getSchema().getFieldTypeByName(analyzerFieldType);
-          if (fieldType == null) {
-            throw new SolrException
-                (SERVER_ERROR, ANALYZER_FIELD_TYPE_PARAM + " '" + analyzerFieldType + "' not found in the schema.");
-          }
-          analyzer = fieldType.getIndexAnalyzer();
-        } catch (IOException e) {
-          throw new IllegalArgumentException(e);
-        }
-      }
-
-      @Override
-      public void processAdd(AddUpdateCommand cmd) throws IOException {
-
-        final SolrInputDocument doc = cmd.getSolrInputDocument();
-
-        // Destination may be regex replace string, or "{EntityType}" replaced by
-        // each entity's type, both of which can cause multiple output fields.
-        Map<String,SolrInputField> destMap = new HashMap<>();
-
-        // preserve initial values
-        for (final String fname : doc.getFieldNames()) {
-          if ( ! srcSelector.shouldMutate(fname)) continue;
-
-          Collection<Object> srcFieldValues = doc.getFieldValues(fname);
-          if (srcFieldValues == null || srcFieldValues.isEmpty()) continue;
-
-          String resolvedDest = dest;
-
-          if (pattern != null) {
-            Matcher matcher = pattern.matcher(fname);
-            if (matcher.find()) {
-              resolvedDest = matcher.replaceAll(dest);
-            } else {
-              log.debug("srcSelector.shouldMutate(\"{}\") returned true, " +
-                  "but replacement pattern did not match, field skipped.", fname);
-              continue;
-            }
-          }
-
-          for (Object val : srcFieldValues) {
-            for (Pair<String,String> entity : extractTypedNamedEntities(val)) {
-              SolrInputField destField = null;
-              String entityName = entity.first();
-              String entityType = entity.second();
-              final String resolved = resolvedDest.replace(ENTITY_TYPE, entityType);
-              if (doc.containsKey(resolved)) {
-                destField = doc.getField(resolved);
-              } else {
-                SolrInputField targetField = destMap.get(resolved);
-                if (targetField == null) {
-                  destField = new SolrInputField(resolved);
-                } else {
-                  destField = targetField;
-                }
-              }
-              destField.addValue(entityName);
-
-              // put it in map to avoid concurrent modification...
-              destMap.put(resolved, destField);
-            }
-          }
-        }
-
-        for (Map.Entry<String,SolrInputField> entry : destMap.entrySet()) {
-          doc.put(entry.getKey(), entry.getValue());
-        }
-        super.processAdd(cmd);
-      }
-
-      /** Using configured NER model, extracts (name, type) pairs from the given source field value */
-      private List<Pair<String,String>> extractTypedNamedEntities(Object srcFieldValue) throws IOException {
-        List<Pair<String,String>> entitiesWithType = new ArrayList<>();
-        List<String> terms = new ArrayList<>();
-        List<Integer> startOffsets = new ArrayList<>();
-        List<Integer> endOffsets = new ArrayList<>();
-        String fullText = srcFieldValue.toString();
-        TokenStream tokenStream = analyzer.tokenStream("", fullText);
-        CharTermAttribute termAtt = tokenStream.addAttribute(CharTermAttribute.class);
-        OffsetAttribute offsetAtt = tokenStream.addAttribute(OffsetAttribute.class);
-        FlagsAttribute flagsAtt = tokenStream.addAttribute(FlagsAttribute.class);
-        tokenStream.reset();
-        synchronized (nerTaggerOp) {
-          while (tokenStream.incrementToken()) {
-            terms.add(termAtt.toString());
-            startOffsets.add(offsetAtt.startOffset());
-            endOffsets.add(offsetAtt.endOffset());
-            boolean endOfSentence = 0 != (flagsAtt.getFlags() & OpenNLPTokenizer.EOS_FLAG_BIT);
-            if (endOfSentence) {    // extract named entities one sentence at a time
-              extractEntitiesFromSentence(fullText, terms, startOffsets, endOffsets, entitiesWithType);
-            }
-          }
-          tokenStream.end();
-          tokenStream.close();
-          if (!terms.isEmpty()) { // In case last token of last sentence isn't properly flagged with EOS_FLAG_BIT
-            extractEntitiesFromSentence(fullText, terms, startOffsets, endOffsets, entitiesWithType);
-          }
-          nerTaggerOp.reset();      // Forget all adaptive data collected during previous calls
-        }
-        return entitiesWithType;
-      }
-
-      private void extractEntitiesFromSentence(String fullText, List<String> terms, List<Integer> startOffsets,
-                                               List<Integer> endOffsets, List<Pair<String,String>> entitiesWithType) {
-        for (Span span : nerTaggerOp.getNames(terms.toArray(new String[terms.size()]))) {
-          String text = fullText.substring(startOffsets.get(span.getStart()), endOffsets.get(span.getEnd() - 1));
-          entitiesWithType.add(new Pair<>(text, span.getType()));
-        }
-        terms.clear();
-        startOffsets.clear();
-        endOffsets.clear();
-      }
-    };
-  }
-
-  /** macro */
-  private static SelectorParams parseSelectorParams(NamedList args) {
-    return FieldMutatingUpdateProcessorFactory.parseSelectorParams(args);
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/package.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/package.html b/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/package.html
deleted file mode 100644
index 1388c29..0000000
--- a/solr/contrib/analysis-extras/src/java/org/apache/solr/update/processor/package.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!-- not a package-info.java, because we already defined this package in core/ -->
-<html>
-  <body>
-    Update request processor invoking OpenNLP Named Entity Recognition over configured
-    source field(s), populating configured target field(s) with the results.
-  </body>
-</html>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/java/overview.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/java/overview.html b/solr/contrib/analysis-extras/src/java/overview.html
deleted file mode 100644
index f3d70ca..0000000
--- a/solr/contrib/analysis-extras/src/java/overview.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<html>
-<body>
-Apache Solr Search Server: Analysis Extras contrib
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/ICUCollationField.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/ICUCollationField.java b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/ICUCollationField.java
new file mode 100644
index 0000000..f723a25
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/ICUCollationField.java
@@ -0,0 +1,311 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.schema;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
+import org.apache.lucene.analysis.util.ResourceLoader;
+import org.apache.lucene.collation.ICUCollationKeyAnalyzer;
+import org.apache.lucene.document.SortedDocValuesField;
+import org.apache.lucene.document.SortedSetDocValuesField;
+import org.apache.lucene.index.IndexableField;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.SortField;
+import org.apache.lucene.search.TermRangeQuery;
+import org.apache.lucene.util.BytesRef;
+import org.apache.solr.common.SolrException.ErrorCode;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.response.TextResponseWriter;
+import org.apache.solr.search.QParser;
+import org.apache.solr.uninverting.UninvertingReader.Type;
+
+import com.ibm.icu.text.Collator;
+import com.ibm.icu.text.RuleBasedCollator;
+import com.ibm.icu.util.ULocale;
+
+/**
+ * Field for collated sort keys. 
+ * These can be used for locale-sensitive sort and range queries.
+ * <p>
+ * This field can be created in two ways: 
+ * <ul>
+ *  <li>Based upon a system collator associated with a Locale.
+ *  <li>Based upon a tailored ruleset.
+ * </ul>
+ * <p>
+ * Using a System collator:
+ * <ul>
+ *  <li>locale: RFC 3066 locale ID (mandatory)
+ *  <li>strength: 'primary','secondary','tertiary', 'quaternary', or 'identical' (optional)
+ *  <li>decomposition: 'no', or 'canonical' (optional)
+ * </ul>
+ * <p>
+ * Using a Tailored ruleset:
+ * <ul>
+ *  <li>custom: UTF-8 text file containing rules supported by RuleBasedCollator (mandatory)
+ *  <li>strength: 'primary','secondary','tertiary', 'quaternary', or 'identical' (optional)
+ *  <li>decomposition: 'no' or 'canonical' (optional)
+ * </ul>
+ * <p>
+ * Expert options:
+ * <ul>
+ *  <li>alternate: 'shifted' or 'non-ignorable'. Can be used to ignore punctuation/whitespace.
+ *  <li>caseLevel: 'true' or 'false'. Useful with strength=primary to ignore accents but not case.
+ *  <li>caseFirst: 'lower' or 'upper'. Useful to control which is sorted first when case is not ignored.
+ *  <li>numeric: 'true' or 'false'. Digits are sorted according to numeric value, e.g. foobar-9 sorts before foobar-10
+ *  <li>variableTop: single character or contraction. Controls what is variable for 'alternate'
+ * </ul>
+ * 
+ * @see Collator
+ * @see ULocale
+ * @see RuleBasedCollator
+ */
+public class ICUCollationField extends FieldType {
+  private Analyzer analyzer;
+
+  @Override
+  protected void init(IndexSchema schema, Map<String,String> args) {
+    properties |= TOKENIZED; // this ensures our analyzer gets hit
+    setup(schema.getResourceLoader(), args);
+    super.init(schema, args);
+  }
+  
+  /**
+   * Setup the field according to the provided parameters
+   */
+  private void setup(ResourceLoader loader, Map<String,String> args) {
+    String custom = args.remove("custom");
+    String localeID = args.remove("locale");
+    String strength = args.remove("strength");
+    String decomposition = args.remove("decomposition");
+    
+    String alternate = args.remove("alternate");
+    String caseLevel = args.remove("caseLevel");
+    String caseFirst = args.remove("caseFirst");
+    String numeric = args.remove("numeric");
+    String variableTop = args.remove("variableTop");
+
+    if (custom == null && localeID == null)
+      throw new SolrException(ErrorCode.SERVER_ERROR, "Either custom or locale is required.");
+    
+    if (custom != null && localeID != null)
+      throw new SolrException(ErrorCode.SERVER_ERROR, "Cannot specify both locale and custom. "
+          + "To tailor rules for a built-in language, see the javadocs for RuleBasedCollator. "
+          + "Then save the entire customized ruleset to a file, and use with the custom parameter");
+    
+    final Collator collator;
+    
+    if (localeID != null) { 
+      // create from a system collator, based on Locale.
+      collator = createFromLocale(localeID);
+    } else { 
+      // create from a custom ruleset
+      collator = createFromRules(custom, loader);
+    }
+    
+    // set the strength flag, otherwise it will be the default.
+    if (strength != null) {
+      if (strength.equalsIgnoreCase("primary"))
+        collator.setStrength(Collator.PRIMARY);
+      else if (strength.equalsIgnoreCase("secondary"))
+        collator.setStrength(Collator.SECONDARY);
+      else if (strength.equalsIgnoreCase("tertiary"))
+        collator.setStrength(Collator.TERTIARY);
+      else if (strength.equalsIgnoreCase("quaternary"))
+        collator.setStrength(Collator.QUATERNARY);
+      else if (strength.equalsIgnoreCase("identical"))
+        collator.setStrength(Collator.IDENTICAL);
+      else
+        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid strength: " + strength);
+    }
+    
+    // set the decomposition flag, otherwise it will be the default.
+    if (decomposition != null) {
+      if (decomposition.equalsIgnoreCase("no"))
+        collator.setDecomposition(Collator.NO_DECOMPOSITION);
+      else if (decomposition.equalsIgnoreCase("canonical"))
+        collator.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
+      else
+        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid decomposition: " + decomposition);
+    }
+    
+    // expert options: concrete subclasses are always a RuleBasedCollator
+    RuleBasedCollator rbc = (RuleBasedCollator) collator;
+    if (alternate != null) {
+      if (alternate.equalsIgnoreCase("shifted")) {
+        rbc.setAlternateHandlingShifted(true);
+      } else if (alternate.equalsIgnoreCase("non-ignorable")) {
+        rbc.setAlternateHandlingShifted(false);
+      } else {
+        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid alternate: " + alternate);
+      }
+    }
+    if (caseLevel != null) {
+      rbc.setCaseLevel(Boolean.parseBoolean(caseLevel));
+    }
+    if (caseFirst != null) {
+      if (caseFirst.equalsIgnoreCase("lower")) {
+        rbc.setLowerCaseFirst(true);
+      } else if (caseFirst.equalsIgnoreCase("upper")) {
+        rbc.setUpperCaseFirst(true);
+      } else {
+        throw new SolrException(ErrorCode.SERVER_ERROR, "Invalid caseFirst: " + caseFirst);
+      }
+    }
+    if (numeric != null) {
+      rbc.setNumericCollation(Boolean.parseBoolean(numeric));
+    }
+    if (variableTop != null) {
+      rbc.setVariableTop(variableTop);
+    }
+
+    analyzer = new ICUCollationKeyAnalyzer(collator);
+  }
+  
+  /**
+   * Create a locale from localeID.
+   * Then return the appropriate collator for the locale.
+   */
+  private Collator createFromLocale(String localeID) {
+    return Collator.getInstance(new ULocale(localeID));
+  }
+  
+  /**
+   * Read custom rules from a file, and create a RuleBasedCollator
+   * The file cannot support comments, as # might be in the rules!
+   */
+  static Collator createFromRules(String fileName, ResourceLoader loader) {
+    InputStream input = null;
+    try {
+     input = loader.openResource(fileName);
+     String rules = IOUtils.toString(input, "UTF-8");
+     return new RuleBasedCollator(rules);
+    } catch (Exception e) {
+      // io error or invalid rules
+      throw new RuntimeException(e);
+    } finally {
+      IOUtils.closeQuietly(input);
+    }
+  }
+
+  @Override
+  public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException {
+    writer.writeStr(name, f.stringValue(), true);
+  }
+
+  @Override
+  public SortField getSortField(SchemaField field, boolean top) {
+    return getStringSort(field, top);
+  }
+  
+  @Override
+  public Type getUninversionType(SchemaField sf) {
+    if (sf.multiValued()) {
+      return Type.SORTED_SET_BINARY; 
+    } else {
+      return Type.SORTED;
+    }
+  }
+
+  @Override
+  public Analyzer getIndexAnalyzer() {
+    return analyzer;
+  }
+
+  @Override
+  public Analyzer getQueryAnalyzer() {
+    return analyzer;
+  }
+
+  /**
+   * analyze the text with the analyzer, instead of the collator.
+   * because icu collators are not thread safe, this keeps things 
+   * simple (we already have a threadlocal clone in the reused TS)
+   */
+  private BytesRef getCollationKey(String field, String text) {
+    try (TokenStream source = analyzer.tokenStream(field, text)) {
+      source.reset();
+      
+      TermToBytesRefAttribute termAtt = source.getAttribute(TermToBytesRefAttribute.class);
+      
+
+      // we control the analyzer here: most errors are impossible
+      if (!source.incrementToken())
+        throw new IllegalArgumentException("analyzer returned no terms for text: " + text);
+      BytesRef bytes = BytesRef.deepCopyOf(termAtt.getBytesRef());
+      assert !source.incrementToken();
+      
+      source.end();
+      return bytes;
+    } catch (IOException e) {
+      throw new RuntimeException("Unable to analyze text: " + text, e);
+    }
+  }
+  
+  @Override
+  public Query getRangeQuery(QParser parser, SchemaField field, String part1, String part2, boolean minInclusive, boolean maxInclusive) {
+    String f = field.getName();
+    BytesRef low = part1 == null ? null : getCollationKey(f, part1);
+    BytesRef high = part2 == null ? null : getCollationKey(f, part2);
+    if (!field.indexed() && field.hasDocValues()) {
+      return SortedSetDocValuesField.newSlowRangeQuery(
+          field.getName(), low, high, minInclusive, maxInclusive);
+    } else {
+      return new TermRangeQuery(field.getName(), low, high, minInclusive, maxInclusive);
+    }
+  }
+
+  @Override
+  protected void checkSupportsDocValues() { // we support DocValues
+  }
+
+  @Override
+  public List<IndexableField> createFields(SchemaField field, Object value) {
+    if (field.hasDocValues()) {
+      List<IndexableField> fields = new ArrayList<>();
+      fields.add(createField(field, value));
+      final BytesRef bytes = getCollationKey(field.getName(), value.toString());
+      if (field.multiValued()) {
+        fields.add(new SortedSetDocValuesField(field.getName(), bytes));
+      } else {
+        fields.add(new SortedDocValuesField(field.getName(), bytes));
+      }
+      return fields;
+    } else {
+      return Collections.singletonList(createField(field, value));
+    }
+  }
+
+  @Override
+  public Object marshalSortValue(Object value) {
+    return marshalBase64SortValue(value);
+  }
+
+  @Override
+  public Object unmarshalSortValue(Object value) {
+    return unmarshalBase64SortValue(value);
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/package.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/package.html b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/package.html
new file mode 100644
index 0000000..27d68db
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/schema/package.html
@@ -0,0 +1,23 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- not a package-info.java, because we already defined this package in core/ -->
+<html>
+<body>
+<code>FieldType</code> plugins that have additional dependencies.
+</body>
+</html>


[2/7] lucene-solr:jira/gradle: Move queryparser test's resources to a right place

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
new file mode 100644
index 0000000..ec6cb51
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Q0001E_INVALID_SYNTAX = Syntax Error: {0}
+
+Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = Truncated unicode escape sequence.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
new file mode 100644
index 0000000..68e449c
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/flexible/messages/MessagesTestBundle_ja.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+Q0001E_INVALID_SYNTAX = \u69cb\u6587\u30a8\u30e9\u30fc: {0}
+
+Q0004E_INVALID_SYNTAX_ESCAPE_UNICODE_TRUNCATION = \u5207\u308a\u6368\u3066\u3089\u308c\u305f\u30e6\u30cb\u30b3\u30fc\u30c9\u30fb\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u3002

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
new file mode 100644
index 0000000..67c3e08
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BooleanQuery.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery>sumitomo</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
new file mode 100644
index 0000000..e10ddca
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingQuery.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BoostingQuery>
+  <!-- Find docs about banks, preferably merger info and preferably not "World bank" -->
+  <Query>
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="should">
+        <TermQuery>merger</TermQuery>
+      </Clause>
+      <Clause occurs="must">
+        <TermQuery>bank</TermQuery>
+      </Clause>
+    </BooleanQuery>  
+  </Query>
+  <BoostQuery boost="0.01">
+      <UserQuery>"world bank"</UserQuery>
+  </BoostQuery>
+</BoostingQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
new file mode 100644
index 0000000..65bbd61
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/BoostingTermQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BoostingTermQuery fieldName="contents">sumitomo</BoostingTermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
new file mode 100644
index 0000000..13cbc1b
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ConstantScoreQuery.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<ConstantScoreQuery>
+  <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+</ConstantScoreQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
new file mode 100644
index 0000000..28938ae
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DOCTYPE_TermQuery.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TermQuery SYSTEM "foo://bar.xyz/mydtd">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TermQuery fieldName="contents">sumitomo</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
new file mode 100644
index 0000000..0c94b00
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/DisjunctionMaxQuery.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<DisjunctionMaxQuery>
+  <TermQuery fieldName="a">merger</TermQuery>
+  <DisjunctionMaxQuery tieBreaker="0.3">
+    <TermQuery fieldName="b">verger</TermQuery>
+  </DisjunctionMaxQuery>
+</DisjunctionMaxQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
new file mode 100644
index 0000000..dc59613
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/ENTITY_TermQuery.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TermQuery [
+<!ENTITY internalTerm "sumitomo">
+<!ENTITY externalTerm SYSTEM "foo://bar.xyz/external">
+<!ENTITY % myParameterEntity "foo://bar.xyz/param">
+]>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TermQuery fieldName="contents">&internalTerm;&externalTerm;</TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
new file mode 100644
index 0000000..78173d8
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/FuzzyLikeThisQuery.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<FuzzyLikeThisQuery>
+  <!-- Matches on misspelt "Sumitomo" bank -->
+  <Field fieldName="contents">
+    Sumitimo bank 
+  </Field>
+</FuzzyLikeThisQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
new file mode 100644
index 0000000..6c04de6
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/LikeThisQuery.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LikeThisQuery percentTermsToMatch="5" stopWords="Reuter" minDocFreq="2">
+IRAQI TROOPS REPORTED PUSHING BACK IRANIANS Iraq said today its troops were pushing Iranian forces out of 
+  positions they had initially occupied when they launched a new offensive near the southern port of 
+  Basra early yesterday.     A High Command communique said Iraqi troops had won a significant victory 
+  and were continuing to advance.     Iraq said it had foiled a three-pronged thrust some 10 km 
+  (six miles) from Basra, but admitted the Iranians had occupied ground held by the Mohammed al-Qassem 
+  unit, one of three divisions attacked.     The communique said Iranian Revolutionary Guards were under 
+  assault from warplanes, helicopter gunships, heavy artillery and tanks.     "Our forces are continuing 
+  their advance until they purge the last foothold" occupied by the Iranians, it said.     
+  (Iran said its troops had killed or wounded more than 4,000 Iraqis and were stabilising their new positions.)     
+  The Baghdad communique said Iraqi planes also destroyed oil installations at Iran's southwestern Ahvaz field 
+  during a raid today. It denied an Iranian report that an Iraqi jet was shot down.     
+  Iraq also reported a naval battle at the northern tip of the Gulf. Iraqi naval units and forces defending an 
+  offshore terminal sank six Iranian out of 28 Iranian boats attempting to attack an offshore terminal, 
+  the communique said.      Reuter 3;
+</LikeThisQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
new file mode 100644
index 0000000..d258393
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/MatchAllDocsQuery.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery>
+  <Clause occurs="must">
+    <MatchAllDocsQuery/>
+  </Clause>
+  <Clause occurs="filter">
+    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
new file mode 100644
index 0000000..aecac7f
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/NestedBooleanQuery.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!--
+  This query was added to demonstrate nested boolean queries - there
+  was a bug in the XML parser which added ALL child <Clause> tags to 
+  the top level tags ie. took child and grandchild elements instead
+  of just child elements. This was due to the use of the 
+  Element.getElementsByTagName() call in BooleanQueryBuilder
+-->  
+<BooleanQuery fieldName="contents">  
+  <Clause occurs="should">
+    <BooleanQuery fieldName="contents">
+      <Clause occurs="must">
+        <TermQuery>doesNotExistButShouldBeOKBecauseOtherClauseExists</TermQuery>
+      </Clause>
+    </BooleanQuery>
+  </Clause>
+  <Clause occurs="should">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
new file mode 100644
index 0000000..45af138
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQuery.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
new file mode 100644
index 0000000..2159c2c
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutLowerTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
new file mode 100644
index 0000000..dc18953
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutRange.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
new file mode 100644
index 0000000..eca8573
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/PointRangeQueryWithoutUpperTerm.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery fieldName="contents">
+  <Clause occurs="should">
+    <TermQuery>merger</TermQuery>
+  </Clause>
+  <Clause occurs="mustnot">
+    <TermQuery >sumitomo</TermQuery>    
+  </Clause>
+  <Clause occurs="must">
+    <TermQuery>bank</TermQuery>
+  </Clause>
+  <Clause occurs="must">
+    <PointRangeQuery fieldName="date3" lowerTerm="19870409"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
new file mode 100644
index 0000000..946fdf2
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/RangeQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
new file mode 100644
index 0000000..fc37d96
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/SpanQuery.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<SpanOr fieldName="contents">
+  <SpanNear slop="8" inOrder="false" >    
+      <SpanOr>
+        <SpanTerm>killed</SpanTerm>
+        <SpanTerm>died</SpanTerm>
+        <SpanTerm>dead</SpanTerm>
+      </SpanOr>
+      <SpanOr>
+        <!-- a less verbose way of declaring SpanTerm declarations - these are analyzed
+          into a series of Tokens which are added as SpanTerm elements of a SpanOr
+        -->
+        <SpanOrTerms>miner miners</SpanOrTerms>
+        <!-- finds mine near worker or workers -->
+        <SpanNear slop="6" inOrder="false">    
+          <SpanTerm>mine</SpanTerm>          
+          <SpanOrTerms>worker workers</SpanOrTerms>
+          <BoostingTermQuery>heavy</BoostingTermQuery>
+        </SpanNear>
+      </SpanOr>
+  </SpanNear>  
+  <SpanFirst end="10">
+    <SpanOrTerms>fire burn</SpanOrTerms>
+  </SpanFirst> 
+  <!-- Other Span examples....
+    
+  <SpanNot>
+    <Include>
+        <SpanNear slop="2" inOrder="2">    
+            <SpanTerm>social</SpanTerm>
+            <SpanTerm>services</SpanTerm>
+        </SpanNear>        
+    </Include>
+    <Exclude>
+        <SpanTerm>public</SpanTerm>
+    </Exclude>
+  </SpanNot>
+    -->
+</SpanOr>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
new file mode 100644
index 0000000..14dae37
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQuery.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TermQuery fieldName="contents">sumitomo</TermQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
new file mode 100644
index 0000000..229a112
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermQueryEmpty.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TermQuery fieldName="contents"></TermQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
new file mode 100644
index 0000000..df93fc2
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/TermsQuery.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+    <!-- TermsQuery uses an analyzer to tokenize text and creates a BooleanQuery with nested
+      "should" TermQueries for each of the tokens encountered. This can be used for user input
+      which may include content or characters that would otherwise be illegal query syntax when
+      using the standard lucene query parser. Of course the downside is that none of the query 
+      operators (AND NOT ~ ^ : etc) will have an effect. For some scenarios queries are
+      not formed by people familiar with Lucene query syntax and they can inadvertently type illegal
+      query syntax so in these cases this is an appropriate and simple alternative
+    --> 
+<TermsQuery fieldName="contents">sumitomo bank</TermsQuery>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
new file mode 100644
index 0000000..f7b6cae8
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQuery.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<BooleanQuery>
+  <Clause occurs="must">
+    <UserQuery>"Bank of England"</UserQuery>
+  </Clause>
+  <Clause occurs="filter">
+    <RangeQuery fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+  </Clause>
+</BooleanQuery>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e447a41/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
----------------------------------------------------------------------
diff --git a/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
new file mode 100644
index 0000000..7b35a63
--- /dev/null
+++ b/lucene/queryparser/src/test/resources/org/apache/lucene/queryparser/xml/UserInputQueryCustomField.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<UserQuery fieldName="doesNotExist" boost="10">Bank^2</UserQuery>


[6/7] lucene-solr:jira/gradle: Adding solr:analysis-extras module

Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
new file mode 100644
index 0000000..d69c367
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/OpenNLPExtractNamedEntitiesUpdateProcessorFactory.java
@@ -0,0 +1,577 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.update.processor;
+
+import java.io.IOException;
+import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import opennlp.tools.util.Span;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.opennlp.OpenNLPTokenizer;
+import org.apache.lucene.analysis.opennlp.tools.NLPNERTaggerOp;
+import org.apache.lucene.analysis.opennlp.tools.OpenNLPOpsFactory;
+import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+import org.apache.lucene.analysis.tokenattributes.FlagsAttribute;
+import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.common.SolrInputField;
+import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.Pair;
+import org.apache.solr.core.SolrCore;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.schema.FieldType;
+import org.apache.solr.update.AddUpdateCommand;
+import org.apache.solr.update.processor.FieldMutatingUpdateProcessor.FieldNameSelector;
+import org.apache.solr.update.processor.FieldMutatingUpdateProcessorFactory.SelectorParams;
+import org.apache.solr.util.plugin.SolrCoreAware;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.solr.common.SolrException.ErrorCode.SERVER_ERROR;
+
+/**
+ * Extracts named entities using an OpenNLP NER <code>modelFile</code> from the values found in
+ * any matching <code>source</code> field into a configured <code>dest</code> field, after
+ * first tokenizing the source text using the index analyzer on the configured
+ * <code>analyzerFieldType</code>, which must include <code>solr.OpenNLPTokenizerFactory</code>
+ * as the tokenizer. E.g.:
+ *
+ * <pre class="prettyprint">
+ *   &lt;fieldType name="opennlp-en-tokenization" class="solr.TextField"&gt;
+ *     &lt;analyzer&gt;
+ *       &lt;tokenizer class="solr.OpenNLPTokenizerFactory"
+ *                  sentenceModel="en-sent.bin"
+ *                  tokenizerModel="en-tokenizer.bin"/&gt;
+ *     &lt;/analyzer&gt;
+ *   &lt;/fieldType&gt;
+ * </pre>
+ * 
+ * <p>See the <a href="http://opennlp.apache.org/models.html">OpenNLP website</a>
+ * for information on downloading pre-trained models.</p>
+ *
+ * Note that in order to use model files larger than 1MB on SolrCloud, 
+ * <a href="https://lucene.apache.org/solr/guide/setting-up-an-external-zookeeper-ensemble#increasing-zookeeper-s-1mb-file-size-limit"
+ * >ZooKeeper server and client configuration is required</a>.
+ * 
+ * <p>
+ * The <code>source</code> field(s) can be configured as either:
+ * </p>
+ * <ul>
+ *  <li>One or more <code>&lt;str&gt;</code></li>
+ *  <li>An <code>&lt;arr&gt;</code> of <code>&lt;str&gt;</code></li>
+ *  <li>A <code>&lt;lst&gt;</code> containing
+ *   {@link FieldMutatingUpdateProcessor FieldMutatingUpdateProcessorFactory style selector arguments}</li>
+ * </ul>
+ *
+ * <p>The <code>dest</code> field can be a single <code>&lt;str&gt;</code>
+ * containing the literal name of a destination field, or it may be a <code>&lt;lst&gt;</code> specifying a
+ * regex <code>pattern</code> and a <code>replacement</code> string. If the pattern + replacement option
+ * is used the pattern will be matched against all fields matched by the source selector, and the replacement
+ * string (including any capture groups specified from the pattern) will be evaluated a using
+ * {@link Matcher#replaceAll(String)} to generate the literal name of the destination field.  Additionally,
+ * an occurrence of the string "{EntityType}" in the <code>dest</code> field specification, or in the
+ * <code>replacement</code> string, will be replaced with the entity type(s) returned for each entity by
+ * the OpenNLP NER model; as a result, if the model extracts more than one entity type, then more than one
+ * <code>dest</code> field will be populated.
+ * </p>
+ *
+ * <p>If the resolved <code>dest</code> field already exists in the document, then the
+ * named entities extracted from the <code>source</code> fields will be added to it.
+ * </p>
+ * <p>
+ * In the example below:
+ * </p>
+ * <ul>
+ *   <li>Named entities will be extracted from the <code>text</code> field and added
+ *       to the <code>names_ss</code> field</li>
+ *   <li>Named entities will be extracted from both the <code>title</code> and
+ *       <code>subtitle</code> fields and added into the <code>titular_people</code> field</li>
+ *   <li>Named entities will be extracted from any field with a name ending in <code>_txt</code>
+ *       -- except for <code>notes_txt</code> -- and added into the <code>people_ss</code> field</li>
+ *   <li>Named entities will be extracted from any field with a name beginning with "desc" and
+ *       ending in "s" (e.g. "descs" and "descriptions") and added to a field prefixed with "key_",
+ *       not ending in "s", and suffixed with "_people". (e.g. "key_desc_people" or
+ *       "key_description_people")</li>
+ *   <li>Named entities will be extracted from the <code>summary</code> field and added
+ *       to the <code>summary_person_ss</code> field, assuming that the modelFile only extracts
+ *       entities of type "person".</li>
+ * </ul>
+ *
+ * <pre class="prettyprint">
+ * &lt;updateRequestProcessorChain name="multiple-extract"&gt;
+ *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
+ *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
+ *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
+ *     &lt;str name="source"&gt;text&lt;/str&gt;
+ *     &lt;str name="dest"&gt;people_s&lt;/str&gt;
+ *   &lt;/processor&gt;
+ *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
+ *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
+ *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
+ *     &lt;arr name="source"&gt;
+ *       &lt;str&gt;title&lt;/str&gt;
+ *       &lt;str&gt;subtitle&lt;/str&gt;
+ *     &lt;/arr&gt;
+ *     &lt;str name="dest"&gt;titular_people&lt;/str&gt;
+ *   &lt;/processor&gt;
+ *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
+ *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
+ *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
+ *     &lt;lst name="source"&gt;
+ *       &lt;str name="fieldRegex"&gt;.*_txt$&lt;/str&gt;
+ *       &lt;lst name="exclude"&gt;
+ *         &lt;str name="fieldName"&gt;notes_txt&lt;/str&gt;
+ *       &lt;/lst&gt;
+ *     &lt;/lst&gt;
+ *     &lt;str name="dest"&gt;people_s&lt;/str&gt;
+ *   &lt;/processor&gt;
+ *   &lt;processor class="solr.processor.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
+ *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
+ *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
+ *     &lt;lst name="source"&gt;
+ *       &lt;str name="fieldRegex"&gt;^desc(.*)s$&lt;/str&gt;
+ *     &lt;/lst&gt;
+ *     &lt;lst name="dest"&gt;
+ *       &lt;str name="pattern"&gt;^desc(.*)s$&lt;/str&gt;
+ *       &lt;str name="replacement"&gt;key_desc$1_people&lt;/str&gt;
+ *     &lt;/lst&gt;
+ *   &lt;/processor&gt;
+ *   &lt;processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory"&gt;
+ *     &lt;str name="modelFile"&gt;en-test-ner-person.bin&lt;/str&gt;
+ *     &lt;str name="analyzerFieldType"&gt;opennlp-en-tokenization&lt;/str&gt;
+ *     &lt;str name="source"&gt;summary&lt;/str&gt;
+ *     &lt;str name="dest"&gt;summary_{EntityType}_s&lt;/str&gt;
+ *   &lt;/processor&gt;
+ *   &lt;processor class="solr.LogUpdateProcessorFactory" /&gt;
+ *   &lt;processor class="solr.RunUpdateProcessorFactory" /&gt;
+ * &lt;/updateRequestProcessorChain&gt;
+ * </pre>
+ *
+ * @since 7.3.0
+ */
+public class OpenNLPExtractNamedEntitiesUpdateProcessorFactory
+    extends UpdateRequestProcessorFactory implements SolrCoreAware {
+
+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+  public static final String SOURCE_PARAM = "source";
+  public static final String DEST_PARAM = "dest";
+  public static final String PATTERN_PARAM = "pattern";
+  public static final String REPLACEMENT_PARAM = "replacement";
+  public static final String MODEL_PARAM = "modelFile";
+  public static final String ANALYZER_FIELD_TYPE_PARAM = "analyzerFieldType";
+  public static final String ENTITY_TYPE = "{EntityType}";
+
+  private SelectorParams srcInclusions = new SelectorParams();
+  private Collection<SelectorParams> srcExclusions = new ArrayList<>();
+
+  private FieldNameSelector srcSelector = null;
+
+  private String modelFile = null;
+  private String analyzerFieldType = null;
+
+  /**
+   * If pattern is null, this this is a literal field name.  If pattern is non-null then this
+   * is a replacement string that may contain meta-characters (ie: capture group identifiers)
+   * @see #pattern
+   */
+  private String dest = null;
+  /** @see #dest */
+  private Pattern pattern = null;
+
+  protected final FieldNameSelector getSourceSelector() {
+    if (null != srcSelector) return srcSelector;
+
+    throw new SolrException(SERVER_ERROR, "selector was never initialized, inform(SolrCore) never called???");
+  }
+
+  @SuppressWarnings("unchecked")
+  @Override
+  public void init(NamedList args) {
+
+    // high level (loose) check for which type of config we have.
+    //
+    // individual init methods do more strict syntax checking
+    if (0 <= args.indexOf(SOURCE_PARAM, 0) && 0 <= args.indexOf(DEST_PARAM, 0) ) {
+      initSourceSelectorSyntax(args);
+    } else if (0 <= args.indexOf(PATTERN_PARAM, 0) && 0 <= args.indexOf(REPLACEMENT_PARAM, 0)) {
+      initSimpleRegexReplacement(args);
+    } else {
+      throw new SolrException(SERVER_ERROR, "A combination of either '" + SOURCE_PARAM + "' + '"+
+          DEST_PARAM + "', or '" + REPLACEMENT_PARAM + "' + '" +
+          PATTERN_PARAM + "' init params are mandatory");
+    }
+
+    Object modelParam = args.remove(MODEL_PARAM);
+    if (null == modelParam) {
+      throw new SolrException(SERVER_ERROR, "Missing required init param '" + MODEL_PARAM + "'");
+    }
+    if ( ! (modelParam instanceof CharSequence)) {
+      throw new SolrException(SERVER_ERROR, "Init param '" + MODEL_PARAM + "' must be a <str>");
+    }
+    modelFile = modelParam.toString();
+
+    Object analyzerFieldTypeParam = args.remove(ANALYZER_FIELD_TYPE_PARAM);
+    if (null == analyzerFieldTypeParam) {
+      throw new SolrException(SERVER_ERROR, "Missing required init param '" + ANALYZER_FIELD_TYPE_PARAM + "'");
+    }
+    if ( ! (analyzerFieldTypeParam instanceof CharSequence)) {
+      throw new SolrException(SERVER_ERROR, "Init param '" + ANALYZER_FIELD_TYPE_PARAM + "' must be a <str>");
+    }
+    analyzerFieldType = analyzerFieldTypeParam.toString();
+
+    if (0 < args.size()) {
+      throw new SolrException(SERVER_ERROR, "Unexpected init param(s): '" + args.getName(0) + "'");
+    }
+
+    super.init(args);
+  }
+
+  /**
+   * init helper method that should only be called when we know for certain that both the
+   * "source" and "dest" init params do <em>not</em> exist.
+   */
+  @SuppressWarnings("unchecked")
+  private void initSimpleRegexReplacement(NamedList args) {
+    // The syntactic sugar for the case where there is only one regex pattern for source and the same pattern
+    // is used for the destination pattern...
+    //
+    //  pattern != null && replacement != null
+    //
+    // ...as top level elements, with no other config options specified
+
+    // if we got here we know we had pattern and replacement, now check for the other two  so that we can give a better
+    // message than "unexpected"
+    if (0 <= args.indexOf(SOURCE_PARAM, 0) || 0 <= args.indexOf(DEST_PARAM, 0) ) {
+      throw new SolrException(SERVER_ERROR,"Short hand syntax must not be mixed with full syntax. Found " +
+          PATTERN_PARAM + " and " + REPLACEMENT_PARAM + " but also found " + SOURCE_PARAM + " or " + DEST_PARAM);
+    }
+
+    assert args.indexOf(SOURCE_PARAM, 0) < 0;
+
+    Object patt = args.remove(PATTERN_PARAM);
+    Object replacement = args.remove(REPLACEMENT_PARAM);
+
+    if (null == patt || null == replacement) {
+      throw new SolrException(SERVER_ERROR, "Init params '" + PATTERN_PARAM + "' and '" +
+          REPLACEMENT_PARAM + "' are both mandatory if '" + SOURCE_PARAM + "' and '"+
+          DEST_PARAM + "' are not both specified");
+    }
+
+    if (0 != args.size()) {
+      throw new SolrException(SERVER_ERROR, "Init params '" + REPLACEMENT_PARAM + "' and '" +
+          PATTERN_PARAM + "' must be children of '" + DEST_PARAM +
+          "' to be combined with other options.");
+    }
+
+    if (!(replacement instanceof String)) {
+      throw new SolrException(SERVER_ERROR, "Init param '" + REPLACEMENT_PARAM + "' must be a string (i.e. <str>)");
+    }
+    if (!(patt instanceof String)) {
+      throw new SolrException(SERVER_ERROR, "Init param '" + PATTERN_PARAM + "' must be a string (i.e. <str>)");
+    }
+
+    dest = replacement.toString();
+    try {
+      this.pattern = Pattern.compile(patt.toString());
+    } catch (PatternSyntaxException pe) {
+      throw new SolrException(SERVER_ERROR, "Init param " + PATTERN_PARAM +
+          " is not a valid regex pattern: " + patt, pe);
+
+    }
+    srcInclusions = new SelectorParams();
+    srcInclusions.fieldRegex = Collections.singletonList(this.pattern);
+  }
+
+  /**
+   * init helper method that should only be called when we know for certain that both the
+   * "source" and "dest" init params <em>do</em> exist.
+   */
+  @SuppressWarnings("unchecked")
+  private void initSourceSelectorSyntax(NamedList args) {
+    // Full and complete syntax where source and dest are mandatory.
+    //
+    // source may be a single string or a selector.
+    // dest may be a single string or list containing pattern and replacement
+    //
+    //   source != null && dest != null
+
+    // if we got here we know we had source and dest, now check for the other two so that we can give a better
+    // message than "unexpected"
+    if (0 <= args.indexOf(PATTERN_PARAM, 0) || 0 <= args.indexOf(REPLACEMENT_PARAM, 0) ) {
+      throw new SolrException(SERVER_ERROR,"Short hand syntax must not be mixed with full syntax. Found " +
+          SOURCE_PARAM + " and " + DEST_PARAM + " but also found " + PATTERN_PARAM + " or " + REPLACEMENT_PARAM);
+    }
+
+    Object d = args.remove(DEST_PARAM);
+    assert null != d;
+
+    List<Object> sources = args.getAll(SOURCE_PARAM);
+    assert null != sources;
+
+    if (1 == sources.size()) {
+      if (sources.get(0) instanceof NamedList) {
+        // nested set of selector options
+        NamedList selectorConfig = (NamedList) args.remove(SOURCE_PARAM);
+
+        srcInclusions = parseSelectorParams(selectorConfig);
+
+        List<Object> excList = selectorConfig.getAll("exclude");
+
+        for (Object excObj : excList) {
+          if (null == excObj) {
+            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
+                "' child 'exclude' can not be null");
+          }
+          if (!(excObj instanceof NamedList)) {
+            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
+                "' child 'exclude' must be <lst/>");
+          }
+          NamedList exc = (NamedList) excObj;
+          srcExclusions.add(parseSelectorParams(exc));
+          if (0 < exc.size()) {
+            throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
+                "' has unexpected 'exclude' sub-param(s): '"
+                + selectorConfig.getName(0) + "'");
+          }
+          // call once per instance
+          selectorConfig.remove("exclude");
+        }
+
+        if (0 < selectorConfig.size()) {
+          throw new SolrException(SERVER_ERROR, "Init param '" + SOURCE_PARAM +
+              "' contains unexpected child param(s): '" +
+              selectorConfig.getName(0) + "'");
+        }
+        // consume from the named list so it doesn't interfere with subsequent processing
+        sources.remove(0);
+      }
+    }
+    if (1 <= sources.size()) {
+      // source better be one or more strings
+      srcInclusions.fieldName = new HashSet<>(args.removeConfigArgs("source"));
+    }
+    if (srcInclusions == null) {
+      throw new SolrException(SERVER_ERROR,
+          "Init params do not specify any field from which to extract entities, please supply either "
+          + SOURCE_PARAM + " and " + DEST_PARAM + " or " + PATTERN_PARAM + " and " + REPLACEMENT_PARAM + ". See javadocs" +
+          "for OpenNLPExtractNamedEntitiesUpdateProcessor for further details.");
+    }
+
+    if (d instanceof NamedList) {
+      NamedList destList = (NamedList) d;
+
+      Object patt = destList.remove(PATTERN_PARAM);
+      Object replacement = destList.remove(REPLACEMENT_PARAM);
+
+      if (null == patt || null == replacement) {
+        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' children '" +
+            PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM +
+            "' are both mandatory and can not be null");
+      }
+      if (! (patt instanceof String && replacement instanceof String)) {
+        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' children '" +
+            PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM +
+            "' must both be strings (i.e. <str>)");
+      }
+      if (0 != destList.size()) {
+        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' has unexpected children: '"
+            + destList.getName(0) + "'");
+      }
+
+      try {
+        this.pattern = Pattern.compile(patt.toString());
+      } catch (PatternSyntaxException pe) {
+        throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' child '" + PATTERN_PARAM +
+            " is not a valid regex pattern: " + patt, pe);
+      }
+      dest = replacement.toString();
+
+    } else if (d instanceof String) {
+      dest = d.toString();
+    } else {
+      throw new SolrException(SERVER_ERROR, "Init param '" + DEST_PARAM + "' must either be a string " +
+          "(i.e. <str>) or a list (i.e. <lst>) containing '" +
+          PATTERN_PARAM + "' and '" + REPLACEMENT_PARAM);
+    }
+
+  }
+
+  @Override
+  public void inform(final SolrCore core) {
+
+    srcSelector =
+        FieldMutatingUpdateProcessor.createFieldNameSelector
+            (core.getResourceLoader(), core, srcInclusions, FieldMutatingUpdateProcessor.SELECT_NO_FIELDS);
+
+    for (SelectorParams exc : srcExclusions) {
+      srcSelector = FieldMutatingUpdateProcessor.wrap
+          (srcSelector,
+              FieldMutatingUpdateProcessor.createFieldNameSelector
+                  (core.getResourceLoader(), core, exc, FieldMutatingUpdateProcessor.SELECT_NO_FIELDS));
+    }
+    try {
+      OpenNLPOpsFactory.getNERTaggerModel(modelFile, core.getResourceLoader());
+    } catch (IOException e) {
+      throw new IllegalArgumentException(e);
+    }
+  }
+
+  @Override
+  public final UpdateRequestProcessor getInstance
+      (SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) {
+    final FieldNameSelector srcSelector = getSourceSelector();
+    return new UpdateRequestProcessor(next) {
+      private final NLPNERTaggerOp nerTaggerOp;
+      private Analyzer analyzer = null;
+      {
+        try {
+          nerTaggerOp = OpenNLPOpsFactory.getNERTagger(modelFile);
+          FieldType fieldType = req.getSchema().getFieldTypeByName(analyzerFieldType);
+          if (fieldType == null) {
+            throw new SolrException
+                (SERVER_ERROR, ANALYZER_FIELD_TYPE_PARAM + " '" + analyzerFieldType + "' not found in the schema.");
+          }
+          analyzer = fieldType.getIndexAnalyzer();
+        } catch (IOException e) {
+          throw new IllegalArgumentException(e);
+        }
+      }
+
+      @Override
+      public void processAdd(AddUpdateCommand cmd) throws IOException {
+
+        final SolrInputDocument doc = cmd.getSolrInputDocument();
+
+        // Destination may be regex replace string, or "{EntityType}" replaced by
+        // each entity's type, both of which can cause multiple output fields.
+        Map<String,SolrInputField> destMap = new HashMap<>();
+
+        // preserve initial values
+        for (final String fname : doc.getFieldNames()) {
+          if ( ! srcSelector.shouldMutate(fname)) continue;
+
+          Collection<Object> srcFieldValues = doc.getFieldValues(fname);
+          if (srcFieldValues == null || srcFieldValues.isEmpty()) continue;
+
+          String resolvedDest = dest;
+
+          if (pattern != null) {
+            Matcher matcher = pattern.matcher(fname);
+            if (matcher.find()) {
+              resolvedDest = matcher.replaceAll(dest);
+            } else {
+              log.debug("srcSelector.shouldMutate(\"{}\") returned true, " +
+                  "but replacement pattern did not match, field skipped.", fname);
+              continue;
+            }
+          }
+
+          for (Object val : srcFieldValues) {
+            for (Pair<String,String> entity : extractTypedNamedEntities(val)) {
+              SolrInputField destField = null;
+              String entityName = entity.first();
+              String entityType = entity.second();
+              final String resolved = resolvedDest.replace(ENTITY_TYPE, entityType);
+              if (doc.containsKey(resolved)) {
+                destField = doc.getField(resolved);
+              } else {
+                SolrInputField targetField = destMap.get(resolved);
+                if (targetField == null) {
+                  destField = new SolrInputField(resolved);
+                } else {
+                  destField = targetField;
+                }
+              }
+              destField.addValue(entityName);
+
+              // put it in map to avoid concurrent modification...
+              destMap.put(resolved, destField);
+            }
+          }
+        }
+
+        for (Map.Entry<String,SolrInputField> entry : destMap.entrySet()) {
+          doc.put(entry.getKey(), entry.getValue());
+        }
+        super.processAdd(cmd);
+      }
+
+      /** Using configured NER model, extracts (name, type) pairs from the given source field value */
+      private List<Pair<String,String>> extractTypedNamedEntities(Object srcFieldValue) throws IOException {
+        List<Pair<String,String>> entitiesWithType = new ArrayList<>();
+        List<String> terms = new ArrayList<>();
+        List<Integer> startOffsets = new ArrayList<>();
+        List<Integer> endOffsets = new ArrayList<>();
+        String fullText = srcFieldValue.toString();
+        TokenStream tokenStream = analyzer.tokenStream("", fullText);
+        CharTermAttribute termAtt = tokenStream.addAttribute(CharTermAttribute.class);
+        OffsetAttribute offsetAtt = tokenStream.addAttribute(OffsetAttribute.class);
+        FlagsAttribute flagsAtt = tokenStream.addAttribute(FlagsAttribute.class);
+        tokenStream.reset();
+        synchronized (nerTaggerOp) {
+          while (tokenStream.incrementToken()) {
+            terms.add(termAtt.toString());
+            startOffsets.add(offsetAtt.startOffset());
+            endOffsets.add(offsetAtt.endOffset());
+            boolean endOfSentence = 0 != (flagsAtt.getFlags() & OpenNLPTokenizer.EOS_FLAG_BIT);
+            if (endOfSentence) {    // extract named entities one sentence at a time
+              extractEntitiesFromSentence(fullText, terms, startOffsets, endOffsets, entitiesWithType);
+            }
+          }
+          tokenStream.end();
+          tokenStream.close();
+          if (!terms.isEmpty()) { // In case last token of last sentence isn't properly flagged with EOS_FLAG_BIT
+            extractEntitiesFromSentence(fullText, terms, startOffsets, endOffsets, entitiesWithType);
+          }
+          nerTaggerOp.reset();      // Forget all adaptive data collected during previous calls
+        }
+        return entitiesWithType;
+      }
+
+      private void extractEntitiesFromSentence(String fullText, List<String> terms, List<Integer> startOffsets,
+                                               List<Integer> endOffsets, List<Pair<String,String>> entitiesWithType) {
+        for (Span span : nerTaggerOp.getNames(terms.toArray(new String[terms.size()]))) {
+          String text = fullText.substring(startOffsets.get(span.getStart()), endOffsets.get(span.getEnd() - 1));
+          entitiesWithType.add(new Pair<>(text, span.getType()));
+        }
+        terms.clear();
+        startOffsets.clear();
+        endOffsets.clear();
+      }
+    };
+  }
+
+  /** macro */
+  private static SelectorParams parseSelectorParams(NamedList args) {
+    return FieldMutatingUpdateProcessorFactory.parseSelectorParams(args);
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/package.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/package.html b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/package.html
new file mode 100644
index 0000000..1388c29
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/main/java/org/apache/solr/update/processor/package.html
@@ -0,0 +1,24 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- not a package-info.java, because we already defined this package in core/ -->
+<html>
+  <body>
+    Update request processor invoking OpenNLP Named Entity Recognition over configured
+    source field(s), populating configured target field(s) with the results.
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/main/java/overview.html
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/main/java/overview.html b/solr/contrib/analysis-extras/src/main/java/overview.html
new file mode 100644
index 0000000..f3d70ca
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/main/java/overview.html
@@ -0,0 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<html>
+<body>
+Apache Solr Search Server: Analysis Extras contrib
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-ner.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-ner.bin b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-ner.bin
deleted file mode 100644
index b4d8cdc..0000000
Binary files a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-ner.bin and /dev/null differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-sent.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-sent.bin b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-sent.bin
deleted file mode 100644
index 6e19e6b..0000000
Binary files a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-sent.bin and /dev/null differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin
deleted file mode 100644
index 796a744..0000000
Binary files a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/en-test-tokenizer.bin and /dev/null differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-folding-extra.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
deleted file mode 100644
index 573ca53..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-folding-extra.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  -->
-
-<schema name="test" version="1.0">
-  <fieldType name="string" class="solr.StrField" sortMissingLast="true" multiValued="false"/>
-
-
-  <fieldType name="text_icufolding" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
-      <filter class="solr.ICUFoldingFilterFactory"/>
-    </analyzer>
-  </fieldType>
-
-  <fieldType name="text_icunormalizer2" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
-      <filter class="solr.ICUNormalizer2FilterFactory" name="nfkc_cf" mode="compose"/>
-    </analyzer>
-  </fieldType>
-
-  <fieldType name="text_icutransform" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.WhitespaceTokenizerFactory"/>
-      <filter class="solr.ICUTransformFilterFactory" id="Cyrillic-Latin"/>
-    </analyzer>
-  </fieldType>
-
-
-  <field name="id" type="string" indexed="true" stored="true" required="true"/>
-  <field name="content_icufolding" type="text_icufolding" indexed="true" stored="true"/>
-  <field name="content_icunormalizer2" type="text_icunormalizer2" indexed="true" stored="true"/>
-  <field name="content_icutransform" type="text_icutransform" indexed="true" stored="true"/>
-
-
-  <uniqueKey>id</uniqueKey>
-
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
deleted file mode 100644
index 63f7330..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Test schema file for CollationField (docvalues) -->
-
-<schema name="test" version="1.0">
-
-  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
-
-  <!-- basic text field -->
-  <fieldType name="text" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.StandardTokenizerFactory"/>
-      <filter class="solr.LowerCaseFilterFactory"/>
-    </analyzer>
-  </fieldType>
-
-  <fieldType name="sort_ar_t" class="solr.ICUCollationField" locale="ar"/>
-  <fieldType name="sort_de_t" class="solr.ICUCollationField" locale="de" strength="primary"/>
-  <fieldType name="sort_tr_canon_t" class="solr.ICUCollationField" locale="tr" strength="primary"
-             decomposition="canonical"/>
-  <fieldType name="sort_da_t" class="solr.ICUCollationField" locale="da" strength="primary"/>
-  <fieldType name="sort_custom_t" class="solr.ICUCollationField" custom="customrules.dat" strength="primary"/>
-
-  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
-  <field name="text" type="text" indexed="true" stored="false"/>
-  <field name="sort_ar" type="sort_ar_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
-  <field name="sort_de" type="sort_de_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
-  <field name="sort_tr_canon" type="sort_tr_canon_t" indexed="false" stored="false" multiValued="true"
-         docValues="true"/>
-  <field name="sort_da" type="sort_da_t" indexed="false" stored="false" multiValued="false" docValues="true"/>
-  <field name="sort_custom" type="sort_custom_t" indexed="false" stored="false" multiValued="true" docValues="true"/>
-
-  <uniqueKey>id</uniqueKey>
-
-  <!-- copy our text to some sort fields with different orders -->
-  <copyField source="text" dest="sort_ar"/>
-  <copyField source="text" dest="sort_de"/>
-  <copyField source="text" dest="sort_tr_canon"/>
-  <copyField source="text" dest="sort_da"/>
-  <copyField source="text" dest="sort_custom"/>
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate.xml
deleted file mode 100644
index 9698013..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollate.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Test schema file for CollationField -->
-
-<schema name="test" version="1.0">
-
-  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
-
-  <!-- basic text field -->
-  <fieldType name="text" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.StandardTokenizerFactory"/>
-      <filter class="solr.LowerCaseFilterFactory"/>
-    </analyzer>
-  </fieldType>
-
-  <fieldType name="sort_ar_t" class="solr.ICUCollationField" locale="ar"/>
-  <fieldType name="sort_de_t" class="solr.ICUCollationField" locale="de" strength="primary"/>
-  <fieldType name="sort_tr_canon_t" class="solr.ICUCollationField" locale="tr" strength="primary"
-             decomposition="canonical"/>
-  <fieldType name="sort_da_t" class="solr.ICUCollationField" locale="da" strength="primary"/>
-  <fieldType name="sort_custom_t" class="solr.ICUCollationField" custom="customrules.dat" strength="primary"/>
-
-  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
-  <field name="text" type="text" indexed="true" stored="false"/>
-  <field name="sort_ar" type="sort_ar_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_de" type="sort_de_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_tr_canon" type="sort_tr_canon_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_da" type="sort_da_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_custom" type="sort_custom_t" indexed="true" stored="false" multiValued="false"/>
-
-
-  <uniqueKey>id</uniqueKey>
-
-  <!-- copy our text to some sort fields with different orders -->
-  <copyField source="text" dest="sort_ar"/>
-  <copyField source="text" dest="sort_de"/>
-  <copyField source="text" dest="sort_tr_canon"/>
-  <copyField source="text" dest="sort_da"/>
-  <copyField source="text" dest="sort_custom"/>
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
deleted file mode 100644
index 59b8d25..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-icucollateoptions.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!-- Test schema file for CollationField options -->
-
-<schema name="test" version="1.0">
-
-  <fieldType name="string" class="solr.StrField" omitNorms="true" positionIncrementGap="0"/>
-
-  <!-- basic text field -->
-  <fieldType name="text" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.StandardTokenizerFactory"/>
-      <filter class="solr.LowerCaseFilterFactory"/>
-    </analyzer>
-  </fieldType>
-
-  <!-- ignores punctuation and whitespace -->
-  <fieldType name="sort_ignore_punctuation_t" class="solr.ICUCollationField"
-             locale="en" strength="primary" alternate="shifted"/>
-  <!-- ignores only whitespace -->
-  <fieldType name="sort_ignore_space_t" class="solr.ICUCollationField"
-             locale="en" strength="primary" alternate="shifted" variableTop=" "/>
-  <!-- ignores only accents, but not case -->
-  <fieldType name="sort_ignore_accents_t" class="solr.ICUCollationField"
-             locale="en" strength="primary" caseLevel="true"/>
-  <!-- sorts numerics in numeric order -->
-  <fieldType name="sort_numerics_t" class="solr.ICUCollationField"
-             locale="en" numeric="true"/>
-  <!-- sorts uppercase before lowercase -->
-  <fieldType name="sort_uppercase_first_t" class="solr.ICUCollationField"
-             locale="en" strength="tertiary" caseFirst="upper"/>
-
-
-  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
-  <field name="text" type="text" indexed="true" stored="false"/>
-  <field name="sort_ignore_punctuation" type="sort_ignore_punctuation_t" indexed="true" stored="false"
-         multiValued="false"/>
-  <field name="sort_ignore_space" type="sort_ignore_space_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_ignore_accents" type="sort_ignore_accents_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_numerics" type="sort_numerics_t" indexed="true" stored="false" multiValued="false"/>
-  <field name="sort_uppercase_first" type="sort_uppercase_first_t" indexed="true" stored="false" multiValued="false"/>
-
-
-  <uniqueKey>id</uniqueKey>
-
-  <!-- copy our text to some sort fields with different orders -->
-  <copyField source="text" dest="sort_ignore_punctuation"/>
-  <copyField source="text" dest="sort_ignore_space"/>
-  <copyField source="text" dest="sort_ignore_accents"/>
-  <copyField source="text" dest="sort_numerics"/>
-  <copyField source="text" dest="sort_uppercase_first"/>
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
deleted file mode 100644
index fc13431..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/schema-opennlp-extract.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<schema name="test-opennlp-extract" version="1.6">
-  <fieldType name="opennlp-en-tokenization" class="solr.TextField">
-    <analyzer>
-      <tokenizer class="solr.OpenNLPTokenizerFactory"
-                 sentenceModel="en-test-sent.bin"
-                 tokenizerModel="en-test-tokenizer.bin"/>
-    </analyzer>
-  </fieldType>
-
-  <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
-
-  <fieldType name="text" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
-    <analyzer>
-      <tokenizer class="solr.MockTokenizerFactory"/>
-      <filter class="solr.LowerCaseFilterFactory"/>
-      <filter class="solr.PorterStemFilterFactory"/>
-    </analyzer>
-  </fieldType>
-
-  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="true"/>
-  <field name="text" type="text" indexed="true" stored="false"/>
-  <field name="subject" type="text" indexed="true" stored="true"/>
-  <field name="title" type="text" indexed="true" stored="true"/>
-  <field name="subtitle" type="text" indexed="true" stored="true"/>
-  <field name="descs" type="text" indexed="true" stored="true"/>
-  <field name="descriptions" type="text" indexed="true" stored="true"/>
-
-  <dynamicField name="*_txt" type="text" indexed="true" stored="true"/>
-  <dynamicField name="*_s" type="string" indexed="true" stored="true" multiValued="true"/>
-  <dynamicField name="*_people" type="string" indexed="true" stored="true" multiValued="true"/>
-</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
deleted file mode 100644
index 90c52d7..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-  <indexConfig>
-    <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-  </indexConfig>
-  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
-  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
-</config>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
deleted file mode 100644
index 7fd793e..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig-opennlp-extract.xml
+++ /dev/null
@@ -1,206 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<config>
-  <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
-  <xi:include href="solrconfig.snippet.randomindexconfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
-  <requestHandler name="/select" class="solr.SearchHandler"></requestHandler>
-  <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
-  <directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.RAMDirectoryFactory}"/>
-  <schemaFactory class="ClassicIndexSchemaFactory"/>
-
-  <updateRequestProcessorChain name="extract-single">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">source1_s</str>
-      <str name="dest">dest_s</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-single-regex">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">source1_s</str>
-      <lst name="dest">
-        <str name="pattern">source\d(_s)</str>
-        <str name="replacement">dest$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-multi">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">source1_s</str>
-      <str name="source">source2_s</str>
-      <str name="dest">dest_s</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-multi-regex">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">source1_s</str>
-      <str name="source">source2_s</str>
-      <lst name="dest">
-        <str name="pattern">source\d(_s)</str>
-        <str name="replacement">dest$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-array">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <arr name="source">
-        <str>source1_s</str>
-        <str>source2_s</str>
-      </arr>
-      <str name="dest">dest_s</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-array-regex">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <arr name="source">
-        <str>source1_s</str>
-        <str>source2_s</str>
-      </arr>
-      <lst name="dest">
-        <str name="pattern">source\d(_s)</str>
-        <str name="replacement">dest$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-selector">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">source\d_.*</str>
-        <lst name="exclude">
-          <str name="fieldRegex">source0_.*</str>
-        </lst>
-      </lst>
-      <str name="dest">dest_s</str>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-selector-regex">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">source\d_.*</str>
-        <lst name="exclude">
-          <str name="fieldRegex">source0_.*</str>
-        </lst>
-      </lst>
-      <lst name="dest">
-        <str name="pattern">source\d(_s)</str>
-        <str name="replacement">dest$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-regex-replaceall">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">foo.*</str>
-      </lst>
-      <lst name="dest">
-        <!-- unbounded pattern that can be replaced multiple times in field name -->
-        <str name="pattern">x(\d)</str>
-        <str name="replacement">y$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <updateRequestProcessorChain name="extract-regex-replaceall-with-entity-type">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">foo.*</str>
-      </lst>
-      <lst name="dest">
-        <!-- unbounded pattern that can be replaced multiple times in field name -->
-        <str name="pattern">x(\d)</str>
-        <str name="replacement">{EntityType}_y$1</str>
-      </lst>
-    </processor>
-  </updateRequestProcessorChain>
-
-  <!-- example used in OpenNLPExtractNamedEntitiesUpdateProcessorFactory javadocs -->
-  <updateRequestProcessorChain name="multiple-extract">
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">text</str>
-      <str name="dest">people_s</str>
-    </processor>
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <arr name="source">
-        <str>title</str>
-        <str>subtitle</str>
-      </arr>
-      <str name="dest">titular_people</str>
-    </processor>
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">.*_txt$</str>
-        <lst name="exclude">
-          <str name="fieldName">notes_txt</str>
-        </lst>
-      </lst>
-      <str name="dest">people_s</str>
-    </processor>
-    <processor class="solr.processor.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <lst name="source">
-        <str name="fieldRegex">^desc(.*)s$</str>
-      </lst>
-      <lst name="dest">
-        <str name="pattern">^desc(.*)s$</str>
-        <str name="replacement">key_desc$1_people</str>
-      </lst>
-    </processor>
-    <processor class="solr.OpenNLPExtractNamedEntitiesUpdateProcessorFactory">
-      <str name="modelFile">en-test-ner.bin</str>
-      <str name="analyzerFieldType">opennlp-en-tokenization</str>
-      <str name="source">summary</str>
-      <str name="dest">summary_{EntityType}_s</str>
-    </processor>
-  </updateRequestProcessorChain>
-</config>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml b/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
deleted file mode 100644
index 23516b0..0000000
--- a/solr/contrib/analysis-extras/src/test-files/analysis-extras/solr/collection1/conf/solrconfig.snippet.randomindexconfig.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" ?>
-
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<!--
-A solrconfig.xml snippet containing indexConfig settings for randomized testing.
--->
-<indexConfig>
-  <!-- this sys property is not set by SolrTestCaseJ4 because we ideally want to use
-       the RandomMergePolicy in all tests - but some tests expect very specific
-       Merge behavior, so those tests can set it as needed.
-  -->
-  <mergePolicyFactory class="${solr.tests.mergePolicyFactory:org.apache.solr.util.RandomMergePolicyFactory}" />
-
-  <useCompoundFile>${useCompoundFile:false}</useCompoundFile>
-
-  <maxBufferedDocs>${solr.tests.maxBufferedDocs}</maxBufferedDocs>
-  <ramBufferSizeMB>${solr.tests.ramBufferSizeMB}</ramBufferSizeMB>
-
-  <mergeScheduler class="${solr.tests.mergeScheduler}" />
-
-  <writeLockTimeout>1000</writeLockTimeout>
-  <commitLockTimeout>10000</commitLockTimeout>
-
-  <!-- this sys property is not set by SolrTestCaseJ4 because almost all tests should
-       use the single process lockType for speed - but tests that explicitly need
-       to vary the lockType can set it as needed.
-  -->
-  <lockType>${solr.tests.lockType:single}</lockType>
-
-  <infoStream>${solr.tests.infostream:false}</infoStream>
-
-</indexConfig>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
new file mode 100644
index 0000000..b2cdbc2
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/analysis/TestFoldingMultitermExtrasQuery.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.analysis;
+
+import java.io.File;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+// See: https://issues.apache.org/jira/browse/SOLR-12028 Tests cannot remove files on Windows machines occasionally
+public class TestFoldingMultitermExtrasQuery extends SolrTestCaseJ4 {
+
+  public String getCoreName() {
+    return "basic";
+  }
+
+  @BeforeClass
+  public static void beforeTests() throws Exception {
+    File testHome = createTempDir().toFile();
+    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
+    initCore("solrconfig-icucollate.xml","schema-folding-extra.xml", testHome.getAbsolutePath());
+
+    int idx = 1;
+    // ICUFoldingFilterFactory
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "BadMagicICUFolding"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "Ruß"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "ΜΆΪΟΣ"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "Μάϊος"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "résumé"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "re\u0301sume\u0301"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "ELİF"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icufolding", "eli\u0307f"));
+
+    // ICUNormalizer2FilterFactory
+
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "BadMagicICUFolding"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "Ruß"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "ΜΆΪΟΣ"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "Μάϊος"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "résumé"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "re\u0301sume\u0301"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "ELİF"));
+    assertU(adoc("id", Integer.toString(idx++), "content_icunormalizer2", "eli\u0307f"));
+
+    // ICUTransformFilterFactory
+    assertU(adoc("id", Integer.toString(idx++), "content_icutransform", "Российская"));
+
+    assertU(commit());
+  }
+
+  @Test
+  public void testICUFolding() {
+    assertQ(req("q", "content_icufolding:BadMagicicuFold*"), "//result[@numFound='1']");
+    assertQ(req("q", "content_icufolding:rU*"), "//result[@numFound='1']");
+    assertQ(req("q", "content_icufolding:Re*Me"), "//result[@numFound='2']");
+    assertQ(req("q", "content_icufolding:RE\u0301su*"), "//result[@numFound='2']");
+    assertQ(req("q", "content_icufolding:El*"), "//result[@numFound='2']");
+  }
+  @Test
+  public void testICUNormalizer2() {
+    assertQ(req("q", "content_icunormalizer2:BadMagicicuFold*"), "//result[@numFound='1']");
+    assertQ(req("q", "content_icunormalizer2:RU*"), "//result[@numFound='1']");
+    assertQ(req("q", "content_icunormalizer2:Μάϊ*"), "//result[@numFound='2']");
+    assertQ(req("q", "content_icunormalizer2:re\u0301Su*"), "//result[@numFound='2']");
+    assertQ(req("q", "content_icunormalizer2:eL*"), "//result[@numFound='2']");
+  }
+  
+  public void testICUTransform() {
+    assertQ(req("q", "content_icutransform:Росс*"), "//result[@numFound='1']");
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationField.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationField.java b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationField.java
new file mode 100644
index 0000000..f164080
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationField.java
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.schema;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.lucene.analysis.util.FilesystemResourceLoader;
+import org.apache.lucene.analysis.util.ResourceLoader;
+import org.apache.lucene.analysis.util.StringMockResourceLoader;
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.BeforeClass;
+
+import com.ibm.icu.text.Collator;
+import com.ibm.icu.text.RuleBasedCollator;
+import com.ibm.icu.util.ULocale;
+
+/**
+ * Tests {@link ICUCollationField} with TermQueries, RangeQueries, and sort order.
+ */
+public class TestICUCollationField extends SolrTestCaseJ4 {
+  
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    String home = setupSolrHome();
+    initCore("solrconfig.xml","schema.xml", home);
+    // add some docs
+    assertU(adoc("id", "1", "text", "\u0633\u0627\u0628"));
+    assertU(adoc("id", "2", "text", "I WİLL USE TURKİSH CASING"));
+    assertU(adoc("id", "3", "text", "ı will use turkish casıng"));
+    assertU(adoc("id", "4", "text", "Töne"));
+    assertU(adoc("id", "5", "text", "I W\u0049\u0307LL USE TURKİSH CASING"));
+    assertU(adoc("id", "6", "text", "Testing"));
+    assertU(adoc("id", "7", "text", "Tone"));
+    assertU(adoc("id", "8", "text", "Testing"));
+    assertU(adoc("id", "9", "text", "testing"));
+    assertU(adoc("id", "10", "text", "toene"));
+    assertU(adoc("id", "11", "text", "Tzne"));
+    assertU(adoc("id", "12", "text", "\u0698\u0698"));
+    assertU(commit());
+  }
+  
+  /**
+   * Ugly: but what to do? We want to test custom sort, which reads rules in as a resource.
+   * These are largish files, and jvm-specific (as our documentation says, you should always
+   * look out for jvm differences with collation).
+   * So it's preferable to create this file on-the-fly.
+   */
+  public static String setupSolrHome() throws Exception {
+    String tmpFile = createTempDir().toFile().getAbsolutePath();
+    // make data and conf dirs
+    new File(tmpFile  + "/collection1", "data").mkdirs();
+    File confDir = new File(tmpFile + "/collection1", "conf");
+    confDir.mkdirs();
+    
+    // copy over configuration files
+    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
+    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/schema-icucollate.xml"), new File(confDir, "schema.xml"));
+    
+    // generate custom collation rules (DIN 5007-2), saving to customrules.dat
+    RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
+
+    String DIN5007_2_tailorings =
+      "& ae , a\u0308 & AE , A\u0308"+
+      "& oe , o\u0308 & OE , O\u0308"+
+      "& ue , u\u0308 & UE , u\u0308";
+
+    RuleBasedCollator tailoredCollator = new RuleBasedCollator(baseCollator.getRules() + DIN5007_2_tailorings);
+    String tailoredRules = tailoredCollator.getRules();
+    final String osFileName = "customrules.dat";
+    final FileOutputStream os = new FileOutputStream(new File(confDir, osFileName));
+    IOUtils.write(tailoredRules, os, "UTF-8");
+    os.close();
+
+    final ResourceLoader loader;
+    if (random().nextBoolean()) {
+      loader = new StringMockResourceLoader(tailoredRules);
+    } else {
+      loader = new FilesystemResourceLoader(confDir.toPath());
+    }
+    final Collator readCollator = ICUCollationField.createFromRules(osFileName, loader);
+    assertEquals(tailoredCollator, readCollator);
+
+    return tmpFile;
+  }
+
+  /** 
+   * Test termquery with german DIN 5007-1 primary strength.
+   * In this case, ö is equivalent to o (but not oe) 
+   */
+  public void testBasicTermQuery() {
+    assertQ("Collated TQ: ",
+       req("fl", "id", "q", "sort_de:tone", "sort", "id asc" ),
+              "//*[@numFound='2']",
+              "//result/doc[1]/str[@name='id'][.=4]",
+              "//result/doc[2]/str[@name='id'][.=7]"
+    );
+  }
+  
+  /** 
+   * Test rangequery again with the DIN 5007-1 collator.
+   * We do a range query of tone .. tp, in binary order this
+   * would retrieve nothing due to case and accent differences.
+   */
+  public void testBasicRangeQuery() {
+    assertQ("Collated RangeQ: ",
+        req("fl", "id", "q", "sort_de:[tone TO tp]", "sort", "id asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=4]",
+               "//result/doc[2]/str[@name='id'][.=7]"
+     );
+  }
+  
+  /** 
+   * Test sort with a danish collator. ö is ordered after z
+   */
+  public void testBasicSort() {
+    assertQ("Collated Sort: ",
+        req("fl", "id", "q", "sort_da:[tz TO töz]", "sort", "sort_da asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=11]",
+               "//result/doc[2]/str[@name='id'][.=4]"
+     );
+  }
+  
+  /** 
+   * Test sort with an arabic collator. U+0633 is ordered after U+0698.
+   * With a binary collator, the range would also return nothing.
+   */
+  public void testArabicSort() {
+    assertQ("Collated Sort: ",
+        req("fl", "id", "q", "sort_ar:[\u0698 TO \u0633\u0633]", "sort", "sort_ar asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=12]",
+               "//result/doc[2]/str[@name='id'][.=1]"
+     );
+  }
+
+  /** 
+   * Test rangequery again with an Arabic collator.
+   * Binary order would normally order U+0633 in this range.
+   */
+  public void testNegativeRangeQuery() {
+    assertQ("Collated RangeQ: ",
+        req("fl", "id", "q", "sort_ar:[\u062F TO \u0698]", "sort", "id asc" ),
+               "//*[@numFound='0']"
+     );
+  }
+  /**
+   * Test canonical decomposition with turkish primary strength. 
+   * With this sort order, İ is the uppercase form of i, and I is the uppercase form of ı.
+   * We index a decomposed form of İ.
+   */
+  public void testCanonicalDecomposition() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_tr_canon:\"I Will Use Turkish Casıng\"", "sort", "id asc" ),
+               "//*[@numFound='3']",
+               "//result/doc[1]/str[@name='id'][.=2]",
+               "//result/doc[2]/str[@name='id'][.=3]",
+               "//result/doc[3]/str[@name='id'][.=5]"
+     );
+  }
+  
+  /** 
+   * Test termquery with custom collator (DIN 5007-2).
+   * In this case, ö is equivalent to oe (but not o) 
+   */
+  public void testCustomCollation() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_custom:toene"),
+               "//*[@numFound='2']",
+               "//result/doc/str[@name='id'][.=4]",
+               "//result/doc/str[@name='id'][.=10]"
+     );
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldDocValues.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldDocValues.java b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldDocValues.java
new file mode 100644
index 0000000..57b403a
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldDocValues.java
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.schema;
+
+import java.io.File;
+import java.io.FileOutputStream;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.BeforeClass;
+
+import com.ibm.icu.text.Collator;
+import com.ibm.icu.text.RuleBasedCollator;
+import com.ibm.icu.util.ULocale;
+
+/**
+ * Tests {@link ICUCollationField} with docValues.
+ */
+public class TestICUCollationFieldDocValues extends SolrTestCaseJ4 {
+  
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    String home = setupSolrHome();
+    initCore("solrconfig.xml","schema.xml", home);
+    // add some docs
+    assertU(adoc("id", "1", "text", "\u0633\u0627\u0628"));
+    assertU(adoc("id", "2", "text", "I WİLL USE TURKİSH CASING"));
+    assertU(adoc("id", "3", "text", "ı will use turkish casıng"));
+    assertU(adoc("id", "4", "text", "Töne"));
+    assertU(adoc("id", "5", "text", "I W\u0049\u0307LL USE TURKİSH CASING"));
+    assertU(adoc("id", "6", "text", "Testing"));
+    assertU(adoc("id", "7", "text", "Tone"));
+    assertU(adoc("id", "8", "text", "Testing"));
+    assertU(adoc("id", "9", "text", "testing"));
+    assertU(adoc("id", "10", "text", "toene"));
+    assertU(adoc("id", "11", "text", "Tzne"));
+    assertU(adoc("id", "12", "text", "\u0698\u0698"));
+    assertU(commit());
+  }
+  
+  /**
+   * Ugly: but what to do? We want to test custom sort, which reads rules in as a resource.
+   * These are largish files, and jvm-specific (as our documentation says, you should always
+   * look out for jvm differences with collation).
+   * So it's preferable to create this file on-the-fly.
+   */
+  public static String setupSolrHome() throws Exception {
+    File tmpFile = createTempDir().toFile();
+    
+    // make data and conf dirs
+    new File(tmpFile + "/collection1", "data").mkdirs();
+    File confDir = new File(tmpFile + "/collection1", "conf");
+    confDir.mkdirs();
+    
+    // copy over configuration files
+    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/solrconfig-icucollate.xml"), new File(confDir, "solrconfig.xml"));
+    FileUtils.copyFile(getFile("analysis-extras/solr/collection1/conf/schema-icucollate-dv.xml"), new File(confDir, "schema.xml"));
+    
+    // generate custom collation rules (DIN 5007-2), saving to customrules.dat
+    RuleBasedCollator baseCollator = (RuleBasedCollator) Collator.getInstance(new ULocale("de", "DE"));
+
+    String DIN5007_2_tailorings =
+      "& ae , a\u0308 & AE , A\u0308"+
+      "& oe , o\u0308 & OE , O\u0308"+
+      "& ue , u\u0308 & UE , u\u0308";
+
+    RuleBasedCollator tailoredCollator = new RuleBasedCollator(baseCollator.getRules() + DIN5007_2_tailorings);
+    String tailoredRules = tailoredCollator.getRules();
+    FileOutputStream os = new FileOutputStream(new File(confDir, "customrules.dat"));
+    IOUtils.write(tailoredRules, os, "UTF-8");
+    os.close();
+
+    return tmpFile.getAbsolutePath();
+  }
+
+  /** 
+   * Test termquery with german DIN 5007-1 primary strength.
+   * In this case, ö is equivalent to o (but not oe) 
+   */
+  public void testBasicTermQuery() {
+    assertQ("Collated TQ: ",
+       req("fl", "id", "q", "sort_de:tone", "sort", "id asc" ),
+              "//*[@numFound='2']",
+              "//result/doc[1]/str[@name='id'][.=4]",
+              "//result/doc[2]/str[@name='id'][.=7]"
+    );
+  }
+  
+  /** 
+   * Test rangequery again with the DIN 5007-1 collator.
+   * We do a range query of tone .. tp, in binary order this
+   * would retrieve nothing due to case and accent differences.
+   */
+  public void testBasicRangeQuery() {
+    assertQ("Collated RangeQ: ",
+        req("fl", "id", "q", "sort_de:[tone TO tp]", "sort", "id asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=4]",
+               "//result/doc[2]/str[@name='id'][.=7]"
+     );
+  }
+  
+  /** 
+   * Test sort with a danish collator. ö is ordered after z
+   */
+  public void testBasicSort() {
+    assertQ("Collated Sort: ",
+        req("fl", "id", "q", "sort_da:[tz TO töz]", "sort", "sort_da asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=11]",
+               "//result/doc[2]/str[@name='id'][.=4]"
+     );
+  }
+  
+  /** 
+   * Test sort with an arabic collator. U+0633 is ordered after U+0698.
+   * With a binary collator, the range would also return nothing.
+   */
+  public void testArabicSort() {
+    assertQ("Collated Sort: ",
+        req("fl", "id", "q", "sort_ar:[\u0698 TO \u0633\u0633]", "sort", "sort_ar asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=12]",
+               "//result/doc[2]/str[@name='id'][.=1]"
+     );
+  }
+
+  /** 
+   * Test rangequery again with an Arabic collator.
+   * Binary order would normally order U+0633 in this range.
+   */
+  public void testNegativeRangeQuery() {
+    assertQ("Collated RangeQ: ",
+        req("fl", "id", "q", "sort_ar:[\u062F TO \u0698]", "sort", "id asc" ),
+               "//*[@numFound='0']"
+     );
+  }
+  /**
+   * Test canonical decomposition with turkish primary strength. 
+   * With this sort order, İ is the uppercase form of i, and I is the uppercase form of ı.
+   * We index a decomposed form of İ.
+   */
+  public void testCanonicalDecomposition() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_tr_canon:\"I Will Use Turkish Casıng\"", "sort", "id asc" ),
+               "//*[@numFound='3']",
+               "//result/doc[1]/str[@name='id'][.=2]",
+               "//result/doc[2]/str[@name='id'][.=3]",
+               "//result/doc[3]/str[@name='id'][.=5]"
+     );
+  }
+  
+  /** 
+   * Test termquery with custom collator (DIN 5007-2).
+   * In this case, ö is equivalent to oe (but not o) 
+   */
+  public void testCustomCollation() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_custom:toene"),
+               "//*[@numFound='2']",
+               "//result/doc/str[@name='id'][.=4]",
+               "//result/doc/str[@name='id'][.=10]"
+     );
+  }
+}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6c070b4a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldOptions.java
----------------------------------------------------------------------
diff --git a/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldOptions.java b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldOptions.java
new file mode 100644
index 0000000..0b198b7
--- /dev/null
+++ b/solr/contrib/analysis-extras/src/test/java/org/apache/solr/schema/TestICUCollationFieldOptions.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.schema;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.BeforeClass;
+
+import java.io.File;
+
+/**
+ * Tests expert options of {@link ICUCollationField}.
+ */
+public class TestICUCollationFieldOptions extends SolrTestCaseJ4 {
+  @BeforeClass
+  public static void beforeClass() throws Exception {
+    File testHome = createTempDir().toFile();
+    FileUtils.copyDirectory(getFile("analysis-extras/solr"), testHome);
+    initCore("solrconfig-icucollate.xml","schema-icucollateoptions.xml", testHome.getAbsolutePath());
+    // add some docs
+    assertU(adoc("id", "1", "text", "foo-bar"));
+    assertU(adoc("id", "2", "text", "foo bar"));
+    assertU(adoc("id", "3", "text", "foobar"));
+    assertU(adoc("id", "4", "text", "foobar-10"));
+    assertU(adoc("id", "5", "text", "foobar-9"));
+    assertU(adoc("id", "6", "text", "resume"));
+    assertU(adoc("id", "7", "text", "Résumé"));
+    assertU(adoc("id", "8", "text", "Resume"));
+    assertU(adoc("id", "9", "text", "résumé"));
+    assertU(commit());
+  }
+  
+  /*
+   * Setting alternate=shifted to shift whitespace, punctuation and symbols
+   * to quaternary level 
+   */
+  public void testIgnorePunctuation() { 
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_ignore_punctuation:foobar", "sort", "id asc" ),
+               "//*[@numFound='3']",
+               "//result/doc[1]/str[@name='id'][.=1]",
+               "//result/doc[2]/str[@name='id'][.=2]",
+               "//result/doc[3]/str[@name='id'][.=3]"
+     );
+  }
+  
+  /*
+   * Setting alternate=shifted and variableTop to shift whitespace, but not 
+   * punctuation or symbols, to quaternary level 
+   */
+  public void testIgnoreWhitespace() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_ignore_space:\"foo bar\"", "sort", "id asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=2]",
+               "//result/doc[2]/str[@name='id'][.=3]"
+     );
+  }
+  
+  /*
+   * Setting numeric to encode digits with numeric value, so that
+   * foobar-9 sorts before foobar-10
+   */
+  public void testNumerics() {
+    assertQ("Collated sort: ",
+        req("fl", "id", "q", "id:[4 TO 5]", "sort", "sort_numerics asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=5]",
+               "//result/doc[2]/str[@name='id'][.=4]"
+     );
+  }
+  
+  /*
+   * Setting caseLevel=true to create an additional case level between
+   * secondary and tertiary
+   */
+  public void testIgnoreAccentsButNotCase() {
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_ignore_accents:resume", "sort", "id asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=6]",
+               "//result/doc[2]/str[@name='id'][.=9]"
+     );
+    
+    assertQ("Collated TQ: ",
+        req("fl", "id", "q", "sort_ignore_accents:Resume", "sort", "id asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=7]",
+               "//result/doc[2]/str[@name='id'][.=8]"
+     );
+  }
+  
+  /*
+   * Setting caseFirst=upper to cause uppercase strings to sort
+   * before lowercase ones.
+   */
+  public void testUpperCaseFirst() {
+    assertQ("Collated sort: ",
+        req("fl", "id", "q", "id:6 OR id:8", "sort", "sort_uppercase_first asc" ),
+               "//*[@numFound='2']",
+               "//result/doc[1]/str[@name='id'][.=8]",
+               "//result/doc[2]/str[@name='id'][.=6]"
+     );
+  }
+}