CN108959294A - A kind of method and apparatus accessing search engine - Google Patents

A kind of method and apparatus accessing search engine Download PDF

Info

Publication number
CN108959294A
CN108959294A CN201710356898.XA CN201710356898A CN108959294A CN 108959294 A CN108959294 A CN 108959294A CN 201710356898 A CN201710356898 A CN 201710356898A CN 108959294 A CN108959294 A CN 108959294A
Authority
CN
China
Prior art keywords
search engine
operating parameter
return value
value
field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710356898.XA
Other languages
Chinese (zh)
Other versions
CN108959294B (en
Inventor
余欢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710356898.XA priority Critical patent/CN108959294B/en
Publication of CN108959294A publication Critical patent/CN108959294A/en
Application granted granted Critical
Publication of CN108959294B publication Critical patent/CN108959294B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the present invention provides a kind of method and apparatus for accessing search engine, is related to field of computer technology.One specific embodiment of this method includes: to be parsed using Java reflection to the operating parameter received, to obtain the corresponding annotating information of operating parameter;The value of the value of annotating information and the corresponding field of operating parameter is converted into the corresponding return value of operating parameter;It is accessed using return value to search engine.Which overcomes needing repetitive learning when new system accesses, and then reach the technical effect for reducing learning cost, is conducive to improve working efficiency.

Description

A kind of method and apparatus accessing search engine
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus for accessing search engine.
Background technique
With the development of internet, more and more websites appear in the visual field of people.Most of website all provides Retrieve according to screening conditions the function of information.Common solution is that, according to search condition, splicing constructionization inquires language Say that (Structured Query Language, SQL) sentence inquires database, to obtain corresponding record.
With the rapid development of business, data volume rapidly increases, and the response speed of data base querying is difficult to meet daily It needs, has seriously affected the experience of user.Prior art common practice is that database is carried out to lateral division, and the table in library is adopted With the mode cutting for dividing table or point library.However, after cutting, it is difficult to meet across table or inter-library inquiry.Distributed search engine Elasticsearch provides a set of perfect Java API (Application Programming Interface, application Program Interfaces), efficiently solve the problems, such as database extension after across table or inter-library inquiry.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
Since the SQL similarity and multiplicity of search engine Elasticsearch are higher, there is new system access When search engine Elasticsearch, require to learn relevant application programming interface API, to cause learning cost Increase.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus for accessing search engine, it is able to solve and is newly System access search engine when repetitive learning cause learning cost increase and efficiency reduce the problem of.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of side for accessing search engine is provided Method.
A kind of method for accessing search engine of the embodiment of the present invention includes: to be reflected using Java to the operating parameter received It is parsed, to obtain the corresponding annotating information of operating parameter;By the value of annotating information and the corresponding field of operating parameter Value is converted into the corresponding return value of operating parameter;It is accessed using return value to search engine.
Optionally, the embodiment of the present invention parses the operating parameter received using Java reflection, to obtain The corresponding annotating information of operating parameter, comprising: using the field of the Java reflection affiliated class of traversing operation parameter, to obtain field Annotating information.
Optionally, the embodiment of the present invention is before accessing to search engine using return value, further includes: confirmation is worked as Preceding operating environment;It is accessed using return value to search engine, comprising: according to return value, index address and IP address pair Search engine accesses.
Optionally, the embodiment of the present invention is before accessing to search engine using return value, further includes: confirmation is worked as Preceding operating environment;It is accessed using return value to search engine, comprising: according to return value, index address and client pair Search engine accesses.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of dress for accessing search engine is provided It sets.
A kind of device for accessing search engine of the embodiment of the present invention includes: parsing module, for utilizing Java reflection docking The operating parameter received is parsed, to obtain the corresponding annotating information of operating parameter;Conversion module, for by annotating information The value of value and the corresponding field of operating parameter is converted into the corresponding return value of operating parameter;Processing module, for utilizing return Value accesses to search engine.
Optionally, the parsing module of the embodiment of the present invention is specifically used for: reflecting the affiliated class of traversing operation parameter using Java Field, to obtain the annotating information of field.
Optionally, the embodiment of the invention also includes confirmation modules, for confirming current operation environment;Processing module is used for: It is accessed according to return value, index address and IP address to search engine.
Optionally, the embodiment of the invention also includes confirmation modules, for confirming current operation environment;Processing module is used for: It is accessed according to return value, index address and client to search engine.
To achieve the above object, according to an embodiment of the present invention in another aspect, provide it is a kind of access search engine side The electronic equipment of method.
The a kind of electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one Or multiple programs, when one or more of programs are executed by one or more of processors, so that one or more of The method that processor realizes the access search engine of the embodiment of the present invention.
To achieve the above object, another aspect according to an embodiment of the present invention, provides a kind of computer-readable medium.
A kind of computer-readable medium of the embodiment of the present invention, is stored thereon with computer program, and described program is processed The method of the access search engine of the embodiment of the present invention is realized when device executes.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that because using solving to operating parameter Analysis needs weight in new system access so overcoming to obtain the technological means of return value corresponding with search engine It goes back to school the technical issues of practising, and then reaches the technical effect for reducing cost, be conducive to provide working efficiency.Meanwhile passing through return Value accesses to search engine Elasticsearch, effectively reduces the multiplicity of code.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 2 is the schematic diagram of the main flow of the method for access search engine according to an embodiment of the present invention;
Fig. 3 is the flow diagram of the specific method of access search engine according to an embodiment of the present invention;
Fig. 4 is the flow diagram for carrying out splicing encapsulation to operating parameter according to embodiments of the present invention;
Fig. 5 is the schematic diagram of the main modular of the device of access search engine according to an embodiment of the present invention;
Fig. 6 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Just as described in the background of the present invention, in the prior art, each to need to access search engine Elasticsearch The developer of system requires the rudimentary knowledge for having the operation of Elasticsearch relevant rudimentary, needs to be provided according to it Application programming interface API, be spliced into the action statement that search engine Elasticsearch can be identified, so as to cause The problem of learning cost increases.The present invention parses operating parameter using Java reflection, determines and search engine The corresponding return value of Elasticsearch is to access, so, in new system access, so that it may reduce ergonomics The cost of habit, to improve working efficiency.
Fig. 1 is shown can be using the access search engine method of the embodiment of the present invention or showing for access search engine device Example property system architecture 100.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 101,102,103 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 105 can be to provide the server of various services, such as utilize terminal device 101,102,103 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter Breath -- merely illustrative) feed back to terminal device.
It should be noted that access search engine method provided by the embodiment of the present invention is generally executed by server 105, Correspondingly, access search engine device is generally positioned in server 105.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
Fig. 2 is the schematic diagram of the main flow of the method for access search engine according to an embodiment of the present invention.
As shown in Fig. 2, a kind of method of access search engine of the embodiment of the present invention mainly includes the following steps:
Step S201: parsing the operating parameter received using Java reflection, corresponding to obtain operating parameter Annotating information.Due to action type difference, operating parameter corresponding to action type is also different, by joining to operation Number parsed, and determine with annotating information corresponding to current operation type, specifically using Java reflection traversal behaviour The field for making the affiliated class of parameter obtains the annotating information of field, and the annotating information of the field is the annotating information of operating parameter.
In addition, in a particular embodiment, before being parsed using Java reflection to the operating parameter received, Can also judge whether operating parameter is empty;If not empty, operating parameter is parsed.Mainly to efficient operation parameter It is screened.
Step S202: it is corresponding that the value of the value of annotating information and the corresponding field of operating parameter is converted into operating parameter Return value.In step s 201, it has been determined that the annotating information of operating parameter (annotating information is all corresponding a value, that is, Say, while having obtained the value of annotating information), then by the value of the value of annotating information and the corresponding field of operating parameter by turning It changes, is converted into the return value that search engine can identify, subsequent can be accessed using the return value is operated.
Step S203: it is accessed using return value to search engine.Search can be drawn by the return value of confirmation Hold up to access and operate, but in some implement scenes, it is necessary first to confirm current usage scenario, then again more when Access mode corresponding to preceding usage scenario accesses to search engine, and specific access mode is divided into following two situation:
Situation one, if HTTP method of calling, then can according to return value, index address and IP address to search engine into Row access;
Situation two, if Java API Calls mode, then search can be drawn according to return value, index address and client It holds up and accesses.
Above-mentioned two situations are and to have respective advantage and disadvantage according to determined by different usage scenarios, specific to select Select which kind of situation accesses needs depending on usage scenario.
Fig. 3 is the flow diagram of the specific method of access search engine according to an embodiment of the present invention.
There is Fig. 3 to can be seen that the present invention when a new system accesses Elasticsearch, provides operation for the system The basic function of Elasticsearch, including mapping mapping, increase, delete, changing, looking into function, therefore, reducing developer's The multiplicity of learning cost and code.
Specific operating process is as follows:
1, the note class for defining different meanings (is explained class to be included in subsequent java class, be obtained by carrying out parsing to class Obtain with the character explained), it is distinguished according to function, is divided into the mapping note for generating mapping, the note etc. of inquiry.It is right In special inquiry, such as period, it is also necessary to explain the generic attribute for configuring corresponding conjunctive query.Inquiry is not equal to The value of certain field or certain field are not present, and require to provide corresponding note.
2, method enters ginseng:
A) for different Elasticsearch action types, need an incoming field for distinguishing action type. (being divided into two kinds, the first is directly to delete, and second is to increase to change to look into wound), certain operation (second) types needed to utilize reflection Java class is parsed, the field in ergodic classes is explained, and according to different functions, is parsed to ginseng is entered, and (correspondence is subsequent for automatic Mosaic Encapsulation process) good Elasticsearch action statement.
B) java class for needing to parse, type Object.
C) two kinds of method of calling of Elasticsearch, the primary API and HTTP mode of Java are directed to.It also needs to be passed to The relevant parameter of Elasticsearch.HTTP only needs to be passed to (inde6&type), and the primary API of Java also needs to be passed to The client Client of Elasticsearch.The resolving of both method of calling bottoms is similar.
It needs to explain name involved in the present invention:
1, Elasticsearch: being the search server based on Lucene.It provides a distributed multi-user The full-text search engine of ability.
2, Inde6&Type: for Elasticsearch, inde6 is equivalent to the library in database, and type then phase When the table in database.
3, it explains: being called and do metadata, a kind of other explanation of code level.
4, Java reflects: access, detection, a kind of ability for modifying java class state or behavior.
5, Class class: one kind of class in Java, the type information comprising created class.
6, defined class in 6ContentBuilder&QueryBuilder:Elasticsearch API.
7, terms is inquired: the multiple values of certain field meet one of them.
8, term is inquired: accurate matching certain field is equal to designated value.
9, range is inquired: inquiry in range.
Further, steps are as follows for Java API execution:
1, according to different action types, corresponding method is called to execute subsequent operation.
2, simple non-empty verifying is executed.For example the operation of mapping is generated, it can be passed to an empty object, because only Need the information of related Class class.Remaining action type increases newly, modifies, and deletes, not only needs object non-empty, it is also necessary to identify The id non-empty of major key.
3, different annotating informations is parsed using reflection according to different action types.Convert thereof into action type institute The return value needed.Such as mapping is generated, return to a 6ContentBuilder object.And multi-condition inquiry, then return to one A QueryBuilder object.Newly-increased, modification deletes and supports batch operation, is all return BulkRequestBuilder, wherein Increased in newly-increased BulkRequestBuilder is Inde6Request, and modifying increased is UpdateRequest, deletes and increases That add is DeleteRequest.(when newly-increased json string field and HttpClient with modification generation filling Request calls It can share)
4, corresponding api is called, operation is executed.
And Http executes step and Java API mode is substantially similar, but have some differences:
1. inquiry: it only needs to receive the return value in Java api mode step 2, changes into string format, in conjunction with Calling can be completed in HttpClient client.
2. newly-increased, modification, is deleted, it is only necessary to during parsing, be spliced into character string, finally combine HttpClient client complete call.
It should be noted that the present invention is during parsing, it is also necessary to the field after parsing is packaged (namely spell It connects).
Fig. 4 is the flow diagram for carrying out splicing encapsulation to operating parameter according to embodiments of the present invention, the envelope specifically inquired Dress process includes the following steps:
1) note for inquiring field defined in the first step at this stage includes following field
Name (is mapped to the field name in es, directly take field name in class for sky)
CpFieldName (matches the title of another field in class when inquiring, is generally used for period inquiry, agreement Configure the attribute field in initial time)
Missing (whether identification field inquires the field value as sky)
NotEqual (whether identification field inquires the field value not equal to incoming object field value)
2) using reflection, all fields of the incoming affiliated class of object is traversed, the note class of inquiry is judged whether there is.If there is It explains, then parses the value of each field in explaining.QueryBuilder needed for splicing inquiry.
In addition, newly-increased, modification process is fairly simple, subregion field situation is not needed, it is only necessary to obtain word according to explaining Section analog value is filled.Newly-increased, the note of modification includes that field is as follows:
IfSet (value for whether needing to be arranged this field)
Name (is mapped to the field name in es, directly take field name in class for sky)
SetNull (in the case where this field is arranged, whether null value is also provided with)
Using reflection, the value of respective field in explaining is obtained, the character string of required json format is finally spliced into, for Subsequent operation.
The process of deletion is most simple, it is only necessary to which subsequent operation can be completed in the id of deletion.
The method of access search engine according to an embodiment of the present invention can be seen that because using solving to operating parameter Analysis needs weight in new system access so overcoming to obtain the technological means of return value corresponding with search engine It goes back to school the technical issues of practising, and then reaches the technical effect for reducing cost, be conducive to provide working efficiency.Meanwhile passing through return Value accesses to search engine Elasticsearch, effectively reduces the multiplicity of code.
Fig. 5 is the schematic diagram of the main modular of the device of access search engine according to an embodiment of the present invention.
As shown in figure 5, the device 500 of the access search engine of the embodiment of the present invention specifically includes that
Parsing module 501, conversion module 502 and processing module 503. be wherein:
Parsing module 501, for being parsed using Java reflection to the operating parameter received, to obtain operating parameter Corresponding annotating information;Conversion module 502, for the value of the value of annotating information and the corresponding field of operating parameter to be converted into The corresponding return value of operating parameter;Processing module 503, for being accessed using return value to search engine.
Optionally, the parsing module 501 of the embodiment of the present invention is specifically used for: using belonging to Java reflection traversing operation parameter The field of class, to obtain the annotating information of field.
Optionally, the embodiment of the invention also includes confirmation modules 504, for confirming current operation environment;Processing module 503 For: it is accessed according to return value, index address and IP address to search engine.
Optionally, the embodiment of the invention also includes confirmation modules 504, for confirming current operation environment;Processing module 503 For: it is accessed according to return value, index address and client to search engine.
From the above, it can be seen that because using being parsed to operating parameter, to obtain opposite with search engine The technological means for the return value answered so overcoming the technical issues of needing repetitive learning in new system access, and then reaches The technical effect for reducing cost, is conducive to provide working efficiency.Meanwhile by return value to search engine Elasticsearch It accesses, effectively reduces the multiplicity of code.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the terminal device for being suitable for being used to realize the embodiment of the present invention Structural schematic diagram.Terminal device shown in Fig. 6 is only an example, function to the embodiment of the present invention and should not use model Shroud carrys out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 609, and/or from can Medium 611 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 601, system of the invention is executed The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include parsing module, module processing module.Wherein, the title of these units is not constituted under certain conditions to the unit sheet The restriction of body.
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes: to be parsed using Java reflection to the operating parameter received, to obtain the corresponding note of operating parameter Information;The value of the value of annotating information and the corresponding field of operating parameter is converted into the corresponding return value of operating parameter;It utilizes Return value accesses to search engine.
Technical solution according to an embodiment of the present invention, because being parsed using to operating parameter, to obtain and search for The technological means of the corresponding return value of engine, so the technical issues of needing repetitive learning in new system access is overcome, And then reach the technical effect for reducing cost, it is conducive to provide working efficiency.Meanwhile by return value to search engine Elasticsearch accesses, and effectively reduces the multiplicity of code.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (10)

