当前位置:文档之家› Elastic Electroproduction ofMesons at HERA

Elastic Electroproduction ofMesons at HERA

Elastic Electroproduction ofMesons at HERA
Elastic Electroproduction ofMesons at HERA

DESY99-010ISSN0418-9833 February1999

Elastic Electroproduction of Mesons

at HERA

H1Collaboration

Abstract

The elastic electroproduction of mesons is studied at HERA with the H1detector for

a photon virtuality in the range and for a hadronic centre of mass

energy in the range GeV.The shape of the()mass distribution in the resonance region is measured as a function of.The full set of spin density matrix elements is determined,and evidence is found for a helicity?ip amplitude at the level of of the non-?ip amplitudes.Measurements are presented of the dependence of the cross section on,and(the four-momentum transfer squared to the proton).

They suggest that,especially at large,the cross section develops a stronger

dependence than that expected from the behaviour of elastic and total hadron hadron cross sections.

To be submitted to Eur.Phys.J.C.

C.Adloff,V.Andreev,B.Andrieu,V.Arkadov,A.Astvatsatourov,I.Ayyaz,A.Babaev, J.B¨a hr,P.Baranov,E.Barrelet,W.Bartel,U.Bassler,P.Bate,A.Beglarian,

O.Behnke,H.-J.Behrend,C.Beier,A.Belousov,Ch.Berger,G.Bernardi,T.Berndt,

G.Bertrand-Coremans,P.Biddulph,https://www.doczj.com/doc/8b6809170.html,ot,V.Boudry,W.Braunschweig,V.Brisson, D.P.Brown,W.Br¨u ckner,P.Bruel,D.Bruncko,J.B¨u rger,F.W.B¨u sser,A.Buniatian,

S.Burke,A.Burrage,G.Buschhorn,D.Calvet,A.J.Campbell,T.Carli,E.Chabert,

M.Charlet,D.Clarke,B.Clerbaux,J.G.Contreras,C.Cormack,J.A.Coughlan,M.-

C.Cousinou,B.E.Cox,G.Cozzika,J.Cvach,J.B.Dainton,W.

D.Dau,K.Daum,

M.David,M.Davidsson,A.De Roeck,E.A.De Wolf,B.Delcourt,R.Demirchyan,

C.Diaconu,M.Dirkmann,P.Dixon,W.Dlugosz,K.T.Donovan,J.

D.Dowell,A.Droutskoi, J.Ebert,G.Eckerlin,D.Eckstein,V.Efremenko,S.Egli,R.Eichler,F.Eisele,

E.Eisenhandler,E.Elsen,M.Enzenberger,M.Erdmann,A.B.Fahr,P.J.W.Faulkner,

L.Favart,A.Fedotov,R.Felst,J.Feltesse,J.Ferencei,F.Ferrarotto,M.Fleischer,

G.Fl¨u gge,A.Fomenko,J.Form′a nek,J.M.Foster,G.Franke,E.Gabathuler,K.Gabathuler, F.Gaede,J.Garvey,J.Gassner,J.Gayler,R.Gerhards,S.Ghazaryan,A.Glazov,

L.Goerlich,N.Gogitidze,M.Goldberg,I.Gorelov,C.Grab,H.Gr¨a ssler,T.Greenshaw, R.K.Grif?ths,G.Grindhammer,T.Hadig,D.Haidt,L.Hajduk,M.Hampel,V.Haustein, W.J.Haynes,B.Heinemann,G.Heinzelmann,R.C.W.Henderson,S.Hengstmann,

H.Henschel,R.Heremans,I.Herynek,K.Hewitt,K.H.Hiller,C.D.Hilton,J.Hladk′y,

D.Hoffmann,R.Horisberger,S.Hurling,M.Ibbotson,C?.˙Is?sever,M.Jacquet,M.Jaffre, L.Janauschek,D.M.Jansen,L.J¨o nsson,D.P.Johnson,M.Jones,H.Jung,H.K.K¨a stli, M.Kander,D.Kant,M.Kapichine,M.Karlsson,O.Karschnik,J.Katzy,O.Kaufmann, M.Kausch,N.Keller,I.R.Kenyon,S.Kermiche,C.Keuker,C.Kiesling,M.Klein,

C.Kleinwort,G.Knies,J.H.K¨o hne,H.Kolanoski,S.

D.Kolya,V.Korbel,P.Kostka,

S.K.Kotelnikov,T.Kr¨a merk¨a mper,M.W.Krasny,H.Krehbiel,D.Kr¨u cker,K.Kr¨u ger,

A.K¨u pper,H.K¨u ster,M.Kuhlen,T.Kurˇc a,https://www.doczj.com/doc/8b6809170.html,chnit,https://www.doczj.com/doc/8b6809170.html,hmann,https://www.doczj.com/doc/8b6809170.html,mb,

https://www.doczj.com/doc/8b6809170.html,ndon,https://www.doczj.com/doc/8b6809170.html,nge,https://www.doczj.com/doc/8b6809170.html,ngenegger,A.Lebedev,F.Lehner,V.Lemaitre,

R.Lemrani,V.Lendermann,S.Levonian,M.Lindstroem,G.Lobo,E.Lobodzinska,

V.Lubimov,S.L¨u ders,D.L¨u ke,L.Lytkin,N.Magnussen,H.Mahlke-Kr¨u ger,

N.Malden,E.Malinovski,I.Malinovski,R.Maraˇc ek,P.Marage,J.Marks,R.Marshall, H.-U.Martyn,J.Martyniak,S.J.Max?eld,T.R.McMahon,A.Mehta,K.Meier,P.Merkel, F.Metlica,A.Meyer,A.Meyer,H.Meyer,J.Meyer,P.-O.Meyer,S.Mikocki,

https://www.doczj.com/doc/8b6809170.html,stead,R.Mohr,S.Mohrdieck,M.Mondragon,F.Moreau,A.Morozov,J.V.Morris, D.M¨u ller,K.M¨u ller,P.Mur′?n,V.Nagovizin,B.Naroska,J.Naumann,Th.Naumann,

I.N′e gri,P.R.Newman,H.K.Nguyen,T.C.Nicholls,F.Niebergall,C.Niebuhr,

Ch.Niedzballa,H.Niggli,O.Nix,G.Nowak,T.Nunnemann,H.Oberlack,J.E.Olsson,

D.Ozerov,P.Palmen,V.Panassik,C.Pascaud,S.Passaggio,G.D.Patel,H.Pawletta,

E.Perez,J.P.Phillips,A.Pieuchot,D.Pitzl,R.P¨o schl,G.Pope,B.Povh,K.Rabbertz,

J.Rauschenberger,P.Reimer,B.Reisert,D.Reyna,H.Rick,S.Riess,E.Rizvi,

P.Robmann,R.Roosen,K.Rosenbauer,A.Rostovtsev,F.Rouse,C.Royon,S.Rusakov, K.Rybicki,D.P.C.Sankey,P.Schacht,J.Scheins,F.-P.Schilling,S.Schleif,P.Schleper,

D.Schmidt,D.Schmidt,L.Schoeffel,V.Schr¨o der,H.-C.Schultz-Coulon,F.Sefkow,

A.Semenov,V.Shekelyan,I.Sheviakov,L.N.Shtarkov,G.Siegmon,Y.Sirois,

