CN110221971A - The test method and device of search engine, electronic equipment, storage medium - Google Patents

The test method and device of search engine, electronic equipment, storage medium Download PDF

Info

Publication number
CN110221971A
CN110221971A CN201910423648.2A CN201910423648A CN110221971A CN 110221971 A CN110221971 A CN 110221971A CN 201910423648 A CN201910423648 A CN 201910423648A CN 110221971 A CN110221971 A CN 110221971A
Authority
CN
China
Prior art keywords
index
record
search engine
data record
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
CN201910423648.2A
Other languages
Chinese (zh)
Other versions
CN110221971B (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.)
Word Of Mouth (beijing) Network Technology Co Ltd
Original Assignee
Word Of Mouth (beijing) Network 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 Word Of Mouth (beijing) Network Technology Co Ltd filed Critical Word Of Mouth (beijing) Network Technology Co Ltd
Priority to CN201910423648.2A priority Critical patent/CN110221971B/en
Publication of CN110221971A publication Critical patent/CN110221971A/en
Application granted granted Critical
Publication of CN110221971B publication Critical patent/CN110221971B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This specification one or more embodiment provides the test method and device, electronic equipment, storage medium of a kind of search engine;This method may include: that at least one data record is chosen from the index data base of search engine, and the index field that selected data record includes covers all fields to be tested of the index data base record;The record identification of selected data record is inputted into described search engine with the value of each index field respectively, to be directed to the index logic of each index field according to output result test described search engine;When the index logic for all index fields that described search engine includes for selected data record is correct, determine that described search engine passes through test.

Description