1. a kind of method for accessing search engine characterized by comprising
The operating parameter received is parsed using Java reflection, to obtain the corresponding annotating information of the operating parameter;
It is corresponding that the value of the value of the annotating information and the corresponding field of the operating parameter is converted into the operating parameter Return value;
It is accessed using the return value to search engine.
2. the method according to claim 1, wherein being solved using Java reflection to the operating parameter received Analysis, to obtain the corresponding annotating information of the operating parameter, comprising:
The field of the affiliated class of operating parameter is traversed, using Java reflection to obtain the annotating information of the field.
3. the method according to claim 1, wherein
Before the utilization return value accesses to search engine, further includes:
Confirm current operation environment;
It is accessed using the return value to search engine, comprising:
It is accessed according to the return value, index address and IP address to described search engine.
4. the method according to claim 1, wherein
Before the utilization return value accesses to search engine, further includes:
Confirm current operation environment;
It is accessed using the return value to search engine, comprising:
It is accessed according to the return value, index address and client to described search engine.
5. a kind of device for accessing search engine characterized by comprising
Parsing module, for being parsed using Java reflection to the operating parameter received, to obtain the operating parameter pair The annotating information answered;
Conversion module, for the value of the value of the annotating information and the corresponding field of the operating parameter to be converted into the behaviour Make the corresponding return value of parameter;
Processing module, for being accessed using the return value to search engine.
6. device according to claim 5, which is characterized in that the parsing module is specifically used for:
The field of the affiliated class of operating parameter is traversed, using Java reflection to obtain the annotating information of the field.
7. device according to claim 5, which is characterized in that
It further include confirmation module, for confirming current operation environment;
The processing module is used for:
It is accessed according to the return value, index address and IP address to described search engine.
8. device according to claim 5, which is characterized in that
It further include confirmation module, for confirming current operation environment;
The processing module is used for:
It is accessed according to the return value, index address and client to described search engine.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-4 is realized when row.
CN201710356898.XA 2017-05-19 2017-05-19 Method and device for accessing search engine Active CN108959294B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710356898.XA CN108959294B (en) 2017-05-19 2017-05-19 Method and device for accessing search engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710356898.XA CN108959294B (en) 2017-05-19 2017-05-19 Method and device for accessing search engine