T.Sloan,P.Smirnov,M.Smith,V.Solochenko,Y.Soloviev,V.Spaskov,A.Specka,

H.Spitzer,F.Squinabol,R.Stamen,P.Steffen,R.Steinberg,J.Steinhart,B.Stella,

A.Stellberger,J.Stiewe,U.Straumann,W.Struczinski,J.P.Sutton,M.Swart,S.Tapprogge,

1

M.Taˇs evsk′y,V.Tchernyshov,S.Tchetchelnitski,J.Theissen,G.Thompson,P.D.Thompson, N.Tobien,R.Todenhagen,D.Traynor,P.Tru¨o l,G.Tsipolitis,J.Turnau,E.Tzamariudaki, S.Udluft,https://www.doczj.com/doc/8b6809170.html,ik,S.Valk′a r,A.Valk′a rov′a,C.Vall′e e,P.Van Esch,A.Van Haecke,

P.Van Mechelen,Y.Vazdik,G.Villet,K.Wacker,R.Wallny,T.Walter,B.Waugh,

G.Weber,M.Weber,D.Wegener,A.Wegner,T.Wengler,M.Werner,L.R.West,

G.White,S.Wiesand,T.Wilksen,S.Willard,M.Winde,G.-G.Winter,Ch.Wissing,

C.Wittek,E.Wittmann,M.Wobisch,H.Wollatz,E.W¨u nsch,J.ˇZ′aˇc ek,J.Z′a leˇs′a k,

Z.Zhang,A.Zhokin,P.Zini,F.Zomer,J.Zsembery and M.zur Nedden

I.Physikalisches Institut der RWTH,Aachen,Germany

III.Physikalisches Institut der RWTH,Aachen,Germany

School of Physics and Space Research,University of Birmingham,Birmingham,UK

Inter-University Institute for High Energies ULB-VUB,Brussels;Universitaire Instelling Antwerpen,Wilrijk;Belgium

Rutherford Appleton Laboratory,Chilton,Didcot,UK

Institute for Nuclear Physics,Cracow,Poland

Physics Department and IIRPA,University of California,Davis,California,USA

Institut f¨u r Physik,Universit¨a t Dortmund,Dortmund,Germany

Joint Institute for Nuclear Research,Dubna,Russia

DSM/DAPNIA,CEA/Saclay,Gif-sur-Yvette,France

DESY,Hamburg,Germany

II.Institut f¨u r Experimentalphysik,Universit¨a t Hamburg,Hamburg,Germany

Max-Planck-Institut f¨u r Kernphysik,Heidelberg,Germany

Physikalisches Institut,Universit¨a t Heidelberg,Heidelberg,Germany

Institut f¨u r Hochenergiephysik,Universit¨a t Heidelberg,Heidelberg,Germany

Institut f¨u r experimentelle und angewandte Physik,Universit¨a t Kiel,Kiel,Germany

Institute of Experimental Physics,Slovak Academy of Sciences,Koˇs ice,Slovak Republic

School of Physics and Chemistry,University of Lancaster,Lancaster,UK

Department of Physics,University of Liverpool,Liverpool,UK

Queen Mary and West?eld College,London,UK

Physics Department,University of Lund,Lund,Sweden

Department of Physics and Astronomy,University of Manchester,Manchester,UK

CPPM,Universit′e d’Aix-Marseille II,IN2P3-CNRS,Marseille,France

Institute for Theoretical and Experimental Physics,Moscow,Russia

Lebedev Physical Institute,Moscow,Russia

Max-Planck-Institut f¨u r Physik,M¨u nchen,Germany

LAL,Universit′e de Paris-Sud,IN2P3-CNRS,Orsay,France

LPNHE,′Ecole Polytechnique,IN2P3-CNRS,Palaiseau,France

LPNHE,Universit′e s Paris VI and VII,IN2P3-CNRS,Paris,France

Institute of Physics,Academy of Sciences of the Czech Republic,Praha,Czech Republic Nuclear Center,Charles University,Praha,Czech Republic