The test method and device of search engine, electronic equipment, storage medium
Technical field
This specification one or more embodiment is related to search engine technique field more particularly to a kind of survey of search engine Method for testing and device, electronic equipment, storage medium.
Background technique
Search engine be it is a kind of the inquiry instruction of user can be received by network, and provide a user and meet its inquiry and want The system for the information resources asked.Search engine grabs data from internet, and is analyzed the data grabbed to extract Relevant information establishes index data base.For example, grabbing web data by internet, and extract the relevant information (net of webpage Keyword, keyword position, generation time, size and other webpages that URL, type of coding, content of pages where page include The relevant informations such as linking relationship), recycle these relevant informations to establish index data base.When the inquiry instruction for receiving user When, search engine searches for the webpage for meeting query requirement from index data base and returns to the chained address of search result to user With content of pages abstract etc. information.
Summary of the invention
In view of this, this specification one or more embodiment provides the test method and device, electricity of a kind of search engine Sub- equipment, storage medium.
To achieve the above object, it is as follows to provide technical solution for this specification one or more embodiment:
According to this specification one or more embodiment in a first aspect, propose a kind of test method of search engine, Include:
At least one data record, the rope that selected data record includes are chosen from the index data base of search engine Draw all fields to be tested that field covers the index data base record;
The record identification of selected data record is inputted into described search engine with the value of each index field respectively, with The index logic of each index field is directed to according to output result test described search engine;
When the index logic for all index fields that described search engine includes for selected data record is correct, Determine that described search engine passes through test.
Optionally, at least one data record is chosen in the index data base from search engine, comprising:
When being added index field in the index data base, at least one data are chosen from the index data base Record;Wherein, the field to be tested is all index fields that the index data base records after being added index field.
Optionally, at least one data record is chosen in the index data base from search engine, comprising:
Data record, the index field covering that the data record includes are chosen from the index data base All fields to be tested of the index data base record;
Alternatively, choosing a plurality of data record from the index data base, pieces of data is remembered in a plurality of data record The index field that record includes is covered each by the part field to be tested of the index data base record, and a plurality of data record All index fields for including cover all fields to be tested of the index data base.
Optionally, described to be searched described in the record identification of selected data record and the input of the value of each index field Index is held up, comprising:
After having chosen data record, the record identification is inputted with the value of each index field respectively without delay Described search engine.
Optionally, the record identification by selected data record is respectively and described in the input of the value of each index field Search engine, to be directed to the index logic of each index field according to output result test described search engine, comprising:
The correct value for each index field for including with selected data record respectively by the record identification inputs institute State search engine, with obtain corresponding to each index field first output as a result, and by the record identification respectively with it is selected The wrong value for each index field for taking data record to include inputs described search engine, to obtain corresponding to each index field Second output result;
When the first output result for corresponding to any index field that selected data record includes is to search respective counts It is to determine that described search engine is directed to any index when not searching respective data record according to record and the second output result The index logic of field is correct.
Optionally, selected data record includes a plurality of data record, the index field point that pieces of data record includes The part field to be tested of the index data base is not covered;The record identification by selected data record respectively with it is each The value of index field inputs described search engine, comprising:
For each data record in a plurality of data record, unselected mistake in included index field is selected Index field;
Corresponding record identification is inputted into described search engine with the value of each index field selected respectively.
Optionally, described when described search engine is patrolled for the index for all index fields that selected data record includes When collecting correct, determine that described search engine passes through test, comprising:
The correct index field of the index logic tested is added in default statistics array;
When the index field for including in the statistics array is identical as all fields to be tested, judgement described search engine Pass through test.
According to the second aspect of this specification one or more embodiment, a kind of test device of search engine is proposed, Include:
Selection unit chooses at least one data record, selected data note from the index data base of search engine The index field that record includes covers all fields to be tested of the index data base record;
Input unit searches the record identification of selected data record with described in the input of the value of each index field respectively Index is held up, to be directed to the index logic of each index field according to output result test described search engine;
Judging unit, when the index logic for all index fields that described search engine includes for selected data record When correct, determine that described search engine passes through test.
Optionally, the selection unit is specifically used for:
When being added index field in the index data base, at least one data are chosen from the index data base Record;Wherein, the field to be tested is all index fields that the index data base records after being added index field.
Optionally, the selection unit is specifically used for:
Data record, the index field covering that the data record includes are chosen from the index data base All fields to be tested of the index data base record;
Alternatively, choosing a plurality of data record from the index data base, pieces of data is remembered in a plurality of data record The index field that record includes is covered each by the part field to be tested of the index data base record, and a plurality of data record All index fields for including cover all fields to be tested of the index data base.
Optionally, the input unit is specifically used for:
After having chosen data record, the record identification is inputted with the value of each index field respectively without delay Described search engine.
Optionally, the input unit is specifically used for:
The correct value for each index field for including with selected data record respectively by the record identification inputs institute State search engine with obtain corresponding to each index field first output as a result, and by the record identification respectively with it is selected The wrong value input described search engine for each index field that data record includes is to obtain corresponding to each index field Second output result;
When the first output result for corresponding to any index field that selected data record includes is to search respective counts It is to determine that described search engine is directed to any index when not searching respective data record according to record and the second output result The index logic of field is correct.
Optionally, selected data record includes a plurality of data record, the index field point that pieces of data record includes The part field to be tested of the index data base is not covered;The input unit is specifically used for:
For each data record in a plurality of data record, unselected mistake in included index field is selected Index field;
Corresponding record identification is inputted into described search engine with the value of each index field selected respectively.
Optionally, the judging unit is specifically used for:
The correct index field of the index logic tested is added in default statistics array;
When the index field for including in the statistics array is identical as all fields to be tested, judgement described search engine Pass through test.
According to the third aspect of this specification one or more embodiment, a kind of electronic equipment is proposed, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is searched as described in above-mentioned any embodiment by running the executable instruction with realizing Index the test method held up.
According to the fourth aspect of this specification one or more embodiment, a kind of computer readable storage medium is provided, On be stored with computer instruction, the survey such as any described search engine in above-described embodiment is realized when which is executed by processor The step of method for testing.
By above technical scheme as it can be seen that the application is owned based on the covering selected from the index data base of search engine The data record of field to be tested can test out only by the specific value of each index field in selected data record Whether search engine is correct for the index logic of field to be tested, without maintenance personnel's manual test, without basis All data record is tested in index data base, and then improves testing efficiency.Further, by drawing in search When being added index field in the index data base held up, test search engine is directed to the index data base after being added index field Whether the index logic of all index fields of record is correct, it may be determined that whether goes out search engine because of index data base more new data And mistake occurs, to guarantee the normal operation of search engine.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the test method for search engine that an exemplary embodiment provides.
Fig. 2 is the flow chart of the test method for another search engine that an exemplary embodiment provides.
Fig. 3 is the structural schematic diagram for a kind of electronic equipment that an exemplary embodiment provides.
Fig. 4 is a kind of block diagram of the test device for search engine that an exemplary embodiment provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with this specification one or more embodiment.Phase Instead, they are only some aspects phases with the one or more embodiments of as detailed in the attached claim, this specification The example of consistent device and method.
It should be understood that the sequence that might not show and describe according to this specification in other embodiments executes The step of correlation method.In some other embodiments, step included by method can than described in this specification more It is more or less.In addition, single step described in this specification, may be broken down into other embodiments multiple steps into Row description;And multiple steps described in this specification, it may also be merged into single step progress in other embodiments Description.
Referring to Figure 1, Fig. 1 is a kind of flow chart of the test method for search engine that an exemplary embodiment provides.Such as Shown in Fig. 1, this method is applied to the test equipment for search engine, may comprise steps of:
Step 102, at least one data record, selected data record are chosen from the index data base of search engine The index field for including covers all fields to be tested of the index data base record.
It in the present embodiment, include a plurality of data record in the index data base of search engine, pieces of data record includes Several fields, by the way that data record and respective field are established index relative (i.e. the index field of data record), subsequent searches Engine can respond the inquiry request of user (comprising query requirement, such as inquiry target packet based on the index relative established The keyword contained), it inquires and returns to the data record for meeting query requirement.Wherein, " covering " in step 102 can be regarded as: All index fields that selected data record includes are identical as all fields to be tested of index data base record.
In the present embodiment, when search engine increases a part of index field newly (for example, maintenance personnel is in index data base It is middle to add other index fields for being different from existing index field), the index logic of each index field may change.Cause This, the index logic for all index fields that need to be recorded after being added index field to index data base is tested (following Referred to as regression test), to determine whether search engine because of index data base more new data occurs mistake, to guarantee to search for Engine can normally provide a user search service.In other words, for obtaining data record in step 102 the step of, can index When being added index field in database, at least one data record is chosen from the index data base.Wherein, in the situation Under, field to be tested is all index fields that index data base records after being added index field.
In the present embodiment, due to needing the index logic of fields to be tested all to index data base to test, institute The index field that the data record of selection includes should cover all fields to be tested.For example, all index fields of search engine For F0, F1, F2;So when carrying out regression test to the search engine, at least one selected data record should include rope Draw field F0, F1, F2.
In one case, data record can be chosen from index data base, which records the rope for including Draw all fields to be tested of field covering index data base record.For example, it is undertaken in the example above, it can be from the rope of search engine Draw and only choose data record in database, data record includes index field F0, F1, F2.Such as: data record A, record identification id=id1, F0=f0, F1=f1, F2=f2;Wherein, record identification id can be data and be recorded in index number According to the location information (for example, parameter value of row and column) in library.
In another case, a plurality of data record can be chosen from index data base, each item in a plurality of data record The index field that data record includes is covered each by part field to be tested, and all index words that a plurality of data record includes All fields to be tested of section covering index data base.For example, it is undertaken in the example above, it can be from the index data base of search engine It is middle to choose following data record: data record b, id=id2, F0=f0 respectively;Data record c, id=id3, F1=f1, F2= f2.For another example, following data record: data record d, id=id4, F0 can be also chosen respectively from the index data base of search engine =f0;Data record e, id=id5, F1=f1;Data record f, id=id6, F2=f2.It for another example, can also be from search engine Following data record: data record g, id=id7, F0=f0, F1=f1 is chosen in index data base respectively;Data record h, id =id8, F1=f1.1, F2=f2.Certainly, when choosing a plurality of data record, the quantity of specific selected data record can be by Maintenance personnel flexibly sets according to the actual situation, and this specification one or more embodiment is limited not to this.
Step 104, the record identification of selected data record is searched with described in the input of the value of each index field respectively Index is held up, to be directed to the index logic of each index field according to output result test described search engine.
In the present embodiment, it is understood that there may be test data (the i.e. selected data record for test) is unstable to ask Topic.For example, the data record a, id1 (F0=f0, F1=f1, F2=f2) that choose, at a certain moment after being selected, are directed to There is data record a the user of editing authority to be revised as F0=f0, F1=f1;Alternatively, data record a is by user deletion etc.. Therefore, after having chosen data record, record identification can be inputted with the value of each index field without delay respectively and searched for Engine, to reduce the changed probability of selected data record, improves the accuracy of test to be tested.
In the present embodiment, when being directed to the index logic of each index field according to output result test search engine, For in selected data record every data record, can by the record identification of the data record respectively with the data record The correct value for each index field for including inputs search engine, to obtain the first output knot corresponding to each index field Fruit, and the wrong value input of each index field for including with the data record respectively by the record identification of the data record Search engine, to obtain the second output result corresponding to each index field.It is selected when corresponding to based on above-mentioned input mode First output result of any index field that data record includes is to search respective data record, and the second output result is When not searching respective data record, determine that search engine is correct for the index logic of any index field.
For example, it is assumed that all index fields that search engine includes are F0, F1, F2;Selected data record point It Wei not data record a, id=id1, F0=f0, F1=f1;Data record b, id=id2, F2=f2.So, with data record a For, when the first output result corresponding to index field F0 is that id=id1&F0=f0 inquires data record a, and second is defeated Result is that id=id1&F0=f0_1 (f0_1 indicates other numerical value for being arbitrarily different from correct value f0) does not inquire data out When recording a, illustrate that search engine is correct for the index logic of index field F0;When the first output corresponding to index field F1 As a result data record a is inquired for id=id1&F1=f1, and the second output result is that (f1_1 is indicated id=id1&F1=f1_1 Arbitrarily it is different from other numerical value of correct value f1) when not inquiring data record a, illustrate search engine for index field F1 Index logic it is correct.Similar, when the first output result corresponding to index field F2 inquires for id=id2&F2=f2 Data record b, and the second output result is that (f2_1 expression is arbitrarily different from other of correct value f2 to id=id2&F2=f2_1 Numerical value) when not inquiring data record b, illustrate that search engine is correct for the index logic of index field F2.Wherein, work as search When engine is correct for the index logic of index field F0, F1, F2, it can determine that search engine passes through test.
In the present embodiment, the case where including a plurality of data record for above-mentioned selected data record, a plurality of number According to may (such as data record g and data record h in the example above be wrapped comprising repeating identical index field in record Containing index field F1), and in test, by the identical index field of the repetition in any data record, can survey Whether the index logic for trying out search engine for the index field is correct.Therefore, rope is being tested based on a plurality of data record When drawing the index logic of field, included index field can be selected for each data record in a plurality of data record In unselected mistake index field, then corresponding record identification is inputted with the value of each index field that selects respectively Search engine.By the mechanism of above-mentioned " only choosing primary ", can avoid in selected a plurality of data record comprising repeating phase With index field when, repeatedly the identical index field of the repetition is tested, so that testing efficiency can be improved.For example, holding It is connected to the example above, data record g can be based only upon to test the index logic that search engine is directed to index field F1, or only base In data record h come test search engine be directed to index field F1 index logic.
Step 106, the index logic for all index fields for including for selected data record when described search engine When correct, determine that described search engine passes through test.
In the present embodiment, the statistics array index field logically true for statistical index can be pre-configured with.Further , when testing index logic of the search engine for each index field, the index logic tested can correctly be indexed Field is added in the statistics array.When the index field for including in the statistics array is identical as all fields to be tested, can sentence Determine search engine and passes through test.
By above technical scheme as it can be seen that the application is owned based on the covering selected from the index data base of search engine The data record of field to be tested can test out only by the specific value of each index field in selected data record Whether search engine is correct for the index logic of field to be tested, without maintenance personnel's manual test, without basis All data record is tested in index data base, and then improves testing efficiency.Further, by drawing in search When being added index field in the index data base held up, test search engine is directed to the index data base after being added index field Whether the index logic of all index fields of record is correct, it may be determined that whether goes out search engine because of index data base more new data And mistake occurs, to guarantee the normal operation of search engine.
In order to make it easy to understand, being carried out with reference to the accompanying drawing with testing scheme of the concrete scene to the search engine of this specification It is described in detail.
Fig. 2 is referred to, Fig. 2 is the flow chart of the test method for another search engine that an exemplary embodiment provides. As shown in Fig. 2, this method is applied to the test equipment for search engine, may comprise steps of:
Step 202, n data record is chosen from the index data base of search engine.
In the present embodiment, it is illustrated for carrying out regression test to search engine.It can be from the index of search engine N data record is chosen in database, and (value of n can flexibly be set according to the actual situation by maintenance personnel;For example, can be by n's Value is set as being positively correlated with the quantity for all index fields for including in index data base), n data record is included All index fields of the union covering search engine of index field.
The rule for choosing data record can be configured according to the characteristics of index data base.For example, it is assumed that search engine All index fields be F0, F1, F2, F3, and the characteristics of index data base of the search engine, is as follows: as F0=f1, F0 With F1 non-empty;As F0=f2, F2 and F3 non-empty.Based on These characteristics, settable following selection rule: F0=f1%01f2 (%01 meaning: or);The meaning of the selection rule is that the data record of F0=f1 or F0=f2 is chosen from search engine).It can See, batch of data record, the non-empty index word of these data records can be selected from search engine by the selection rule The set of section can cover all index fields of the search engine.
Step 204, the index field of the i-th data of test record (i initial value is 1).
In the present embodiment, after having chosen data record, testing process (step 204- step can be started without delay 210 cyclic process), to reduce the changed probability of selected data record, improve the accuracy of test.
Step 206, the index field set S2 of statistical test passes through index field set S1 and test crash.
Step 208, i=i+1.
Step 210, if i≤n, return step 204;Otherwise, it is transferred to step 212.
Step 212, if S1=S0, it is transferred to step 214;Otherwise, it is transferred to step 216.
For example, it is assumed that all index fields of search engine E0 are F0, F1, F2, F3 (set of all index fields For S0).After starting test, the background program of test equipment passes through above-mentioned selection rule " F0=f1%01f2 " from search engine Index data base in the 3 datas record that selects it is as shown in table 1:
Data record Record identification The index field for including
Data record a Id=id0 F0=f0, F1=f1, F2 and F3 are sky
Data record b Id=id1 F1 and F2 non-empty (F2=f2), index field F0 and F3 are sky
Data record c Id=id2 F3=f3, F0, F1, F2 are sky
Table 1
Test data records a, b, c:id=id0 to background program one by one, and the index logic of test indices field F0 and F1 are It is no correct;(index logic of index field F1 is based on the F1 test in data record a by id=id1, test indices field F2 Cross) index logic it is whether correct;Whether id=id2, the index logic for testing F3 are correct.
Wherein, when test data records a, specific test process are as follows: if id=id0&F0=f0 inquires data note A is recorded, and id=id0&F0=f0_1 (f0_1 indicates other numerical value for being arbitrarily different from correct value f0) does not inquire data note A is recorded, then determines that search engine is correct (otherwise, it is determined that search engine is directed to index field for the index logic of index field F0 The index logic mistake of F0);If id=id0&F1=f1 inquires data record a, and (f1_1 is indicated id=id0&F1=f1_1 Arbitrarily it is different from other numerical value of correct value f1) do not inquire data record a, then determine search engine for index field F1 Index logic it is correct (otherwise, it is determined that index logic mistake that search engine is directed to index field F0).Similar, in test number When according to record b, specific test process are as follows: if id=id1&F2=f2 inquires data record b, and id=id1&F2=f2_1 (f2_1 indicates other numerical value for being arbitrarily different from correct value f2) does not inquire data record b, then determines that search engine is directed to The index logic of index field F2 is correct;Otherwise, it is determined that search engine is directed to the index logic mistake of index field F2.It is similar , when test data records c, specific test process are as follows: if id=id2&F3=f3 inquires data record c, and id= Id2&F3=f3_1 (f3_1 indicates other numerical value for being arbitrarily different from correct value f3) does not inquire data record c, then determines Search engine is correct for the index logic of index field F3;Otherwise, it is determined that search engine is patrolled for the index of index field F3 Collect mistake.During the test, the correct index field of index logic (testing the index field passed through) is added to set S1, and the index field (i.e. the index field of test crash) of index logic mistake is added to set S2.
Step 214, discriminating test passes through.
Step 216, discriminating test does not pass through, and returns to unsuccessfully set S2.
It is undertaken in the example above, when index field set S1 is consistent with all index field set S0 of search engine E0 When, it can determine that test passes through;And when index field set S1 is consistent with all index field set S0 of search engine E0, it can Discriminating test does not pass through, and returns to the index field set S2 of test crash for maintenance personnel's reference.
By above technical scheme as it can be seen that the application is owned based on the covering selected from the index data base of search engine The data record of field to be tested can test out only by the specific value of each index field in selected data record Whether search engine is correct for the index logic of field to be tested, without maintenance personnel's manual test, without basis All data record is tested in index data base, and then improves testing efficiency.Further, by drawing in search When being added index field in the index data base held up, test search engine is directed to the index data base after being added index field Whether the index logic of all index fields of record is correct, it may be determined that whether goes out search engine because of index data base more new data And mistake occurs, to guarantee the normal operation of search engine.
Fig. 3 is the structural schematic diagram for a kind of electronic equipment that an exemplary embodiment provides.Referring to FIG. 3, in hardware layer Face, the equipment include processor 302, internal bus 304, network interface 306, memory 308 and nonvolatile memory 310, Certainly it is also possible that hardware required for other business.Processor 302 reads corresponding meter from nonvolatile memory 310 Then calculation machine program is run into memory 308, the test device of search engine is formed on logic level.Certainly, in addition to software Except implementation, this specification one or more embodiment is not precluded other implementations, such as logical device or soft Mode of combination of hardware etc., that is to say, that the executing subject of following process flow is not limited to each logic unit, can also To be hardware or logical device.
Referring to FIG. 4, in Software Implementation, the test device of the search engine may include:
Selection unit 41 chooses at least one data record, selected data from the index data base of search engine The index field that record includes covers all fields to be tested of the index data base record;
Input unit 42, by the record identification of selected data record respectively and described in the input of the value of each index field Search engine, to be directed to the index logic of each index field according to output result test described search engine;
Judging unit 43, when described search engine is patrolled for the index for all index fields that selected data record includes When collecting correct, determine that described search engine passes through test.
Optionally, the selection unit 41 is specifically used for:
When being added index field in the index data base, at least one data are chosen from the index data base Record;Wherein, the field to be tested is all index fields that the index data base records after being added index field.
Optionally, the selection unit 41 is specifically used for:
Data record, the index field covering that the data record includes are chosen from the index data base All fields to be tested of the index data base record;
Alternatively, choosing a plurality of data record from the index data base, pieces of data is remembered in a plurality of data record The index field that record includes is covered each by the part field to be tested of the index data base record, and a plurality of data record All index fields for including cover all fields to be tested of the index data base.
Optionally, the input unit 42 is specifically used for:
After having chosen data record, the record identification is inputted with the value of each index field respectively without delay Described search engine.
Optionally, the input unit 42 is specifically used for:
The correct value for each index field for including with selected data record respectively by the record identification inputs institute State search engine, with obtain corresponding to each index field first output as a result, and by the record identification respectively with it is selected The wrong value for each index field for taking data record to include inputs described search engine, to obtain corresponding to each index field Second output result;
When the first output result for corresponding to any index field that selected data record includes is to search respective counts It is to determine that described search engine is directed to any index when not searching respective data record according to record and the second output result The index logic of field is correct.
Optionally, selected data record includes a plurality of data record, the index field point that pieces of data record includes The part field to be tested of the index data base is not covered;The input unit 42 is specifically used for:
For each data record in a plurality of data record, unselected mistake in included index field is selected Index field;
Corresponding record identification is inputted into described search engine with the value of each index field selected respectively.
Optionally, the judging unit 43 is specifically used for:
The correct index field of the index logic tested is added in default statistics array;
When the index field for including in the statistics array is identical as all fields to be tested, judgement described search engine Pass through test.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
In a typical configuration, computer includes one or more processors (CPU), input/output interface, network Interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, based on graphene Storage medium or other magnetic storage devices or any other non-transmission medium, can be used for storing can be accessed by a computing device Information.As defined in this article, computer-readable medium does not include temporary computer readable media (transitory media), Such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can With or may be advantageous.
The term that this specification one or more embodiment uses be only merely for for the purpose of describing particular embodiments, and It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and the appended claims Used in the "an" of singular, " described " and "the" be also intended to including most forms, unless context understands earth's surface Show other meanings.It is also understood that term "and/or" used herein refers to and includes one or more associated list Any or all of project may combine.
It will be appreciated that though this specification one or more embodiment may using term first, second, third, etc. come Various information are described, but these information should not necessarily be limited by these terms.These terms are only used to same type of information area each other It separates.For example, the first information can also be referred to as in the case where not departing from this specification one or more scope of embodiments Two information, similarly, the second information can also be referred to as the first information.Depending on context, word as used in this is " such as Fruit " can be construed to " ... when " or " when ... " or " in response to determination ".
The foregoing is merely the preferred embodiments of this specification one or more embodiment, not to limit this theory Bright book one or more embodiment, all within the spirit and principle of this specification one or more embodiment, that is done is any Modification, equivalent replacement, improvement etc. should be included within the scope of the protection of this specification one or more embodiment.