Publications (2)

Publication Number Publication Date
CN108959294A true CN108959294A (en) 2018-12-07
CN108959294B CN108959294B (en) 2021-07-13

Family

ID=64462903

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710356898.XA Active CN108959294B (en) 2017-05-19 2017-05-19 Method and device for accessing search engine

Country Status (1)

Country Link
CN (1) CN108959294B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111203A (en) * 2019-05-05 2019-08-09 北京阿尔山金融科技有限公司 Batch process, device and the electronic equipment of business datum
CN113765913A (en) * 2021-09-02 2021-12-07 云宏信息科技股份有限公司 Method for configuring access to blacklist by Tomcat server, storage medium and Tomcat server
CN115033312A (en) * 2022-08-09 2022-09-09 中化现代农业有限公司 ElasticSearch data operation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052308A1 (en) * 2006-08-22 2008-02-28 Huawei Technologies Co., Ltd. Method and system for realizing automatic adaptation of data object model
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN101593127A (en) * 2008-05-27 2009-12-02 商埃曲网络软件(上海)有限公司 A kind of cross-platform Jave virtual machine of Digital Television middleware system
CN106202207A (en) * 2016-06-28 2016-12-07 中国电子科技集团公司第二十八研究所 A kind of index based on HBase ORM and searching system
CN106598573A (en) * 2016-11-11 2017-04-26 武汉斗鱼网络科技有限公司 Method and device for simplifying application program language

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080052308A1 (en) * 2006-08-22 2008-02-28 Huawei Technologies Co., Ltd. Method and system for realizing automatic adaptation of data object model
CN101593127A (en) * 2008-05-27 2009-12-02 商埃曲网络软件(上海)有限公司 A kind of cross-platform Jave virtual machine of Digital Television middleware system
CN101334728A (en) * 2008-07-28 2008-12-31 北京航空航天大学 Interface creating method and platform based on XML document description
CN106202207A (en) * 2016-06-28 2016-12-07 中国电子科技集团公司第二十八研究所 A kind of index based on HBase ORM and searching system
CN106598573A (en) * 2016-11-11 2017-04-26 武汉斗鱼网络科技有限公司 Method and device for simplifying application program language

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111203A (en) * 2019-05-05 2019-08-09 北京阿尔山金融科技有限公司 Batch process, device and the electronic equipment of business datum
CN113765913A (en) * 2021-09-02 2021-12-07 云宏信息科技股份有限公司 Method for configuring access to blacklist by Tomcat server, storage medium and Tomcat server
CN115033312A (en) * 2022-08-09 2022-09-09 中化现代农业有限公司 ElasticSearch data operation method and device
CN115033312B (en) * 2022-08-09 2022-12-27 中化现代农业有限公司 ElasticSearch data operation method and device