INFN Roma1and Dipartimento di Fisica,Universit`a Roma3,Roma,Italy

Paul Scherrer Institut,Villigen,Switzerland

Fachbereich Physik,Bergische Universit¨a t Gesamthochschule Wuppertal,Wuppertal,Germany DESY,Institut f¨u r Hochenergiephysik,Zeuthen,Germany

Institut f¨u r Teilchenphysik,ETH,Z¨u rich,Switzerland

Physik-Institut der Universit¨a t Z¨u rich,Z¨u rich,Switzerland

2

Institut f¨u r Physik,Humboldt-Universit¨a t,Berlin,Germany

Rechenzentrum,Bergische Universit¨a t Gesamthochschule Wuppertal,Wuppertal,Germany Vistor from Yerevan Physics Institute,Armenia

Foundation for Polish Science fellow

Institut f¨u r Experimentelle Kernphysik,Universit¨a t Karlsruhe,Karlsruhe,Germany

Dept.Fis.Ap.CINVESTA V,M′e rida,Yucat′a n,M′e xico

Supported by the Bundesministerium f¨u r Bildung,Wissenschaft,Forschung und Technolo-gie,FRG,under contract numbers7AC17P,7AC47P,7DO55P,7HH17I,7HH27P,7HD17P, 7HD27P,7KI17I,6MP17I and7WT87P

Supported by the UK Particle Physics and Astronomy Research Council,and formerly by the UK Science and Engineering Research Council

Supported by FNRS-FWO,IISN-IIKW

Partially supported by the Polish State Committee for Scienti?c Research,grant no.115/E-343/SPUB/P03/002/97and grant no.2P03B05513

Supported in part by US DOE grant DE F60391ER40674

Supported by the Deutsche Forschungsgemeinschaft

Supported by the Swedish Natural Science Research Council

Supported by GAˇCR grant no.202/96/0214,GA A VˇCR grant no.A1010821and GA UK grant no.177

Supported by the Swiss National Science Foundation

Supported by VEGA SR grant no.2/5167/98

Supported by Russian Foundation for Basic Research grant no.96-02-00019

3

1Introduction

Measurements of the elastic electroproduction of vector mesons at HERA over a wide range of photon virtuality are of particular interest.For many years it has been known that at low

,that is with no hard scale,vector meson electroproduction exhibits all the properties of a

soft diffractive process.Predictions of soft processes based on QCD calculations are however

intractable.The presence of a hard scale,that is a signi?cant,makes perturbative QCD

calculations possible.Measurements of the dependences of observables in vector meson electroproduction thereby provide insight into the transition and the interplay between soft and

hard processes in QCD.

This paper presents an analysis of elastic meson electroproduction:

(1) in the range from1to60(,where is the four-momentum of the in-termediate photon)and the range from30to140GeV(is the hadronic centre of mass

energy).

The data were obtained with the H1detector in two running periods of the HERA collider,

operated with820GeV protons and27.5GeV positrons.1A low data set()

was obtained from a special run in1995,with the interaction vertex shifted by70cm in

the outgoing proton beam direction;it corresponds to an integrated luminosity of125.

A larger sample with was obtained in1996under normal running conditions;it corresponds to a luminosity of3.87.

The present measurements provide detailed information in the region and

they increase the precision of the H1measurement of electroproduction with,

which was?rst performed using data collected in1994[1].They are compared to results of the

ZEUS experiment[2]at HERA and of?xed target experiments[3–5].

The H1detector,the de?nition of the kinematic variables and the event selection are intro-

duced in section2.Acceptances,ef?ciencies and background contributions are discussed in section3.The shape of the()mass distribution and the evolution with of the skewing of

this distribution are studied in section4.Section5is devoted to the study of the meson decay

angular distributions and to the measurement of the15elements of the spin density matrix,as

a function of several kinematic variables.The dependence of the ratio of the longitudinal

to transverse cross sections is measured.The violation of-channel helicity conservation, found to be small but signi?cant at lower energies[3,6],is quanti?ed.Finally,section6presents

the distribution and the measurement of the cross section as a function of and .Predictions of several models are compared to the measurements in sections5and6.

2H1Detector,Kinematics and Event Selection

Events corresponding to reaction(1)are selected by requiring the detection of the scattered electron and of a pair of oppositely charged particles originating from a common vertex.The

absence of additional activity in the detector is required,since the scattered proton generally escapes undetected into the beam pipe.

H1uses a right-handed coordinate system with the axis taken along the beam direction, the or“forward”direction being that of the outgoing proton beam.The axis points towards the centre of the HERA ring.

2.1The H1Detector

A detailed description of the H1detector can be found in[7].Here only the detector components relevant for the present analysis are described.

The scattered electron is detected in the SPACAL[8],a lead–scintillating?bre calorimeter situated in the backward region of the H1detector,152cm from the nominal interaction point. The calorimeter is divided into an electromagnetic and a hadronic part.The electromagnetic section of the SPACAL,which covers the angular range(de?ned with respect to the nominal interaction point),is segmented into cells of transverse size.2 The hadronic section is used here to prevent hadrons from being misidenti?ed as the scattered electron.In front of the SPACAL,a set of drift chambers,the BDC,allows the reconstruction of electron track segments,providing a resolution in the transverse direction of0.5mm.

The pion candidates are detected and their momentum is measured in the central tracking detector.The major components of this detector are two2m long coaxial cylindrical drift chambers,the CJC chambers,with wires parallel to the beam direction.The inner and outer radii of the chambers are203and451mm,and530and844mm,respectively.In the forward region,the CJC chambers are supplemented by a set of drift chambers with wires perpendicular to the beam direction.The measurement of charged particle transverse momenta is performed in a magnetic?eld of1.15T,uniform over the full tracker volume,generated by a superconducting solenoidal magnet.For charged particles emitted from the nominal vertex with polar angles ,the resolution on the transverse momentum is(GeV). Drift chambers with wires perpendicular to the beam direction,situated inside the inner CJC and between the two CJC chambers,provide a measurement of coordinates with a precision of350.

The()position of the interaction vertex is reconstructed for each event by a global ?t of all measured charged particle trajectories.For each electron?ll in the accelerator,a?t is performed of the dependence on of the mean and positions of the vertices.This provides a measurement of the corresponding beam direction,which varies slightly from?ll to?ll.

The absence of activity in the H1detector not associated with the scattered electron or the decay is checked using several components of the detector.The liquid argon(LAr)calorimeter, surrounding the tracking detector and situated inside the solenoidal magnet,covers the polar angular range with full azimuthal acceptance.The muon spectrometer(FMD), designed to identify and measure the momentum of muons emitted in the forward direction, contains six active layers,each made of a pair of planes of drift cells,covering the polar angular region.The three layers situated between the main calorimeter and the toroidal

magnet of the FMD can be reached by secondary particles arising from the interaction of small angle primary particles hitting the beam collimators or the beam pipe walls.Secondary particles or the scattered proton at high can reach a set of scintillators,the proton remnant tagger (PRT),placed24m downstream of the interaction point and covering the angles .

2.2Kinematic Variables

The reconstruction method for the kinematic variables has been optimised for the measure-ment.

The variable is computed from,the incident electron beam energy,and the polar angles and of the electron and of the meson candidates[9]:

(4) where and are the four-momenta of the incident proton and of the incident electron,respec-tively.For this analysis,is computed,with very good precision,using the energy,,and the longitudinal momentum,,of the meson candidate[10]:

The value of is thus distorted if the event is due to the production of a hadron system of which the is only part and of which the remaining particles were not detected.For use in eq.(7),

is determined from the candidate measurement and the electron beam energy,such that 3For the1995data,no cut on the track polar angle is made.

4The pseudorapidity of an object detected with polar angle is de?ned as.

7

Pion candidates exactly two tracks with opposite signs

(1996)

particle transverse momenta GeV

vertex reconstructed within30cm of nominal position in

Mass selection GeV

GeV

Kinematic domain

,GeV

1996data

,GeV

,GeV

Table1:Summary of trigger conditions and event selection criteria(see text for details).

high.A cut is also applied,the purpose of which is threefold.Firstly,the acceptance for elastic events decreases at larger values,because the probability becomes sig-ni?cant that the proton hits the beam pipe walls,thus producing a signal in the PRT.Secondly, the cut suppresses events from processes which are not elastic and have a?atter distribu-tion,in particular production with proton dissociation.Thirdly,it suppresses the production of hadron systems of which the is only part and in which the remaining particles were not detected,thereby distorting the measurement of(see eq.7).A further cut,GeV, is designed to minimise the effects of initial state photon radiation from the electron.

The selected domain for,the invariant mass of the two pion candidates,is restricted to GeV,which covers the meson mass peak and avoids regions with large background contributions.In order to minimise meson contamination,the invariant mass of the pion candidates is also computed with the assumption that they are kaons,and the cut GeV is applied on the corresponding mass.

After all selection cuts,the1995sample()contains about500events, and the1996sample()1800events.

8

3Detector Effects and Background Contributions

3.1Acceptances and Ef?ciencies

Acceptances,ef?ciencies and detector resolution effects are determined using the DIFFVM Monte Carlo simulation[11],a program based on Regge theory and the vector meson domi-nance model(VDM).The simulation parameters are adjusted following the measurements pre-sented below for the dependence of the cross section on,,and for the meson angular decay distributions.The detector geometry and its response to generated particles are simulated in detail.The same reconstruction procedures and event selection criteria as for real events are applied.As an illustration of the good quality of the simulation,Fig.1presents a comparison of the distributions of several variables for the data and for the Monte Carlo simulation.The distribution of the azimuthal angle of the meson(Fig.1c)re?ects the regions of the SPACAL that are active in the trigger.The distribution of the transverse momenta of the pion candidates (Fig.1d)depends on the details of the meson decay angular distribution.It has been carefully checked that the Monte Carlo simulation reproduces well the details of the tracker acceptance and ef?ciency,both for positively and for negatively charged pions.

In the kinematic domain de?ned in Table1,the acceptance depends most strongly on in a purely geometrical manner related to the trigger conditions.The cuts on the polar angles and on the minimum transverse momenta of the pion candidates induce-dependent acceptance corrections,which are sensitive to the angular decay distributions.The and limits of the selected kinematic domain are such that the ef?ciency is almost constant over each bin.The cut on induces very small corrections.

For each of the measurements presented below,systematic errors are computed by varying the reconstructed polar angle of the electron by mrad,which corresponds to the systematic uncertainty on this measurement,and by varying in the Monte Carlo simulation the cross section dependence on,,and the meson decay distributions by the amount allowed by the present measurements(see[12]for more details).Small remaining uncertainties related to the simulation of the tracker uniformity are neglected.Further systematic uncertainties that affect only certain measurements are described where appropriate below.The positive and negative variations are combined separately in the form of quadratic sums,to compute the systematic errors.

In addition to the effects studied with the DIFFVM simulation,the trigger ef?ciency is stud-ied using several independent triggers.Regions of the SPACAL for which the trigger ef?ciency is below94%are discarded from the measurement.Losses of elastic events due to noise in the LAr,FMD and PRT detectors are computed from randomly triggered events in the detector. Radiative corrections are determined using the HERACLES program[13].

3.2Background Contributions

The main background contributions to meson elastic production are due to the elastic produc-tion of and mesons and to diffractive production with proton dissociation.

9

0.025

0.050.0750.10.1250.150.1750.20.225

θe [deg.]

1/N d N /d θ

e

0.02

0.040.060.080.1θρ [deg.]

1/N d N /d θρ

0.020.040.060.080.10.120.14

0.16φρ [deg.]

1/N d N /d φρ

0.020.040.060.080.10.120.14

0.16p t [GeV]

1/N d N /d p t

Figure 1:Uncorrected distributions of the polar angle of the scattered electron,the polar angle of the meson,the azimuthal angle of the meson in the laboratory frame,and the transverse momenta of the two pion candidates,for the 1996data sample (points)and for the Monte Carlo simulation (histograms),after all selection cuts.

10

3.2.1Elastic Production of and Mesons

The elastic production of mesons:

(9)

may produce background in the present data sample through the two decay modes[14]:

(10)

(11)

The contribution of the?rst decay mode is ef?ciently reduced by the mass selection cut,by requiring the absence in the LAr calorimeter of clusters with energy larger than0.5GeV which are not associated with a track,and by the cut on the variable.However,events from the second decay mode are selected within the present sample.This background is subtracted statistically assuming the:ratio of1:9which is motivated by SU(3)?avour symmetry and is consistent with HERA photoproduction measurements[15].

The production rate of mesons:

(12)

amounts to about15%of the production rate for the present kinematic domain[16–18].The following decay modes[14]may lead to the presence of background events in the selected sample:

(13)

(14)

(15)

The?rst contribution is mostly eliminated by the and the mass selection cuts,and the other two are signi?cantly reduced by the cuts against additional particles and by the and mass selection cuts.

Using the DIFFVM Monte Carlo simulation,the contribution of and elastic production remaining in the selected sample is determined to be in the invariant mass range 0.6 1.1GeV,where1.4%and1.9%come from the and contributions,respec-tively.For the study of the shape of the mass distribution,the range used is0.5

1.1GeV,where the contributions of and elastic production are determined to be4.7%and

2.3%,respectively,and are subtracted statistically bin-by-bin from the mass distributions(see section4).

3.2.2Diffractive Production of Mesons with Proton Dissociation

An important background to elastic production is due to the diffractive production of mesons with proton dissociation

(16)

11

when the baryonic system is of relatively low mass GeV and its decay products are thus not detected in the PRT,the FMD or the forward regions of the LAr calorimeter and the tracking detector.

The contamination from proton dissociation is determined using the DIFFVM Monte Carlo. The distribution of is generated as(see[19]):

(17)

For GeV,the details of baryonic resonance production and decays are simulated fol-lowing the Particle Data Group(PDG)tables[14].For larger masses,the system is modelled as formed of a quark and a diquark,which fragment according to the JETSET algorithm[20]. The distribution of proton dissociation events is modelled by an exponentially falling distri-bution with a slope parameter(cf.the measurements in[17]and[21]).The DIFFVM Monte Carlo is also used to compute the probability that the scattered proton in an elastic event with gives a signal in the PRT.

The proton dissociation background in the selected sample of events is determined without making any hypothesis for the relative production rates for elastic and inelastic events.It is deduced using the total number of events and the number of events with no signal in the PRT or the FMD,given the probabilities of obtaining no signal in these detectors for elastic interactions and for interactions with proton dissociation.These probabilities are determined using the Monte Carlo simulation.The proton dissociation background in the present sample amounts to.The uncertainty on this number is estimated by varying by the exponent of in eq.(17),by varying the slope parameters of the exponential distributions of elastic and proton dissociation events within the experimental limits(see section6.1)and by computing the correction using only the PRT or only the FMD[12].

3.2.3Other Background Contributions

Other background contributions are negligibly small.The background due to the

decay mode of the meson is determined to be only,due to the cuts against additional particles and the cut on the variable.The study of the mass distributions presented in section4also indicates that events with photon dissociation into vector mesons other than ,and do not contribute more than1%.5The background from photoproduction events with a hadron being misidenti?ed as the electron candidate in the SPACAL is extremely small, because of the high cut.

4Mass Distributions

For the1996events passing the selection cuts of Table1,with and GeV,the distribution of,the invariant mass,is presented in Figs.2and3for ?ve domains in.The and background contributions(see section3.2.1)are subtracted according to their mass distribution obtained from the DIFFVM Monte Carlo simulation.

The mass distributions are skewed compared to a relativistic Breit-Wigner pro?le:enhance-ment is observed in the low mass region and suppression in the high mass side.This effect has been attributed to an interference between the resonant and the non-resonant production of two pions[22].In order to extract the contribution of the resonant part of the cross section,two different procedures are used.

Following the phenomenological parameterisation of Ross and Stodolsky[23],the distribution is described as:

(18) where is a normalisation constant and

m

[GeV]

m [GeV]

m [GeV]

m [GeV]

m ππ [GeV]

Figure 2:Acceptance corrected mass distributions for the 1996data sample,after statistical subtraction of the remaining and background contributions,divided into ?ve bins in .The superimposed curves are the result of ?ts to skewed relativistic Breit-Wigner distributions using the Ross-Stodolsky parameterisation of eq.(18),with the mass and width ?xed at the PDG values and assuming no non-resonant background.The solid curves are the results of the ?ts,the dashed curves correspond to the non-skewed Breit-Wigner contributions.The errors on the data are statistical only.

14

m

[GeV]

m [GeV]

m [GeV]

m ππ [GeV]

m ππ [GeV]

Figure 3:Same data as in Fig.2,but compared to the S¨o ding parameterisation of eq.(22).The solid curves are the results of the ?ts,the dashed curves correspond to the non-skewed Breit-Wigner contributions,and the dotted curves correspond to the interferences between the resonant and the non-resonant amplitudes.The errors on the data are statistical only.

15

and the skewing parameter.The results of the?ts are presented in Fig.2,the values being good in all bins.

The data are also analysed using the parameterisation proposed by S¨o ding[25],in which the skewing of the mass spectrum is explained by the interference of a resonant amplitude and a p-wave Drell-type background term:

(23)

where is a constant?xing the relative normalisation of the interference contribution.In view of the uncertainty in the phase between the resonant and the non-resonant amplitudes,no constraint is imposed on the relative contributions of the background and interference terms.

The S¨o ding parameterisation also describes well the integrated data in the range GeV,with values for the resonance mass and width in agreement with the PDG values and non-resonant background compatible with zero.For the?ve selected bins,the width and the mass of the meson are thus?xed and is taken to be zero.Fits to the normalisation and the skewing parameter are again of good quality,and the results are presented in Fig.3.

Fig.4shows the?t values of the skewing parameters as a function of,together with the results of other measurements in photoproduction[26–28]and in electroproduction[1,2,5].The systematic errors are computed as described in section3.1,and include in addition the effect of the variation by50%of the and background contributions.The skewing of the mass distribution is observed to decrease with.No signi?cant or dependence of the skewing is observed within the data.

16

n (R o s s -S t o d o l s k y )

f I / f ρ [G e V ] (S ?d i n

g )

Figure 4:dependence of the skewing parameters for elastic production:n ,for the Ross-Stodolsky parameterisation of eq.(18),and ,for the S¨o ding parameterisation of eq.(22).For the present measurements (full circles),the inner error bars are statistical,and the full error bars include the systematic errors added in quadrature.The other measurements are from H1[26]and ZEUS [27,28]in photoproduction,and from H1[1],ZEUS [2]and E665[5]in electroproduction.

17

5Helicity Study

5.1Angular Decay Distributions

The study of the angular distributions of the production and decay of the meson gives in-formation on the photon and polarisation states.The decay angles can be de?ned in several reference frames[29].In the helicity system,used for the present measurement,three angles are de?ned as follows(Fig.5).The angle,de?ned in the hadronic centre of mass system(cms),is the azimuthal angle between the electron scattering plane and the plane containing the and the scattered proton.The meson decay is described by the polar angle and the azimuthal angle of the positive pion in the rest frame,with the quantisation axis taken as the direction opposite to that of the outgoing proton in the hadronic cms.

The normalised angular decay distribution(,,)is expressed following the for-malism used in[30]as a function of15spin density matrix elements in the form

(24) where is the polarisation parameter of the virtual photon:

6In general,there are further contributions to the angular decay distribution,which vanish for unpolarised leptons and for(see[30]).

18

hadronic centre of mass system

hadronic centre of mass

electron scattering plane production plane

rest frame

ρρ

Figure 5:Angle de?nition for the helicity system in elastic

meson production.

Speci?c relations between the amplitudes,leading to predictions for the values of several

matrix elements,follow from additional hypotheses.

–channel helicity conservation

For the case of -channel helicity conservation (SCHC),the helicity of the virtual photon is retained by the meson and the helicity of the proton is unchanged:

(26)

Single and double helicity ?ip amplitudes then vanish so that (omitting the nucleon helic-ities):

(27)(28)and all matrix elements become zero,except ?ve:

(29)Furthermore,the following relationships occur between these elements:

(30)

Natural parity exchange

Natural parity exchange (NPE)is de?ned by the following relations between the ampli-tudes:7

(31)

ElasticSearch面试题

1:es介绍 Elasticsearch是一个基于Lucene的实时的分布式搜索和分析引擎。设计用于云计算中, 能够达到实时搜索,稳定,可靠,快速,安装使用方便。基于RESTful接口。 普通请求是...get?a=1 rest请求....get/a/1 2:全文搜索的工具有哪些 Lucene Solr Elasticsearch 3:es的bulk的引用场景 1.bulk API可以帮助我们同时执行多个请求 2.create 和index的区别 如果数据存在,使用create操作失败,会提示文档已经存在,使用index则可以成功执行。 3.可以使用文件操作 使用文件的方式 vi requests curl -XPOST/PUT localhost:9200/_bulk --data-binary @request; bulk请求可以在URL中声明/_index 或者/_index/_type 4.bulk一次最大处理多少数据量 bulk会把将要处理的数据载入内存中,所以数据量是有限制的 最佳的数据量不是一个确定的数值,它取决于你的硬件,你的文档大小以及复杂性,你的索引以及搜索的负载 一般建议是1000-5000个文档,如果你的文档很大,可以适当减少队列,大小建议是 5-15MB,默认不能超过100M, 可以在es的配置文件中修改这个值http.max_content_length: 100mb 5.版本控制的一个问题 在读数据与写数据之间如果有其他线程进行写操作,就会出问题,es使用版本控制才避免这种问题。 在修改数据的时候指定版本号,操作一次版本号加1。 6.es的两个web访问工具

elasticsearch学习文档

1.全文搜索引擎elasticsearch 1.1.Elasticsearch简介 Elasticsearch是开源的,分布式的,提供rest接口,支持云端调用的,构建在Apache Lucene之上的搜索引擎。 1.2.优点&缺点 优点:开箱即用,分布式,rest 接口,支持云端调用。 缺点:没有大量商业产品应用。分片的数目不能动态调整,只能在初始化索引的时候指定。 2.E lasticsearch的安装 2.1.运行环境 JDK6以上 2.2.下载Elasticsearch 为了更好的对中文进行分词,减少配置问题,下载集成分词的elasticsearch-rtf(基于elasticsearch 0.90.0,目前elasticsearch更新到0.90.5)版本。Rtf集成了ik、mmseg分词以及searchwrapper、thrift等插件。 什么是ElasticSearch-RTF? RTF是Ready To Fly的缩写,在航模里面,表示无需自己组装零件即可直接上手即飞的航空模型,elasticsearch-RTF是针对中文的一个发行版,即使用最新稳定的elasticsearch版本,并且帮你下载测试好对应的插件,如中文分词插件等,还会帮你做好一些默认的配置,目的是让你可以下载下来就可以直接的使用。下载地址如下:https://https://www.doczj.com/doc/8b6809170.html,/medcl/elasticsearch-rtf

注释:分词是用于模糊匹配的时候,是把一段话当成词语还是当成单个字来搜索的规则。 2.3.安装 解压elasticsearch-rtf-mast.zip到你指定的目录下即可。 2.4.运行 2.4.1.启动服务 cd/usr/local/elasticsearch/bin/service ./elasticsearch start 第一次启动服务后,在/usr/local/elasticsearch目录生成data目录和logs目录2.4.2.停止服务 cd/usr/local/elasticsearch/bin/service ./elasticsearch stop 3.e lasticsearch配置文件详解 elasticsearch.yml配置文件内容较多,挑几个可能会用的说一下。 https://www.doczj.com/doc/8b6809170.html,: elasticsearch 配置es的集群名称,默认是elasticsearch,es会自动发现在同一网段下的es,如果在同一网段下有多个集群,就可以用这个属性来区分不同的集群。 https://www.doczj.com/doc/8b6809170.html,: "Franz Kafka" 节点名,默认随机指定一个name列表中名字,该列表在es的jar包中config文件夹里name.txt 文件中,其中有很多作者添加的有趣名字。 node.master: true 指定该节点是否有资格被选举成为node,默认是true,es是默认集群中的第一台机器为master,如果这台机挂了就会重新选举master。 network.bind_host: 192.168.0.1

ElasticSearch使用手册

ElasticSearch使用手册 一、ElasticSearch简介 1.1.什么是ElasticSearch ElasticSearch(以下均检查ES)是Compass(基于Lucene开源项目)作者Shay Banon在2010年发布的高性能、实时、分布式的开源搜索引擎。后来成立了ElasticSearch公司,负责ES相关产品的开发及商用服务支持,ES依旧采用免费开源模式,但部分插件采用商用授权模式,例如Marvel插件(负责ES的监控管理)、Shield插件(提供ES的授权控制)。 1.2.ElasticSearch的基础概念 ?Collection 在SolrCloud集群中逻辑意义上的完整的索引。它常常被划分为一个或多个Shard,它们使用相同的Config Set。如果Shard数超过一个,它就是分布式索引,SolrCloud让你通过Collection名称引用它,而不需要关心分布式检索时需要使用的和Shard相关参数。 ?Config Set Solr Core提供服务必须的一组配置文件。每个config set有一个名字。最小需要包括solrconfig.xml (SolrConfigXml)和schema.xml (SchemaXml),除此之外,依据这两个文件的配置内容,可能还需要包含其它文件。它存储在Zookeeper中。Config sets可以重新上传或者使用upconfig命令更新,使用Solr的启动参数bootstrap_confdir指

定可以初始化或更新它。 ?Core Core也就是Solr Core,一个Solr中包含一个或者多个Solr Core,每个Solr Core可以独立提供索引和查询功能,每个Solr Core对应一个索引或者Collection的Shard,Solr Core的提出是为了增加管理灵活性和共用资源。在SolrCloud中有个不同点是它使用的配置是在Zookeeper中的,传统的Solr core的配置文件是在磁盘上的配置目录中。 ?Leader 赢得选举的Shard replicas。每个Shard有多个Replicas,这几个Replicas需要选举来确定一个Leader。选举可以发生在任何时间,但是通常他们仅在某个Solr实例发生故障时才会触发。当索引documents时,SolrCloud会传递它们到此Shard对应的leader,leader 再分发它们到全部Shard的replicas。 ?Replica Shard的一个拷贝。每个Replica存在于Solr的一个Core中。一个命名为“test”的collection以numShards=1创建,并且指定replicationFactor设置为2,这会产生2个replicas,也就是对应会有2个Core,每个在不同的机器或者Solr实例。一个会被命名为test_shard1_replica1,另一个命名为test_shard1_replica2。它们中的一个会被选举为Leader。 ?Shard

elasticSearch

ElasticSearch:可扩展的开源弹性搜索解决方案 开源的分布式搜索引擎支持时间时间索引和全文检索。 索引:index 存放数据 类型:type 区分储存的对象 文档:document 储存的主要实体 页面: field 角色关系对照 elasticsearch 跟 MySQL 中定义资料格式的角色关系对照表如下 MySQL elasticsearch database index table type table schema mapping row document field field http://localhost:9200/mishu_index/hunanzhaobiaowang/ _search?q=title:嘉禾县基本烟田土地整理施工 ElasticSearch官网:https://www.doczj.com/doc/8b6809170.html,/ 先上一张elasticsearch的总体框架图:

ElasticSearch是基于Lucene开发的分布式搜索框架,包含如下特性: 分布式索引、搜索 索引自动分片、负载均衡 自动发现机器、组建集群 支持Restful 风格接口 配置简单等。 下图是ElasticSearch的第三方插件管理工具,通过它可以很清晰的看到它索引分布的情况:哪块分布在那里,占用空间多少都可以看到,并且可以管理索引。

当一台机挂了时,整个系统会对挂机里的内容重新分配到其它机器上,当挂掉的机重新加 入集群时,又会重新把索引分配给它。当然,这些规则都是可以根据参数进行设置的,非 常灵活。ElasticSearch是先把索引的内容保存到内存之中,当内存不够时再把索引持久化 到硬盘中,同时它还有一个队列,是在系统空闲时自动把索引写到硬盘中。 的后端存储方式可以有一下四种: 1. 像普通的 Lucene 索引,存储在本地文件系统中; 2. 存储在分布式文件系统中,如 freeds; 3. 存储在 Hadoop 的 hdfs中; 4. 存储在亚马逊的 S3 云平台中。 它支持插件机制,有丰富的插件。比如和 mongoDB、couchDB 同步的river 插件,分词插件,Hadoop 插件,脚本支持插件等。 下面介绍elasticsearch的几个概念: cluster 代表一个集群,集群中有多个节点,其中有一个为主节点,这个主节点是可以通过选举产 生的,主从节点是对于集群内部来说的。es 的一个概念就是去中心化,字面上理解就是无 中心节点,这是对于集群外部来说的,因为从外部来看 es 集群,在逻辑上是个整体,与 任何一个节点的通信和与整个es 集群通信是等价的。在配置文件中可以配置集群的名字,在同一局域网内的机器,配置相同的cluster名字,将会自动组建集群,不需要其它特殊配置。 shards

Elasticsearch权威指南(中文版)

Elasticsearch 权威指南(中文版) 1、入门 Elasticsearch是一个实时分布式搜索和分析引擎。它让你以前所未有的速度 处理大数据成为可能。 它用于全文搜索、结构化搜索、分析以及将这三者混合使用: 维基百科使用Elasticsearch提供全文搜索并高亮关键字,以及输入实时搜索(search-as-you-type)和搜索纠错(did-you-mean)等搜索建议功能。 英国卫报使用Elasticsearch结合用户日志和社交网络数据提供给他们的编辑以实时的反馈,以便及时了解公众对新发表的文章的回应。StackOverflow结合全文搜索与地理位置查询,以及more-like-this功能来找到相关的问题和答案。 Github使用Elasticsearch检索1300亿行的代码。 但是Elasticsearch不仅用于大型企业,它还让像DataDog以及Klout这样的创业公司将最初的想法变成可扩展的解决方案。Elasticsearch可以在你的笔记本上运行,也可以在数以百计的服务器上处理PB级别的数据。Elasticsearch所涉及到的每一项技术都不是创新或者革命性的,全文搜索, 分析系统以及分布式数据库这些早就已经存在了。它的革命性在于将这些独立且有用的技术整合成一个一体化的、实时的应用。它对新用户的门槛很低,当然它也会跟上你技能和需求增长的步伐。 如果你打算看这本书,说明你已经有数据了,但光有数据是不够的,除非你能对这些数据做些什么事情。

很不幸,现在大部分数据库在提取可用知识方面显得异常无能。的确,它们能够通过时间戳或者精确匹配做过滤,但是它们能够进行全文搜索,处理同义词和根据相关性给文档打分吗?它们能根据同一份数据生成分析和聚合的结果吗?最重要的是,它们在没有大量工作进程(线程)的情况下能做到对数据的实时处理吗? 这就是Elasticsearch存在的理由:Elasticsearch鼓励你浏览并利用你的数 据,而不是让它烂在数据库里,因为在数据库里实在太难查询了。Elasticsearch是你新认识的最好的朋友。 1.1、是什么 为了搜索,你懂的 Elasticsearch是一个基于Apache Lucene(TM)的开源搜索引擎。无论在开源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。 但是,Lucene只是一个库。想要使用它,你必须使用Java来作为开发语言并将其直接集成到你的应用中,更糟糕的是,Lucene非常复杂,你需要深入了解检索的相关知识来理解它是如何工作的。 Elasticsearch也使用Java开发并使用Lucene作为其核心来实现所有索引和搜索的功能,但是它的目的是通过简单的RESTful API来隐藏Lucene的复杂性,从而让全文搜索变得简单。 不过,Elasticsearch不仅仅是Lucene和全文搜索,我们还能这样去描述它: ?分布式的实时文件存储,每个字段都被索引并可被搜索 ?分布式的实时分析搜索引擎 ?可以扩展到上百台服务器,处理PB级结构化或非结构化数据

ElasticSearch5.1 基本概念和配置详解

二、几个基本概念 接近实时(NRT) Elasticsearch 是一个接近实时的搜索平台。这意味着,从索引一个文档直到这个文档能够被搜索到有一个很小的延迟(通常是1 秒)。 集群(cluster) 代表一个集群,集群中有多个节点(node),其中有一个为主节点,这个主节点是可以通过选举产生的,主从节点是对于集群内部来说的。es的一个概念就是去中心化,字面上理解就是无中心节点,这是对于集群外部来说的,因为从外部来看es集群,在逻辑上是个整体,你与任何一个节点的通信和与整个es集群通信是等价的。 索引(index)

ElasticSearch将它的数据存储在一个或多个索引(index)中。用SQL领域的术语来类比,索引就像数据库,可以向索引写入文档或者从索引中读取文档,并通过ElasticSearch内部使用Lucene将数据写入索引或从索引中检索数据。文档(document) 文档(document)是ElasticSearch中的主要实体。对所有使用ElasticSearch 的案例来说,他们最终都可以归结为对文档的搜索。文档由字段构成。 映射(mapping) 所有文档写进索引之前都会先进行分析,如何将输入的文本分割为词条、哪些词条又会被过滤,这种行为叫做映射(mapping)。一般由用户自己定义规则。类型(type) 每个文档都有与之对应的类型(type)定义。这允许用户在一个索引中存储多种文档类型,并为不同文档提供类型提供不同的映射。 分片(shards) 代表索引分片,es可以把一个完整的索引分成多个分片,这样的好处是可以把一个大的索引拆分成多个,分布到不同的节点上。构成分布式搜索。分片的数量只能在索引创建前指定,并且索引创建后不能更改。 副本(replicas) 代表索引副本,es可以设置多个索引的副本,副本的作用一是提高系统的容错性,当个某个节点某个分片损坏或丢失时可以从副本中恢复。二是提高es的查询效率,es会自动对搜索请求进行负载均衡。 数据恢复(recovery)

ElasticSearch

ElasticSearch ES评估资料 通过开发机登陆hadoop03:9200/_plugin/sql 可以访问 ES调研结果 以下是我们对于ES的调研结果(调研主要是锦明完成的,我主要把各项数据总结一下) 我们已经在开发机上部署了ES以及ES SQL,ES Hadoop插件,大家如果要访问ES SQL的话可以通过开发机登陆 hadoop03:9200/_plugin/sql 1. 1. 使用方式: 目前在我们的环境中ES大致有下面三种使用方式可供先择: a) 调用Estate的restfule API/Java API用于做数据的增删改查。经测试这种方法效率最高 b) 布署ES-SQL插件,提供SQL的方式插入,删除,修改以及查询; c) 布置es-hadoop插件,将es与hive集成; 通过hive SQL进行数据的批量插入和查询 1. 2. 性能评估 测试对象:user_basic_es2,记录数目74228947,字段数70-80

使用方式 操作 API ES-SQL HIVE 批量插入7500万40mins(数据要提前准备好) 不支持90mins 批量更新7500万40mins(数据提前准备好)不支持现有配置Hive语法不支持更新 删除数据1s 1s 现有配置Hive方法不支持更新 单表查询-where过滤 1s 1s 60mins 单表查询-Group By 1s 1s 60mins Hive之所以查询慢是因为hive并没有用到ES的索引,查询的时候只是把数据都读了出来在map端进行过滤以及之后的操作,所以完全没法使用 而ES SQL会把查询翻译程API,然后使用API发起查询下面是几段测试SQL,都在1s返回结果: a) Select count(*) from user_basic_es2 ; b) Select address_city, gender, count(*) from user_basic_es2 group by address_city, gender c) Select count(*) from user_basic_es2 where gender=’male’ and address_city=’上’ (result 17274) d) Select user_id from user_basic_es2 where gender=’male’ (result 61647932) 从上面的结果来看,基本1-2s能返回查询结果 1. 3. 各种使用方式优缺点评估 优势 使用 方式 优势劣势适用场景 API 提供所有的ES功能;最快速需要开发应用来更新及展示数据需求很灵活的情况下 ES-SQL 使用方便;将SQL解析成ES 查询,所以响应快速 不支持数据的插入更新;不能与HIVE中的其他 数据一起使用 用于数据的查询 HIVE 可以同时访问存储在 HDFS/HBASE/ES中的数据 只将ES作为简单的数据存储,并不将SQL解 析成ES查询,所以速度最慢;不能分字段更新 数据,一次只能更新所有字段 用于将hive中的数 据算好以后批量存入 供后续查询 1. 4. ES占用的存储HDFS: 1.3GB ES: 42GB

大数据技术之elasticsearch【下】

大数据技术之Elasticsearch【下】 3.1.6 新建文档(源数据map方式添加json) 1)源代码 @Test public void createIndexByMap() { // 1 文档数据准备 Map json = new HashMap(); json.put("id", "2"); json.put("title", "基于Lucene的搜索服务器"); json.put("content", "它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口"); // 2 创建文档 IndexResponse indexResponse = client.prepareIndex("blog", "article", "2").setSource(json).execute().actionGet(); // 3 打印返回的结果 System.out.println("index:" + indexResponse.getIndex()); System.out.println("type:" + indexResponse.getType()); System.out.println("id:" + indexResponse.getId()); System.out.println("version:" + indexResponse.getVersion()); System.out.println("result:" + indexResponse.getResult()); // 4 关闭连接 client.close(); } 2)结果查看 3.1.7 新建文档(源数据es构建器添加json) 1)源代码

ElasticSearch基础知识

Elasticsearch介绍 Elasticsearch是个全文搜索服务器,简称ES,它相当于一个数据库,也有增删改查操作。为什么不直接用数据库呢?因为在全文搜索方面它比数据库更快、更智能。 更快:倒排索引,对文档分词,给每一个词建立索引,标记在那一条记录中有出现 更智能:对数据进行分词,分词之后进行标准化处理,它可以搜索匹配度、大小写、近义词等 Elasticsearch head和kibana两种客户端工具可选,使用Restfull风格的查询语句Elasticsearch和mysql结构对比 Restfull风格的查询语句

ES在wonder 的使用架构 索引index 由具有相同字段的文档列表组成,相当于mysql中的表。?每个索引都有自己的mapping定义,用于定义字段名和类型 ?索引中存储着具有相同结构的文档

节点Node 一个Elasticsearch的运行实例,集群的其中一个构成单元。 正排索引 维护文档id到内容、单词的关联关系,例如 倒排索引 MySQL like查询需要一行一行的查找,ES有了倒排索引就就能知道关键字在第几行出现了。加快了查询效率,标准化处理是搜索更加智能,意思大小写、匹配度、同义词、 维护单词到文档id的关联关系,例如 分片 分片是Elasticsearch在集群周围分发数据的单位。Elasticsearch在重新平衡数据时(例如发

生故障后)移动分片的速度取决于分片的大小和数量以及网络和磁盘性能。 文档Document 文档Document 核心数据类型 用户存储在es中的数据文档,相当于mysql的表中的一行,Json结构形式,由字段组成,常见数据类型如下: ●字符串:text、keyword,text是分词,keyword是不分词的 ●数值型:long、integer、short、byte、double、float、half_float、scaled_float ●布尔:boolean ●日期:date 不分词,必须全匹配 ●二进制:binary ●范围类型:integer_range、float_range、long_range、double_range、date_range

Elasticsearch工具类使用介绍

Elasticsearch工具类使用说明 目录 1. 连接Elasticsearch服务 (2) 2. 创建索引 (2) 3. 删除索引 (2) 4. 获取索引 (2) 5. 插入数据 (2) 6. 批量插入数据 (2) 7. 更新数据 (3) 8. 批量更新数据 (3) 9. 删除数据 (3) 10. 批量删除数据 (3) 11. 根据id查询数据 (3) 12. 根据id批量查询数据 (3) 13. 统计count (4) 14. 分组统计count (4) 15. 根据条件查询一条数据 (4) 16. 根据条件查询一批数据 (4) 17. 根据条件查询一页数据 (5) 18. 分组查询 (5) 19. 滚动查询数据 (6)

//第一种创建索引test impl.getElasticsearchUtil().createIndex("test"); // 第二种创建索引test,指定字段,分片数,副本数 List columns = new ArrayList<>(); Field col = new Field(); col.setName("city"); col.setType(Field.type_keyword); columns.add(col); Field col1 = new Field(); col1.setName("age"); col1.setType(Field.type_integer); columns.add(col1); Field col2 = new Field(); col2.setName("birth"); col2.setType(Field.type_date); col2.setFormat(Field.date_format_simple); columns.add(col2); impl.getElasticsearchUtil().createIndex("test", columns, 5, 1); 3.删除索引 // 删除索引test impl.getElasticsearchUtil().deleteIndex("test"); 4.获取索引 // 获取集群中所有的索引名称 List indices = impl.getAllIndexs(); 5.插入数据 // 插入数据 JSONObject data = new JSONObject(); data.put("id", "1");//id如果不指定,会自动生成uuid data.put("age", 43); data.put("city", "南京"); data.put("birth", "1975-10-12"); impl.addData("test", data, "id"); 6.批量插入数据 // 批量插入数据 List datas = new ArrayList<>(); JSONObject data1 = new JSONObject(); data1.put("id", "1"); data1.put("age", 43); data1.put("city", "南京");

Elasticsearch-权威指南(中文版)

Elasticsearch 权威指南(中文版) 1、入门 Elasticsearch 是一个实时分布式搜索和分析引擎。它让你以前所未有的速度 处理大数据成为可能。 它用于全文搜索、结构化搜索、分析以及将这三者混合使用: 维基百科使用Elasticsearch 提供全文搜索并高亮关键字,以及输入实时搜索(search-as-you-type) 和搜索纠错(did-you-mean) 等搜索建议功能。 英国卫报使用Elasticsearch 结合用户日志和社交网络数据提供给他们的编辑 以实时的反馈,以便及时了解公众对新发表的文章的回应。 StackOverflow 结合全文搜索与地理位置查询,以及more-like-this 功能 来找到相关的问题和答案。 Github 使用Elasticsearch 检索1300 亿行的代码。 但是Elasticsearch 不仅用于大型企业,它还让像DataDog 以及Klout这样 的创业公司将最初的想法变成可扩展的解决方案。Elasticsearch 可以在你的 笔记本上运行,也可以在数以百计的服务器上处理PB级别的数据。Elasticsearch 所涉及到的每一项技术都不是创新或者革命性的,全文搜索, 分析系统以及分布式数据库这些早就已经存在了。它的革命性在于将这些独立 且有用的技术整合成一个一体化的、实时的应用。它对新用户的门槛很低,当然它也会跟上你技能和需求增长的步伐。 如果你打算看这本书,说明你已经有数据了,但光有数据是不够的,除非你能对这些数

Elasticsearch 权威指南(中文版)据做些什么事情。

很不幸,现在大部分数据库在提取可用知识方面显得异常无能。的确,它们能够通过时间戳或者精确匹配做过滤,但是它们能够进行全文搜索,处理同义词和根据相关性给文档打分吗?它们能根据同一份数据生成分析和聚合的结果吗?最重要的是,它们在没有大量工作进程(线程)的情况下能做到对数据的实时处理吗? 这就是Elasticsearch 存在的理由:Elasticsearch 鼓励你浏览并利用你的数 据,而不是让它烂在数据库里,因为在数据库里实在太难查询了。 Elasticsearch 是你新认识的最好的朋友。 1.1、是什么 为了搜索,你懂的 Elasticsearch 是一个基于Apache Lucene(TM) 的开源搜索引擎。无论在开 源还是专有领域,Lucene可以被认为是迄今为止最先进、性能最好的、功能最全的搜索引擎库。 但是,Lucene只是一个库。想要使用它,你必须使用Java来作为开发语言并将其直接 集成到你的应用中,更糟糕的是,Lucene非常复杂,你需要深入 了解检索的相关知识来理解它是如何工作的。 Elasticsearch 也使用Java开发并使用Lucene作为其核心来实现所有索引 和搜索的功能,但是它的目的是通过简单的RESTful API来隐藏Lucene的复杂 性,从而让全文搜索变得简单。 不过,Elasticsearch 不仅仅是Lucene和全文搜索,我们还能这样去描述它: 分布式的实时文件存储,每个字段都被索引并可被搜索 分布式的实时分析搜索引擎 可以扩展到上百台服务器,处理PB级结构化或非结构化数据

全文搜索引擎 Elasticsearch 入门教程

全文搜索引擎 Elasticsearch 入门教 程 全文搜索属于最常见的需求,开源的 Elasticsearch (以下简称 Elastic )是目前全文搜索引擎的首选。 它可以快速地储存、搜索和分析海量数据。维基百科、Stack Overflow 、Github 都采用它。 Elastic 的底层是开源库 Lucene 。但是,你没法直接用 Lucene ,必须自己写代码去调用它的接口。Elastic 是 Lucene 的封装,提供了 REST API 的操作接口,开箱即用。 本文从零开始,讲解如何使用 Elastic 搭建自己的全文搜索引擎。每一步都有详细的说明,大家跟着做就能学会。 一、安装 Elastic 需要 Java 8 环境。如果你的机器还没安装 Java ,可以参考这篇文章,注意要保证环境变量JAVA_HOME 正确设置。 安装完 Java ,就可以跟着官方文档安装 Elastic 。直接下载压缩包比较简单。 1 2 $ wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-

3 5.5.1.zip $ unzip elasticsearch-5.5.1.zip $ cd elasticsearch-5.5.1/ 接着,进入解压后的目录,运行下面的命令,启动 Elastic 。 1 $ ./bin/elasticsearch 如果这时报错“max virtual memory areas vm.max map count [65530] is too low”,要运行下面的命令。 1 $ sudosysctl -w vm.max_map_count=262144 如果一切正常,Elastic 就会在默认的9200端口运行。这时,打开另一个命令行窗口,请求该端口,会得到说明信息。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $ curl localhost:9200 { "name" : "atntrTf", "cluster_name" : "elasticsearch", "cluster_uuid" : "tf9250XhQ6ee4h7YI11anA", "version" : { "number" : "5.5.1", "build_hash" : "19c13d0", "build_date" : "2017-07-18T20:44:24.823Z", "build_snapshot" : false, "lucene_version" : "6.6.0" }, "tagline" : "You Know, for Search" }

相关主题
文本预览
相关文档 最新文档