Claims (10)

1. a kind of test method of search engine characterized by comprising
At least one data record, the index word that selected data record includes are chosen from the index data base of search engine Section covers all fields to be tested of the index data base record;
The record identification of selected data record is inputted into described search engine with the value of each index field respectively, with basis Export the index logic that result test described search engine is directed to each index field;
When the index logic for all index fields that described search engine includes for selected data record is correct, determine Described search engine passes through test.
2. the method according to claim 1, wherein being chosen at least in the index data base from search engine One data record, comprising:
When being added index field in the index data base, at least one data note is chosen from the index data base Record;Wherein, the field to be tested is all index fields that the index data base records after being added index field.
3. the method according to claim 1, wherein being chosen at least in the index data base from search engine One data record, comprising:
Data record is chosen from the index data base, a data records described in the index field covering for including All fields to be tested of index data base record;
Alternatively, a plurality of data record is chosen from the index data base, pieces of data record packet in a plurality of data record The index field contained is covered each by the part field to be tested of the index data base record, and a plurality of data record includes All index fields cover all fields to be tested of the index data base.
4. the method according to claim 1, wherein the record identification by selected data record respectively and The value of each index field inputs described search engine, described each to be directed to according to output result test described search engine The index logic of index field, comprising:
It will be searched described in the correct value input for each index field that the record identification includes with selected data record respectively Index is held up, with obtain corresponding to each index field first output as a result, and by the record identification respectively with selected access The wrong value for each index field for including according to record inputs described search engine, to obtain the corresponding to each index field Two output results;
When the first output result for corresponding to any index field that selected data record includes is to search corresponding data note Record and the second output result are to determine that described search engine is directed to any index field when not searching respective data record Index logic it is correct.
5. the method according to claim 1, wherein selected data record includes a plurality of data record, respectively The index field that data record includes is covered each by the part field to be tested of the index data base;It is described by selected access Described search engine is inputted with the value of each index field respectively according to the record identification of record, comprising:
For each data record in a plurality of data record, the index of unselected mistake in included index field is selected Field;
Corresponding record identification is inputted into described search engine with the value of each index field selected respectively.
6. a kind of test device of search engine characterized by comprising
Selection unit chooses at least one data record, selected data record packet from the index data base of search engine The index field contained covers all fields to be tested of the index data base record;
Input unit draws the record identification of selected data record with the value of each index field input described search respectively It holds up, to be directed to the index logic of each index field according to output result test described search engine;
Judging unit, when described search engine is being directed to the index logic for all index fields that selected data record includes just When true, determine that described search engine passes through test.
7. device according to claim 6, which is characterized in that the input unit is specifically used for:
It will be searched described in the correct value input for each index field that the record identification includes with selected data record respectively Index is held up, with obtain corresponding to each index field first output as a result, and by the record identification respectively with selected access The wrong value for each index field for including according to record inputs described search engine, to obtain the corresponding to each index field Two output results;
When the first output result for corresponding to any index field that selected data record includes is to search corresponding data note Record and the second output result are to determine that described search engine is directed to any index field when not searching respective data record Index logic it is correct.
8. device according to claim 6, which is characterized in that selected data record includes a plurality of data record, respectively The index field that data record includes is covered each by the part field to be tested of the index data base;The input unit tool Body is used for:
For each data record in a plurality of data record, the index of unselected mistake in included index field is selected Field;
Corresponding record identification is inputted into described search engine with the value of each index field selected respectively.
9. a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is by running the executable instruction to realize side according to any one of claims 1 to 5 Method.
10. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the instruction is by processor It is realized when execution such as the step of any one of claim 1-5 the method.
CN201910423648.2A 2019-05-21 2019-05-21 Search engine testing method and device, electronic equipment and storage medium Active CN110221971B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423648.2A CN110221971B (en) 2019-05-21 2019-05-21 Search engine testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423648.2A CN110221971B (en) 2019-05-21 2019-05-21 Search engine testing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110221971A true CN110221971A (en) 2019-09-10
CN110221971B CN110221971B (en) 2023-01-24