Also Published As

Publication number Publication date
CN108959294B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
US10942708B2 (en) Generating web API specification from online documentation
CN109634598A (en) A kind of page display method, device, equipment and storage medium
CN111177231A (en) Report generation method and report generation device
CN109062563B (en) Method and device for generating page
CN109683998A (en) Internationalize implementation method, device and system
CN110472207A (en) List generation method and device
CN107844324A (en) Customer terminal webpage redirects treating method and apparatus
CN109947788A (en) Data query method and apparatus
CN108804327A (en) A kind of method and apparatus of automatic Data Generation Test
CN109981322A (en) The method and apparatus of cloud resource management based on label
CN109388654A (en) A kind of method and apparatus for inquiring tables of data
CN110109979A (en) A kind of allocation list radio button method and apparatus
CN110471848A (en) A kind of method and apparatus of dynamic returned packet
CN109981719A (en) Information processing method and its system, computer system and computer readable medium
CN109241033A (en) The method and apparatus for creating real-time data warehouse
CN108958744A (en) Dispositions method, device, medium and the electronic equipment of big data distributed type assemblies
CN110019437A (en) A kind of method and system exporting data
CN113626223A (en) Interface calling method and device
CN108959294A (en) A kind of method and apparatus accessing search engine
CN110109983A (en) A kind of method and apparatus operating Redis database
CN110489158A (en) Method, apparatus, medium and the electronic equipment that code hosted platform is optimized
CN108845864A (en) A kind of JVM rubbish recovering method and device based on spring frame
CN109375910A (en) Class file generation method, device, electronic equipment and storage medium
CN110110153A (en) A kind of method and apparatus of node searching
CN113760961A (en) Data query method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant