This application claims priority to German Patent Application No. 10 2010 022 263.1 filed May 31, 2011. The contents of which are incorporated herein by reference in its entirety
The present application concerns a method for optimizing a search query
A typical way of accessing large databases is to enter search queries into a search mask. Repeated optimizing and refining of the search queries by a user is necessary in order to achieve a desired search result.
According to various embodiments, a method for optimizing a search query which supports a user in the formulation of the search query can be provided.
According to an embodiment, in a method for optimizing a search query, a microprocessor is programmed to—record in a first step with the aid of a search mask a search query which consists at least of a first search term and a second search term, the two search terms being linked by means of a first operator, and—perform the following steps iteratively while the search mask is continuously displayed by a visual output means: —record changes to the previous search query in the search mask in a second step, in particular as a result of modifying, removing or adding search terms, thereby forming a new search query, —interrogate a database with the new search query in order to determine a hit count in a third step, —for each search term of the new search query, —form a modified search query in a fourth step by removing the respective search term from the new search query, —interrogate the database with the respective modified search query in order to determine a modified hit count in a fifth step, —calculate a difference between the modified hit count and the hit count of the new search query in a sixth step, and—determine an indicator for the respective search term on the basis of the calculated difference and output the indicator in a seventh step.
According to a further embodiment, the indicators can be graphical representations, in particular bars, colored areas or symbol strings, typographical representations, in particular font colors, font weights or font sizes, or numbers. According to a further embodiment, the indicators may reflect the respective difference or express the respective difference as a percentage of the hit count of the new search query. According to a further embodiment, the indicators can be output in the seventh step outside the search mask or inside the search mask next to the associated search term. According to a further embodiment, one, more than one or all of the search terms can be composed of further search terms.
According to another embodiment, on a computer-readable data medium, a computer program is stored which performs the method as described above when it is executed in a computer.
According to yet another embodiment, a computer program can be executed in a computer and in the process performs the method as described above.
Exemplary embodiments are explained below with reference to figures, in which:
According to various embodiments, a microprocessor is programmed to record in a first step with the aid of a search mask a search query consisting at least of a first search term and a second search term, the two search terms being linked by means of a first operator. Furthermore, the microprocessor is programmed to perform the following steps iteratively while the search mask is continuously displayed by a visual output means:
Firstly, changes to the previous search query are made in the search mask in a second step, in particular by modifying, removing or adding search terms, thereby forming a new search query. Next, a database query is submitted with the new search query in order to determine a hit count in a third step. Thereafter, a modified search query is formed for each search term of the new search query in a fourth step by removing the respective search term from the new search query. The database is thereupon interrogated with the respective modified search query in order to determine a modified hit count in a fifth step. In a sixth step a difference is calculated between the modified hit count and the hit count of the new search query. In a seventh step an indicator for the respective search term is determined on the basis of the calculated difference and output.
By means of the indicators the method enables an individual contribution to a search result made by the individual search terms of a search query consisting of a plurality of search terms linked by means of logical operators to be output to a user. If the user wished to determine the individual contribution in some other way, he/she would have to perform the search query manually without the respective search term and compare the number of returned hits with the number of hits for the original search query. This would have to be repeated for each search term. The effort involved in this would be disproportionately high for a relatively extensive search query.
By means of the method the user is provided with an optimization which indicates by means of an indicator the individual contribution of each search term used. For this purpose there is started in the background for each search term a search query consisting of the original search query without the respective search term. The hit count thus obtained is subtracted from the total hit count of the original search query including the relevant search term. The difference obtained in this process is a numerical indicator for the individual contribution of the respective search term to the hit count.
By virtue of the above-described analysis of the individual contributions of the search terms to the total hit count and the output of the associated indicators which furnish information about the individual contribution of the individual search terms, the user is spared the task of submitting separate search queries with the omission of one search term in each case and then comparing the returned hit count. The user quickly and conveniently obtains assistance in determining which search terms are crucial to his/her search query. He/she can thus selectively refine and optimize his/her search query, e.g. by explicitly specifying less significant search terms or removing overly restrictive search terms or by linking and extending them with alternatives via OR operators.
As well as the method just described other embodiments also include a computer-readable data medium on which a computer program is stored which performs the method just described when it is executed in a computer.
According to yet other embodiments, a computer program can be executed in a computer and in the process performs one of the above-described methods.
An exemplary embodiment is explained below with reference to the program flowchart in
In order to optimize the search query, a second step 22, a third step 23, a fourth step 24, a fifth step 25, a sixth step 26, a seventh step 27 and an eighth step 28 are performed iteratively while the search mask 6 is continuously displayed by a visual output means. The visual output means can be for example a display screen or a video projector.
In the second step 22, changes to the previous search query in the search mask 6, in particular as a result of modifying, removing or adding search terms, are recorded, thereby forming a new search query. In
A selection of said hits (e.g. the first ten) is retrieved from the database and for example output below the search mask 6 via the visual output means.
A modified search query is now formed for the first search term 1 of the new search query in a fourth step 24 by removing the first search term 1 from the new search query:
Next, in a fifth step 25, the database is interrogated with the modified search query, a modified hit count, in this case 2202, being determined. The difference between the modified hit count (2202) and the hit count of the new search query (150) is thereupon calculated in a sixth step 26 as 2052. Finally, in a seventh step 27, a first indicator 11 for the first search term 1 is determined for the difference in the form of the character string “+2052” and, as shown in
A modified search query is formed in the same way for the second search term 2 (fourth step 24) by removing the second search term 2 from the new search query:
When the database is interrogated, this search query returns a modified hit count of 148. The difference between this modified hit count and the hit count of the new search query is −2. For this, a character string “−2” is formed as the second indicator 12 and output as shown in
A modified search query is formed for the third search term 3 (fourth step 24) by removing the third search term 3 from the new search query:
When the database is interrogated, this search query returns a modified hit count of 14. The difference between this modified hit count and the hit count of the new search query is −136. For this, a character string “−136” is formed as the third indicator 13 and output as shown in
In the eighth step 28 a check is now made to determine whether an abort criterion has been met. The abort criterion is met for example when a user closes a window containing the search mask 6 by means of a corresponding input or terminates the processing of the search query. Otherwise the steps starting with the second step 22 are repeated if the user makes further changes to the search query.
As soon as the abort criterion has been met, a computer program which provides the search mask 6 is terminated in a ninth step 29. Alternatively a window containing the search mask 6 can be closed and instead a window opened which displays a hit quantity for the search query. If search mask 6 and hit quantity were already displayed together previously in a window, the search mask 6 can be hidden, thereby making more space available for outputting the hit quantity. This is followed by an end 30 in the program flowchart shown in
In the exemplary embodiment shown in
Alternatively plus signs can indicate that the hit count would decrease if the respective search term were omitted, i.e. that the respective search term makes a positive contribution to the hit count. Minus signs then indicate that the respective search term reduces the hit count.
In the exemplary embodiment shown in
As an alternative to the already described numerical and graphical representations for the indicators,
As shown in
The search terms are terms (technical terms), regular expressions (character strings describing a set of character strings), any other character strings, etc. The search terms can also be compound terms. This means that the first search term 1 for example consists in turn of a grouping of search terms which are linked via logical operators or proximity operators. In this case the first indicator 11 determined for the first search term 1 is an indicator for the complete grouping of search terms of which the first search term 1 is composed.
NOR, XOR, NEAR, NOT etc. are also possible as suitable operators between the search terms in addition to AND and OR.
The variants and exemplary embodiments described can be freely combined with one another.
Number | Date | Country | Kind |
---|---|---|---|
10 2010 022 263.1 | May 2010 | DE | national |