Family

ID=67821410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910423648.2A Active CN110221971B (en) 2019-05-21 2019-05-21 Search engine testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110221971B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355457A (en) * 2008-06-19 2009-01-28 腾讯科技(北京)有限公司 Test method and test equipment
CN102360367A (en) * 2011-09-29 2012-02-22 广州中浩控制技术有限公司 XBRL (Extensible Business Reporting Language) data search method and search engine
CN103218463A (en) * 2012-12-31 2013-07-24 威盛电子股份有限公司 Retrieval method, retrieval system and natural language understanding system
US8606769B1 (en) * 2010-12-07 2013-12-10 Conductor, Inc. Ranking a URL based on a location in a search engine results page
CN103577487A (en) * 2012-08-07 2014-02-12 亿赞普(北京)科技有限公司 Method and device of testing index function of search engine
CN106776299A (en) * 2016-11-30 2017-05-31 努比亚技术有限公司 Search engine test device and method
CN108052442A (en) * 2017-10-30 2018-05-18 努比亚技术有限公司 A kind of engine test method, terminal and computer readable storage medium
CN108959067A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Test method, device and the computer readable storage medium of search engine

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355457A (en) * 2008-06-19 2009-01-28 腾讯科技(北京)有限公司 Test method and test equipment
US8606769B1 (en) * 2010-12-07 2013-12-10 Conductor, Inc. Ranking a URL based on a location in a search engine results page
CN102360367A (en) * 2011-09-29 2012-02-22 广州中浩控制技术有限公司 XBRL (Extensible Business Reporting Language) data search method and search engine
CN103577487A (en) * 2012-08-07 2014-02-12 亿赞普(北京)科技有限公司 Method and device of testing index function of search engine
CN103218463A (en) * 2012-12-31 2013-07-24 威盛电子股份有限公司 Retrieval method, retrieval system and natural language understanding system
CN106776299A (en) * 2016-11-30 2017-05-31 努比亚技术有限公司 Search engine test device and method
CN108052442A (en) * 2017-10-30 2018-05-18 努比亚技术有限公司 A kind of engine test method, terminal and computer readable storage medium
CN108959067A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Test method, device and the computer readable storage medium of search engine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨翊平等: "搜索引擎技术在移动互联网音乐领域的研究与实践", 《电信科学》 *

Also Published As

Publication number Publication date
CN110221971B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
US20160275178A1 (en) Method and apparatus for search
CN108549569B (en) Method and equipment for searching information in application program
CN107015985B (en) Data storage and acquisition method and device
CN110019668A (en) A kind of text searching method and device
EP2783310A1 (en) Image searching
CN106033416A (en) A string processing method and device
JP6966158B2 (en) Methods, devices and programs for processing search data
CN110019669B (en) Text retrieval method and device
CN110188100A (en) Data processing method, device and computer storage medium
CN114330329A (en) Service content searching method and device, electronic equipment and storage medium
US7949657B2 (en) Detecting zero-result search queries
EP3301603A1 (en) Improved search for data loss prevention
CN104615723B (en) The determination method and apparatus of query word weighted value
CN106610989B (en) Search keyword clustering method and device
CN108446296B (en) Information processing method and device
CN116226515B (en) Search result ordering method and device, electronic equipment and storage medium
CN108170664B (en) Key word expansion method and device based on key words
CN110221971A (en) The test method and device of search engine, electronic equipment, storage medium
US9286349B2 (en) Dynamic search system
CN110471764A (en) A kind of processing method and processing device of memory cleaning
CN115185998A (en) Target field searching method and device, server and computer readable storage medium
CN110019665A (en) Text searching method and device
JP5589009B2 (en) RECOMMENDED QUERY EXTRACTION DEVICE, METHOD, AND PROGRAM
CN112667682A (en) Data processing method, data processing device, computer equipment and storage medium
CN110188301A (en) Information aggregation method and device for website

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