JP4550876B2 - Structured document retrieval system and program - Google Patents
Structured document retrieval system and program Download PDFInfo
- Publication number
- JP4550876B2 JP4550876B2 JP2007258085A JP2007258085A JP4550876B2 JP 4550876 B2 JP4550876 B2 JP 4550876B2 JP 2007258085 A JP2007258085 A JP 2007258085A JP 2007258085 A JP2007258085 A JP 2007258085A JP 4550876 B2 JP4550876 B2 JP 4550876B2
- Authority
- JP
- Japan
- Prior art keywords
- search
- identification
- condition
- database
- conditions
- 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.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 claims description 85
- 238000000034 method Methods 0.000 claims description 42
- 230000008569 process Effects 0.000 claims description 28
- 230000007717 exclusion Effects 0.000 claims description 18
- 238000011161 development Methods 0.000 claims description 5
- 240000000220 Panda oleosa Species 0.000 description 33
- 235000016496 Panda oleosa Nutrition 0.000 description 33
- 238000012986 modification Methods 0.000 description 28
- 230000004048 modification Effects 0.000 description 28
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 6
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、データベースに格納された構造化文書を検索する構造化文書検索システムに係り、特に複数の同一視条件がついた検索に好適な構造化文書検索システム及びプログラムに関する。 The present invention relates to a structured document retrieval system for retrieving a structured document stored in a database, and more particularly to a structured document retrieval system and a program suitable for retrieval with a plurality of identification conditions.
多くのデータベース管理システムは、検索機能の一部として「同一視検索」機能を備えている。同一視検索とは、検索キーワードとそれと同一視する文字種または文字列を指定する検索のことである。よく用いられる同一視条件を以下に例示する。 Many database management systems have a “same look search” function as part of the search function. The same view search is a search that specifies a search keyword and a character type or a character string that is identified with the search keyword. Examples of commonly used identification conditions are given below.
(1)英数字同一視・・・英数字の大文字及び小文字(これをcaseと表現する)並びに全角(全角文字)及び半角(半角文字)(これをwidthと表現する)を同一視する。 (1) Alphanumeric equivalence: Alphanumeric uppercase and lowercase letters (represented as case) and full-width (full-width characters) and half-width (half-width characters) (represented as width) are regarded as the same.
(2)仮名同一視・・・平仮名及び片仮名(これをkanaと表現する)並びに平仮名と片仮名の大文字及び小文字(これをkanacaseと表現する)を同一視する。 (2) Kana equation: Hiragana and Katakana (represented as kana), and hiragana and katakana uppercase and lowercase (represented as kanacase) are identified.
(3)異体字同一視・・・仮名や漢字の異体字を同一視する。 (3) Equivalent variant characters ・ ・ ・ Identify variant characters of kana and kanji.
(4)同義語同一視・・・同義語を同一視する。 (4) Identify synonyms ... Identify synonyms.
例えば検索キーワードが「あA」である場合、英数字同一視条件を指定すると「あa」「あA」「あa」もヒットする。仮名同一視条件を指定すると「アA」「ぁA」「ァA」もヒットする。複数の同一視条件を同時に指定した場合は、更にヒットする語彙が増える。 For example, when the search keyword is “A”, if the alphanumeric identification condition is specified, “A”, “A”, and “A” will also be hit. If the kana identification condition is specified, “A A”, “A A”, and “A A” will also be hit. When multiple identification conditions are specified at the same time, more vocabulary hits are added.
このように同一視検索では、検索キーワードと完全に一致する語彙に加えて同一視条件に適合した語彙もヒットする。このため同一視検索は、表記ゆれを考慮した検索などに便利であるが、同一視条件に従って展開(いわゆる同一視展開)した語彙もサーチすることから、検索の処理コストが増加するという問題がある。この問題を、索引情報の工夫により解決する方法が、例えば特許文献1及び2で提案されている。特許文献1は、同一視する検索としない検索とで、使用する索引情報を分けることによって処理コストを抑える方法を提案している。特許文献2は、ハッシュ値を工夫して、同一視される語彙を同じ索引情報として管理することによって処理コストを抑える方法を提案している。
In this way, in the same-look search, in addition to the vocabulary that completely matches the search keyword, the vocabulary that matches the same-view condition is also hit. For this reason, the same-lookup search is convenient for searches that take into account fluctuations, but it also searches for vocabularies that have been developed according to the same-view conditions (so-called same-view development), which increases the search processing cost. . For example,
ところで近年は、論理構造を持つ文書(つまり構造化文書)が、データベース管理システムによって管理されるようになってきている。構造化文書において、当該文書の論理構造は、当該文書中に記述されたタグによって示される。このタグを用いて論理構造が表現された構造化文書は、コンピュータでの処理に適している。 In recent years, documents having a logical structure (that is, structured documents) have been managed by database management systems. In the structured document, the logical structure of the document is indicated by a tag described in the document. A structured document in which a logical structure is expressed using this tag is suitable for processing by a computer.
さて、タグを用いてデータを記述する手段として、XML(Extensible Markup Language)が広く利用されている。XMLは、意味付けされたタグによるデータの階層化や構造の自由な拡張性という特長を持つ。これらの特長を生かしたXML利用技術として、XMLデータベース(XMLDB)と呼ばれるデータベースが知られている。XMLデータベースはXMLデータベース管理システム(XMLDBMS)と呼ばれるデータベース管理システムによって制御され、XML文書を格納し、またXML文書(中の指定された構造)を検索する機能を提供する。このようなデータベース管理システムにおいても、同一視検索を適用して、同一視条件を満たすXML文書(構造化文書)を検索することが可能である。 As a means for describing data using tags, XML (Extensible Markup Language) is widely used. XML has features such as hierarchization of data by means of tagged tags and free expandability of structure. A database called XML database (XMLDB) is known as an XML utilization technology that makes use of these features. The XML database is controlled by a database management system called an XML database management system (XMLDBMS), and provides functions for storing XML documents and retrieving XML documents (structures specified therein). Even in such a database management system, it is possible to search for an XML document (structured document) that satisfies the same view condition by applying the same view search.
XML文書(内の要素)の検索には標準化された問い合わせ言語がよく利用される。問い合わせ言語の主なものはXPathとXQueryである。XPathは、XML文書中の要素(ノード)の位置を指定して検索を行うのに用いられる。
同一視検索では、同一視条件ごとに同一視する/しないを切り替える条件指定が必要な場合もあるが、逆に全ての同一視条件をまとめて同一視する/しないに指定する条件指定が必要な場合もある。Web検索サービスがその例である。 In the same-sight search, there may be a case where it is necessary to specify a condition for switching whether or not to identify the same for each same-sight condition, but conversely, a condition specification for specifying whether or not to identify all the same-view conditions together is necessary. In some cases. An example is a web search service.
従来技術では、後者の場合にも複数の同一視条件を個別に指定する必要がある。そのためクエリ(問い合わせ)を記述するのに手間がかかり、またクエリが長くなって意味を解釈するのが難しいという問題がある。また同一視条件を指定するためのクエリ文法を全て知る必要がある。 In the prior art, it is necessary to individually specify a plurality of identical viewing conditions even in the latter case. Therefore, it takes time to write a query (inquiry), and there is a problem that the query becomes long and it is difficult to interpret the meaning. It is also necessary to know all the query grammars for specifying identification conditions.
XQueryを使って具体例を示す。ここでは説明の便宜上、同一視条件として「英数字同一視」と「仮名同一視」の2つだけがあると仮定し、英数字同一視を“case/width (in)sensitive”、仮名同一視を“kana/kanacase (in)sensitive”と記述することにする。 A specific example is shown using XQuery. Here, for convenience of explanation, it is assumed that there are only two identification conditions: “alphanumeric identification” and “kana identification”, and alphanumeric identification is “case / width (in) sensitive”. Is described as “kana / kanacase (in) sensitive”.
全ての同一視条件を同一視するに指定する場合、クエリ(検索式)は、例えば
/item/name [./text() ftcontains “社員Aさん” case insensitive width insensitive kana insensitive kanacase insensitive]
のようになる。ここで、“ftcontains”はXQueryの全文検索演算子を意味するものとする。また、“case insensitive”と“width insensitive”と“kana insensitive”と“kanacase insensitive”とが、同一視条件を指定している部分であり、この4つの同一視条件指定部分によりクエリが長くなっている。
When specifying to identify all the same identification conditions, the query (search expression) is, for example,
/ item / name [./text () ftcontains “Employee A” case insensitive width insensitive kana insensitive kanacase insensitive]
become that way. Here, “ftcontains” means an XQuery full-text search operator. In addition, “case insensitive”, “width insensitive”, “kana insensitive”, and “kanacase insensitive” are the parts that specify the same identification condition, and these four identification condition specification parts make the query longer. Yes.
一方、同一視検索では、実際にヒットする/しないに拘わらず、同一視条件の指定通りに検索キーワードが同一視展開される。このため、同時に指定する同一視条件が多いほど展開数が増え、検索の処理コストが増大する。例えば英数字と平仮名とを含む2文字の検索キーワード“あA”の場合、英数字同一視または仮名同一視の単一指定なら展開数は4となる。しかし、英数字同一視と仮名同一視との同時指定なら展開数は16に増加する。 On the other hand, in the same-look search, regardless of whether or not the hit is actually made, the search keyword is looked-up according to the designation of the same-view condition. For this reason, the more the same viewing conditions that are specified at the same time, the more the number of expansions, and the search processing cost increases. For example, in the case of a two-character search keyword “A” that includes alphanumeric characters and hiragana, the number of expansions is four if the single designation of alphanumeric identification or kana identification is single. However, the number of expansions is increased to 16 if the alphanumeric identification and kana identification are specified simultaneously.
特許文献1及び2は処理コストを抑える方法を提案している。しかし特許文献1及び2が提案する方法においても、同一視条件に従って検索キーワードが同一視展開される。このため、展開された語彙にヒットしなかった場合には、その展開に要した処理コストが無駄となる。
本発明は上記事情を考慮してなされたものでその目的は、複数の同一視条件が記述されていない検索式であっても、当該検索式に基づいて複数の同一視条件に従う同一視検索を行うことができる構造化文書検索システム及びプログラムを提供することにある。 The present invention has been made in consideration of the above circumstances, and the purpose of the present invention is to perform an identification search according to a plurality of identification conditions based on the search expression even if the search expression does not describe a plurality of identification conditions. It is an object of the present invention to provide a structured document search system and program that can be performed.
本発明の1つの観点によれば、複数の構造化文書を格納するデータベースを備えた構造化文書検索システムが提供される。前記構造化文書検索システムは、検索キーワードと同一視するための複数の同一視条件を格納する同一視条件情報記憶手段と、クライアント端末から与えられる検索要求に含まれている検索式を解析し、当該検索式に基づいて前記データベースに格納されている構造化文書を対象とする検索処理を行う検索処理手段と、前記検索式が全ての同一視条件を一括して指定するための一括同一視条件を含む場合、前記同一視条件情報記憶手段に格納されている前記複数の同一視条件の全てに基づいて前記検索式に含まれている検索キーワードを展開する同一視展開手段とを具備する。前記検索処理手段は、前記検索式に含まれている前記検索キーワード及び前記展開された検索キーワードに基づいて、前記データベースから前記検索式の示す検索条件に合致する構造を含む構造化文書を検索する。 According to one aspect of the present invention, a structured document search system including a database that stores a plurality of structured documents is provided. The structured document search system analyzes the identification formula information storage means for storing a plurality of identification conditions for identifying the search keyword and a search expression included in the search request given from the client terminal, Search processing means for performing a search process on the structured document stored in the database based on the search formula; and batch identification condition for the search formula to collectively specify all identification conditions , The same-view expansion means for expanding the search keyword included in the search formula based on all of the plurality of the same-view conditions stored in the same-view condition information storage means. The search processing unit searches a structured document including a structure that matches a search condition indicated by the search expression from the database based on the search keyword included in the search expression and the expanded search keyword. .
本発明によれば、検索式に一括同一視条件を含める(記述する)だけで、同一視条件情報記憶手段に格納されている複数の同一視条件の全てが当該検索式に含められているかの如く、当該検索式に基づいて当該複数の同一視条件に従う同一視検索を行うことができる。このため、ユーザにとって検索式の記述が容易になり、また検索式が短くなるので意味を解釈しやすくなるという効果がある。またユーザは、一括同一視条件によって自動的に指定される複数の同一視条件の各々について知らなくても、当該複数の同一視条件の全てを使った検索を構造化文書検索システムに対してクライアント端末から要求することができる。また、一括同一視条件によって自動的に指定される同一視条件が新たに増えても、即ち同一視条件情報記憶手段に新たな同一視条件が追加されても、検索式を変更する必要がない。 According to the present invention, whether or not all of the plurality of identification conditions stored in the identification condition information storage unit are included in the retrieval expression only by including (description) the collective identification condition in the retrieval expression. As described above, the same-view search according to the plurality of same-view conditions can be performed based on the search formula. For this reason, it is easy for the user to describe the search formula, and since the search formula is shortened, the meaning can be easily interpreted. Further, even if the user does not know each of the plurality of identification conditions automatically specified by the batch identification condition, the user can search the structured document search system using all of the plurality of identification conditions. It can be requested from the terminal. Further, even if the number of identical conditions automatically specified by the collective identical condition is increased, that is, even when a new identical condition is added to the identical condition information storage unit, there is no need to change the search formula. .
以下、本発明の実施の形態につき図面を参照して説明する。
図1は本発明の一実施形態に係る構造化文書検索システム50を含むクライアント−サーバシステムのハードウェア構成を示すブロック図である。クライアント−サーバシステムは、主として、データベースサーバ10と、複数のクライアント端末(クライアント)とから構成される。複数のクライアント端末はクライアント端末20を含む。クライアント端末20上では、データベースサーバ10を利用するアプリケーション(アプリケーションプログラム)が動作する。クライアント端末20を含む複数のクライアント端末は、ローカルエリアネットワーク(LAN)のようなネットワーク30を介してデータベースサーバ10と接続されている。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a hardware configuration of a client-server system including a structured
なお、図1では、クライアント端末20以外のクライアント端末は省略されている。そこで以下では、クライアント端末20だけが構造化文書検索システム50を利用するものとして説明するが、他のクライアント端末もクライアント端末20と同様に構造化文書検索システム50を利用できることは勿論である。
In FIG. 1, client terminals other than the client terminal 20 are omitted. Therefore, in the following description, it is assumed that only the client terminal 20 uses the structured
データベースサーバ10は、主メモリのようなメモリ11を有するコンピュータ(データベースサーバコンピュータ)である。データベースサーバ10は、ハードディスクドライブのような外部記憶装置40と接続されている。この外部記憶装置40は、データベース管理プログラム41及びデータベース42を格納する。本実施形態において構造化文書検索システム50は、データベースサーバ10及び外部記憶装置40(に格納されているデータベース42)によって実現される。
The
データベース管理プログラム41は、データベースサーバ10によるデータベース42の管理、及びクライアント端末20からの例えばXQueryを用いた問い合わせに基づく検索処理に用いられる。データベース42は構造化文書としての例えばXML文書(XML形式の電子文書)を格納するXML文書データベース(構造化文書データベース)である。
The
図2は図1に示される構造化文書検索システム50の主として機能構成を示すブロック図である。構造化文書検索システム50は、データベース管理システム51及びデータベース42から構成される。データベース42には、XML文書の集合に加えて、当該データベース42に格納されているXML文書を検索するのに用いられる索引が格納される。
FIG. 2 is a block diagram mainly showing a functional configuration of the structured
データベース管理システム51は、要求処理部52、同一視条件管理部53、検索処理部54、索引管理部55、文書登録部56及びデータベース操作部57を含む。
要求処理部52は、クライアント端末20からの要求(コマンド)を受け付けて当該要求の種別を判別し、その判別結果に基づいて当該要求を要求処理部52、同一視条件管理部53、検索処理部54、索引管理部55または文書登録部56に送出する入力インタフェースとして機能する。ここでは要求処理部52は、クライアント端末20からの要求が同一視条件設定要求(詳細は第2の変形例で述べる)ならば、当該同一視条件設定要求を同一視条件管理部53に送出し、
検索要求ならば当該検索要求を検索処理部54に送出する。また要求処理部52は、クライアント端末20からの要求が索引設定要求ならば当該索引設定要求を索引管理部55に送出し、文書登録要求ならば当該文書登録要求を文書登録部56に送出する。要求処理部52はまた、クライアント端末20からの要求に対する同一視条件管理部53、検索処理部54、索引管理部55または文書登録部56からの応答を当該クライアント端末20に返す出力インタフェースとしても機能する。
The
The
If a search request, the search request is sent to the
同一視条件管理部53は、同一視条件、例えば構造化文書検索システム50(内のデータベース管理システム51)とクライアント端末20との間の通信に用いられるセッションごとの同一視条件を管理する。同一視条件管理部53は同一視条件記憶部530を含む。同一視条件情報記憶部530は、上述のセッションごとに各同一視条件の適用/非適用(つまり同一視する/しない)を管理するのに用いられる同一視条件情報531を格納する。同一視条件情報記憶部530は、データベースサーバ10が有するメモリ11内の一部の記憶領域を用いて実現されるものとする。同一視条件情報記憶部530を、外部記憶装置40の一部の記憶領域を用いて実現してもよい。
The same-view
図3は、同一視条件情報531の一例を示す。以下では説明の便宜上、同一視条件として「英数字同一視(case/width)」と「仮名同一視(kana/kanacase)」の2つだけがあると仮定する。
FIG. 3 shows an example of the same
本実施形態において同一視条件情報531は、図3に示されるように表形式で管理される。同一視条件情報531は、列要素(列項目)としてセッション番号と各同一視条件を含む。同一視条件情報531は、クライアント端末との通信に用いられるセッション(本実施形態では、接続中のセッション、つまり確立中のセッション)ごとに、当該セッションのセッション番号と、各同一視条件の同一視する/しない(適用/非適用)とを、それぞれ値(表要素の値)として持つ。このセッションごとの、セッション番号と各同一視条件の同一視する/しないを示す値との組からなる情報を、セッション対応同一視条件情報と呼ぶ。
In this embodiment, the same
セッションが確立していないとき、当該セッションに固有の同一視条件情報(セッション対応同一視条件情報)は空である。セッションが確立し、その旨が要求処理部52から同一視条件管理部53に通知されると、当該同一視条件管理部53によってそのセッションに関する情報が同一視条件情報531中に追加される。ここでは、確立したセッションに固有の同一視条件情報における各同一視条件が“する”(同一視する)に設定される。図3の例では、セッション(セッション番号)によっては、“する”の逆の設定を意味する“しない”(同一視しない)も敢えて記述されているが、本実施形態ではセッションが確立したときに全て“する”に設定される。セッションが切断され、その旨が要求処理部52から同一視条件管理部53に通知されると、当該同一視条件管理部53によってそのセッションに関する情報が削除される。
When the session is not established, the same viewing condition information unique to the session (session-corresponding viewing condition information) is empty. When the session is established and the
再び図2を参照すると、検索処理部54は、クライアント端末20から送られた検索要求(クエリ)を要求処理部52を介して受け取り、当該クエリに含まれている検索式に従う検索処理を行う。
Referring to FIG. 2 again, the
索引管理部55は、検索処理部54による検索処理に用いられる索引を管理する。索引管理部55は、文書登録部56によるXML文書の登録時に、当該XML文書に含まれているノード(要素)に対応付けられる索引を作成してデータベース42に登録する。
The
文書登録部56は、クライアント端末20からの文書登録要求を要求処理部52を介して受け取り、当該文書登録要求で指定されたXML文書をデータベース42に登録(格納)する文書登録処理を行う。データベース操作部57は、検索処理部54、索引管理部55及び文書登録部56がデータベース(データベースファイル)42にアクセスするのを可能とするインタフェースとして機能して、当該データベース42に対する処理を行う。
The
本実施形態において、要求処理部52、同一視条件管理部53、検索処理部54、索引管理部55、文書登録部56及びデータベース操作部57は、図1のデータベースサーバ10が外部記憶装置40に格納されているデータベース管理プログラム41を当該サーバ10内のメモリ11に読み込んで実行することにより実現されるものとする。このプログラム41は、コンパクトディスク、或いはROMのような、コンピュータ読み取り可能な記憶媒体に予め格納して頒布可能である。また、このプログラム41が、ネットワーク30を介してデータベースサーバ10にダウンロードされても構わない。
In this embodiment, the
次に、構造化文書検索システム50の動作について説明する。
<文書登録処理>
まず、構造化文書検索システム50における文書登録処理について、図4のフローチャートを参照して説明する。
Next, the operation of the structured
<Document registration process>
First, document registration processing in the structured
今、ユーザが、データベース42に登録されるべきXML文書を指定して、当該XML文書の登録を指示するための操作を、クライアント端末20上で行ったものとする。するとクライアント端末20は、構造化文書検索システム50に対して、指定のXML文書をデータベース42に登録させるための登録要求(文書登録要求)をネットワーク30経由で送出する(ステップS1)。
Now, it is assumed that the user designates an XML document to be registered in the
要求処理部52は、クライアント端末20からの登録要求を受け取ると、当該登録要求を文書登録部56に渡してXML文書(XMLドキュメント)の登録を要求する(ステップS2)。文書登録部56は、クライアント端末20からの登録要求を要求処理部52を介して受け取ると、当該要求で指定されたXML文書のパース(構文解析)を開始する(ステップS3)。
Upon receiving the registration request from the client terminal 20, the
文書登録部56は、XML文書のパースによって当該XML文書から要素(ノード)が抽出される都度、そのノードについて次のように処理を行う(ステップS4)。
まず文書登録部56は、抽出されたノードの情報、例えば抽出されたノードの構造(を表すパス)を含む情報(ノード情報)を索引管理部55に渡して索引登録処理を行わせる。抽出されたノード(要素)の内容(値)がテキストの場合、当該ノードの内容に対応するノード、つまり当該ノードの直下のノードは、テキストノードと呼ばれる。このように、抽出されたノード(要素)の内容がテキストの場合、ノード情報は、当該ノードの構造(パス)と当該ノードの直下のテキストノードの値とを含む。
Each time an element (node) is extracted from the XML document by parsing the XML document, the
First, the
索引管理部55は、文書登録部56からノード情報を受け取ると、当該ノード情報中の構造(パス)を含む索引を作成して、当該索引をデータベース42に追加登録する索引登録処理を行う(ステップS5)。本実施形態では、ノード情報がテキストノードの値を含む場合、作成される索引は、構造(パス)とテキストノードの値の組を含むものとする。
Upon receiving the node information from the
次に文書登録部56は、抽出されたノード(つまりXML文書の一部)をデータベース42に格納するドキュメント格納処理を行う(ステップS6)。データベース42内では、当該データベース42に格納される複数のXML文書は、1つの仮想的なXML文書の一部の構造をなす部分的な文書として、当該仮想的なXML文書のルートノード(/)の下位に位置付けられる。
Next, the
文書登録部56は、ドキュメント格納処理(ステップS6)を行うと、クライアント端末20から要求されたXML文書のパースが全て終了したか、つまりXML文書に含まれている全てのノードについて処理をし終えたかを判定する(ステップS7)。もし、未処理のノードが残っているならば(ステップS7)、文書登録部56は上記ステップS4に戻り、次のノードについて処理を継続する。これに対し、未処理のノードが残っていないならば、即ち要求されたXML文書のパースが全て終了したならば(ステップS7)、検索処理部54は文書登録処理を終了する。
When the document registration process (step S6) is performed, the
XML文書から抽出されるノードの順序は、当該XML文書に出現するノードの順序に一致する。したがって上述の文書登録処理では、XML文書に出現する順番にノードが処理される。 The order of nodes extracted from the XML document matches the order of nodes appearing in the XML document. Therefore, in the document registration process described above, nodes are processed in the order in which they appear in the XML document.
ここで、クライアント端末20から登録が要求されたXML文書が
<item>
<id>0001</id>
<name>社員Aさん</name>
</item>
であるとする。
Here, the XML document requested to be registered by the client terminal 20 is
<item>
<id> 0001 </ id>
<name> Employee A </ name>
</ item>
Suppose that
図5は、上記XML文書がデータベース42に登録された場合に作成される索引の例を示す。図5の例では、索引は、登録されるXML文書から抽出されたノードの構造(パス)と、(XML文書の木構造上で)その直下のテキストノード値の組を含む。
FIG. 5 shows an example of an index created when the XML document is registered in the
例えば、<id>ノードに関する索引は、<id>ノード(要素)の構造“/item/id”と、当該<id>ノードの内容であるテキストノードの値“0001”、つまり当該<id>ノードの直下のテキストノードの値“0001”とを含む。同様に、<name>ノードに関する索引は、<name>ノードの構造“/item/name”と、当該<name>ノードの直下のテキストノードの値“社員Aさん”とを含む。但し、<item>ノードのように、直下にテキストノードが存在しないノードに関しては、テキストノードの値に代えて、空文字列を意味する記号“−”が用いられる。 For example, the index for the <id> node is the <id> node (element) structure “/ item / id” and the text node value “0001” that is the content of the <id> node, that is, the <id> node The value “0001” of the text node immediately below is included. Similarly, the index related to the <name> node includes the structure “/ item / name” of the <name> node and the value “Mr. employee A” of the text node immediately below the <name> node. However, for a node that does not have a text node immediately below it, such as an <item> node, the symbol “-” meaning an empty character string is used instead of the value of the text node.
<検索処理>
次に、構造化文書検索システム50における検索処理について、図6のフローチャートを参照して説明する。
<Search process>
Next, search processing in the structured
今、ユーザがクライアント端末20を操作することにより、当該クライアント端末20から構造化文書検索システム50に対して、現在確立しているセッションを用いて、ネットワーク30経由で検索要求が送出されたものとする(ステップS11)。この検索要求は検索式を含む。
Now, when a user operates the client terminal 20, a search request is sent from the client terminal 20 to the structured
要求処理部52は、クライアント端末20からの検索要求を受け取ると、当該検索要求を検索処理部54に渡して検索を要求する(ステップS12)。検索処理部54は、検索要求に含まれている検索式を解析することにより(ステップS13)、当該検索式に「一括同一視条件」が含まれているか、つまり当該検索式で「一括同一視条件」が指定されているかを判定する(ステップS14)。一括同一視条件とは、予め設定されている複数の同一視条件の全てを一括して指定するための検索条件を意味する。本実施形態では、一括同一視条件に文字列“all insensitive”の記述が用いられるものとする。
Upon receiving the search request from the client terminal 20, the
検索処理部54は、検索式で一括同一視条件“all insensitive”が指定されているならば(ステップS14)、当該検索式を含む検索要求の送信に用いられたセッションのセッション番号を用いて同一視条件管理部53に当該セッションの同一視条件情報(セッション対応同一視条件情報)を問い合わせる(ステップS15)。すると同一視条件管理部53は、同一視条件情報記憶部530に格納されている同一視条件情報531の中から、検索処理部54から問い合わせられたセッション番号のセッションに固有の同一視条件情報のみを抽出して、検索処理部54に返す。これにより検索処理部54は、上記ステップS15において、目的のセッションに固有の同一視条件情報(セッション対応同一視条件情報)、即ち目的のセッションに対応付けられた全て同一視するに設定された複数の同一視条件を示す情報を取得する。なお、検索処理部54が同一視条件情報記憶部530に格納されている同一視条件情報531を直接参照することにより、目的のセッションに固有の同一視条件情報を取得するようにしても構わない。
If the collective identification condition “all insensitive” is specified in the search formula (step S14), the
次に検索処理部54は、取得した同一視条件情報に従い、解析された検索式によって示される検索条件として個々の同一視条件を設定する(ステップS16)。この同一視条件情報に従う検索条件の設定について、検索式(クエリ)がXQuery式であるものとして具体例を挙げて説明する。
Next, the
まず、セッション番号1のセッション(以下、セッション#1と称する)で以下の検索式(クエリ)
/item/name [./text() ftcontains “社員Aさん” all insensitive]
を含む検索要求が実行されるものとする。このとき、同一視条件情報記憶部530に格納されている同一視条件情報531が図3の状態にあるものとする。
First, in the session with session number 1 (hereinafter referred to as session # 1), the following search expression (query)
/ item / name [./text () ftcontains “Employee A” all insensitive]
It is assumed that a search request including is executed. At this time, it is assumed that the same
上記クエリでは、一括同一視条件“all insensitive”が指定されている。このため検索処理部54は、同一視条件管理部53に問い合わせることで、セッション#1に固有の同一視条件情報(セッション対応同一視条件情報)を取得する(ステップS15)。
In the above query, the batch identification condition “all insensitive” is specified. Therefore, the
図3から明らかなように、セッション#1に固有の同一視条件情報は、英数字同一視及び仮名同一視(“kana insensitive”と“kanacase insensitive”)を共に“する”(同一視する)に設定された同一視条件(英数字同一視条件及び仮名同一視条件)を含む。この場合、検索処理部54は、上記クエリにおける一括同一視条件“all insensitive”が、英数字同一視をする(“case insensitive”及び“width insensitive”)と共に仮名同一視をする(“kana insensitive”及び“kanacase insensitive”)検索条件を表していると判断する。そして検索処理部54は、上記クエリにおける“all insensitive”を、“case insensitive width insensitive kana insensitive kanacase insensitive”に自動的に置き換える。
As is clear from FIG. 3, the identification condition information unique to
これにより上記クエリは、以下のクエリ
/item/name [./text() ftcontains “社員Aさん” case insensitive width insensitive kana insensitive kanacase insensitive]
と同等となる。
As a result, the above query becomes
/ item / name [./text () ftcontains “Employee A” case insensitive width insensitive kana insensitive kanacase insensitive]
Is equivalent to
このように、検索処理部54は取得された同一視条件情報に従って、一括同一視条件“all insensitive”に代えて、英数字同一視及び仮名同一視を共にすることをそれぞれ示す、英数字同一視条件(“case insensitive”及び“width insensitive”)及び仮名同一視条件(“kana insensitive”及び“kanacase insensitive”)を設定する(ステップS16)。なお本実施形態では、クエリにより一括同一視条件及び個々の同一視条件の両方が指定されている場合、個々の同一視条件は無視される(エラー扱いとされる)ものとする。
As described above, the
索引管理部55は、検索処理部54によってステップS16が実行されると、同一視展開手段として機能して、検索処理部54によって解析されたクエリ(検索式)に含まれている検索キーワードと当該ステップS16で設定された個々の同一視条件とに従って、当該検索キーワードを展開する(ステップS17)。次に索引管理部55は索引検索処理手段として機能して、展開後の全ての検索キーワードに対し、データベース42に格納されている索引を用いて、検索条件に合致するノードのリストを検索結果として取得する(ステップS18)。ここでは、上記クエリ(検索式)により検索対象パスとして“/item/name”が指定されていることから、ステップS18での検索には、パス“/item/name”を含む索引が用いられる。検索処理部54は、索引管理部55による索引を用いての検索結果を要求処理部52によりクライアント端末20に返す(ステップS19)。
When step S16 is executed by the
なお、データベース42に格納されている索引を、構造化文書検索システム50の起動時にデータベースサーバ10内のメモリ11にコピーしておき、索引管理部55による検索処理にはこのコピーされた索引を用いることにより、検索処理を高速化することも可能である。また、索引管理部55の同一視展開手段としての機能及び索引検索処理手段としての機能の一方または両方を検索処理部54に持たせることも可能である。また、同一視展開手段としての機能を、検索処理部54から独立の手段に持たせることも可能である。
The index stored in the
一方、検索要求に含まれている検索式で一括同一視条件が指定されていない場合(ステップS14)、ステップS15及びS16をスキップしてステップS17が実行される。この場合、クライアント端末20からの検索要求に含まれているクエリで直接指定された同一視条件に従って検索キーワードが展開される。 On the other hand, if the batch identification condition is not specified in the search formula included in the search request (step S14), steps S15 and S16 are skipped and step S17 is executed. In this case, the search keyword is expanded according to the same viewing condition directly specified by the query included in the search request from the client terminal 20.
本実施形態によれば、検索式内に個々の同一視条件を記述する必要がないため、ユーザにとって検索式の記述が容易になり、また検索式が短くなるので意味を解釈しやすくなる。また、ユーザは個々の同一視条件について知らなくても、一括同一視条件を用いるだけで、予め設定されている全ての同一視条件を使った検索を構造化文書検索システム50に行わせることができる。また本実施形態によれば、一括指定可能な同一視条件が新たに増えても、その新たな条件についても既に設定されている同一視条件と同一視する/しないが同じであれば、検索式を変更する必要がない。
According to this embodiment, since it is not necessary to describe individual identification conditions in the search formula, the description of the search formula is easy for the user, and the search formula is shortened, so that the meaning can be easily interpreted. Further, even if the user does not know about the individual identification conditions, the structured
[第1の変形例]
上記実施形態では、クエリに一括同一視条件を設定(記述)することにより、予め設定されている複数の同一視条件の全てを一括して指定することができる。しかし、一括して指定される複数の同一視条件の中に検索に不要な同一視条件が含まれている場合には、一括同一視条件を利用できない。
[First Modification]
In the above-described embodiment, by setting (description) the collective identification condition in the query, it is possible to collectively specify all of the plurality of preset identification conditions. However, when the same viewing condition unnecessary for the search is included in a plurality of the same viewing conditions that are collectively specified, the batch same viewing condition cannot be used.
そこで、一括同一視条件から除外すべき同一視条件を指定可能とする上記実施形態の第1の変形例について説明する。この第1の変形例では、クエリ(検索式)に、一括同一視条件から除外すべき同一視条件、つまり一括同一視指定の対象外とする同一視条件“except XXX”(“XXX”は“case”、“width”など同一視条件を意味する文字列)を記述できるものとする。この一括同一視条件の対象外とする同一視条件を同一視除外条件と称する。 Therefore, a first modification example of the above-described embodiment that enables designation of the same viewing condition to be excluded from the batch simultaneous viewing condition will be described. In this first modification, the query (search formula) includes the same identification condition to be excluded from the collective identification condition, that is, the same identification condition “except XXX” (“XXX” is excluded from the collective identification designation target). It is possible to describe a character string indicating the same viewing condition such as “case” and “width”. The same viewing condition that is not subject to the collective viewing condition is referred to as a same viewing exclusion condition.
<検索処理>
以下、上記実施形態の第1の変形例の動作について、構造化文書検索システム50における検索処理を例に、上記実施形態と相違する点を中心に図7のフローチャートを参照して説明する。なお、図7において、図6のフローチャートと同様のステップには同一参照符号を付してある。
<Search process>
Hereinafter, the operation of the first modification of the above embodiment will be described with reference to the flowchart of FIG. 7 focusing on the differences from the above embodiment, taking the search processing in the structured
まず、ユーザがクライアント端末20を操作することにより、当該クライアント端末20から構造化文書検索システム50に対して、ネットワーク30経由で検索要求が送出されたものとする(ステップS11)。この検索要求に含まれている検索式は上記実施形態と同様に一括同一視条件を含むものとする。この場合、上記実施形態と同様にステップS12乃至S16が行われて、一括同一視指定される個々の同一視条件が設定される。
First, it is assumed that when the user operates the client terminal 20, a search request is transmitted from the client terminal 20 to the structured
すると検索処理部54は、ステップS13で解析されたクエリ(検索式)で同一視除外条件が指定されているか判定する(ステップS21)。第1の変形例において、このクエリは一括同一視条件に加えて同一視除外条件も指定している(含んでいる)ものとする。
Then, the
解析されたクエリで同一視除外条件が指定されている場合(ステップS21)、検索処理部54は、ステップS16で設定された複数の同一視条件、即ち一括して指定された複数の同一視条件の中から、同一視除外条件で指定された同一視条件だけを除外する(ステップS22)。この同一視除外条件で指定された同一視条件を除外する処理について、具体例を挙げて説明する。
When the equated exclusion condition is specified in the analyzed query (step S21), the
まず、セッション#1で以下の検索式(クエリ)
/item/name [./text() ftcontains “社員Aさん” all insensitive except case]
を含む検索要求が実行されるものとする。このとき、同一視条件情報記憶部530に格納されている同一視条件情報531が図3の状態にあるものとする。
First, in
/ item / name [./text () ftcontains “Employee A” all insensitive except case]
It is assumed that a search request including is executed. At this time, it is assumed that the same
上記クエリでは、一括同一視条件“all insensitive”が指定されている。このため上記実施形態と同様に、“all insensitive”が“case insensitive width insensitive kana insensitive kanacase insensitive”に自動的に置き換えられる(ステップS16)。 In the above query, the batch identification condition “all insensitive” is specified. Therefore, as in the above embodiment, “all insensitive” is automatically replaced with “case insensitive width insensitive kana insensitive kanacase insensitive” (step S16).
また上記クエリでは、同一視除外条件“except case”が指定されている(ステップS21)。このため検索処理部54は、“case insensitive width insensitive kana insensitive kanacase insensitive”から英数字の大文字小文字同一視条件(case insensitive)を除外する(ステップS22)。つまり検索処理部54は、“case insensitive width insensitive kana insensitive kanacase insensitive”を、英数字の大文字小文字同一視条件(case insensitive)が除外された“width insensitive kana insensitive kanacase insensitive”に自動的に置き換える。
Further, in the above query, the sameness exclusion condition “except case” is specified (step S21). Therefore, the
これにより前述のクエリは、以下のクエリ
/item/name [./text() ftcontains “社員Aさん” width insensitive kana insensitive kanacase insensitive]
と同等となる。
As a result, the above query becomes the following query:
/ item / name [./text () ftcontains “Employee A” width insensitive kana insensitive kanacase insensitive]
Is equivalent to
以降の動作は上記実施形態と同様であり、索引管理部55は、検索処理部54によって解析されたクエリ(検索式)に含まれている検索キーワードと現在設定されている個々の同一視条件(ここでは、一括指定された複数の同一視条件から、同一視除外条件で指定された同一視条件が除外された残りの同一視条件)とに従って、当該検索キーワードを展開する(ステップS17)。なお、同一視除外条件が指定されていない場合には(ステップS21)、ステップS22をスキップしてステップS17が実行される。ステップS17が実行されると、上記実施形態と同様にステップS18及び19が実行される。
Subsequent operations are the same as those in the above embodiment, and the
上記実施形態の第1の変形例によれば、同一視除外条件により一括同一視指定の対象外とする同一視条件を設定できるので、ある同一視条件だけ同一視する、またはしないといった同一視検索でも一括同一視指定が使える。このため一括同一視指定をより有効に利用することができる。また、同一視除外条件をクエリ中に設定(記述)できるので、一括同一視指定を利用しながら、クエリ単位で同一視条件を変更できる。 According to the first modification of the above embodiment, it is possible to set the same-view condition that is not subject to the batch identification specification by the same-view exclusion condition. But you can use batch identification. For this reason, the batch identification designation can be used more effectively. In addition, since the same-look exclusion condition can be set (described) in the query, the same-view condition can be changed in units of queries while using batch identification.
[第2の変形例]
上記実施形態の第1の変形例では、所望の同一視条件を一括同一視指定の対象外とする検索が必要な場合、ユーザは、その都度検索式で同一視除外条件を指定する必要がある。
[Second Modification]
In the first modification of the above-described embodiment, when a search for excluding a desired identical viewing condition from a batch identification designation is necessary, the user needs to designate the identical exclusion condition by a retrieval formula each time. .
そこで、検索式で同一視除外条件を指定しなくても、所望の同一視条件を一括同一視指定の対象外とすることを可能とする上記実施形態の第2の変形例について説明する。第2の変形例の特徴は、ユーザから要求されたセッションに対応付けられている一括同一視指定の対象となる複数の同一視条件ごとに、同一視する/しない(適用/非適用)の設定を更新できるようにしたことにある。 Therefore, a description will be given of a second modification of the above-described embodiment that makes it possible to exclude a desired equating condition from being designated as a collective equating designation without designating the equating exclusion condition with a search expression. A feature of the second modified example is a setting of whether or not to identify (apply / not apply) for each of a plurality of identification conditions that are targets of batch identification specification associated with a session requested by the user. Is to be able to update.
<同一視条件設定処理>
以下、上記実施形態の第2の変形例の動作について、構造化文書検索システム50における同一視条件設定処理を例に図8のフローチャートを参照して説明する。
まず、ユーザがクライアント端末20を操作することにより、当該クライアント端末20から構造化文書検索システム50に対して、現在確立しているセッションを用いて、ネットワーク30経由で同一視条件設定要求が送出されたものとする(ステップS31)。この同一視条件設定要求は、予め定められている同一視条件ごとに、同一視する/しない(適用/非適用)の情報を含む。
<Identification condition setting process>
Hereinafter, the operation of the second modified example of the above embodiment will be described with reference to the flowchart of FIG.
First, when the user operates the client terminal 20, the client terminal 20 sends an identification condition setting request to the structured
要求処理部52は、クライアント端末20からの同一視条件設定要求を受け取ると、当該同一視条件設定要求を同一視条件管理部53に渡して同一視条件設定を要求する(ステップS32)。
When receiving the same viewing condition setting request from the client terminal 20, the
すると同一視条件管理部53は、同一視条件設定要求に含まれている同一視する/しない(適用/非適用)の情報に従って、同一視条件情報記憶部530に格納されている同一視条件情報531の中で、該当するセッションに対応付けられている一括同一視指定の対象となる複数の同一視条件ごとの同一視する/しない(適用/非適用)の情報(セッション対応同一視情報)を更新する(ステップS33)。ここで、該当するセッションは、クライアント端末20からの同一視条件設定要求の送信に用いられたセッションを指す。
Then, the same-view
もし、同一視条件設定要求で英数字の大文字小文字同一視条件のみ同一視しないこと(非適用)が指定されているならば、ステップS33の実行により、英数字同一視条件及び仮名同一視条件のうち、英数字の大文字小文字同一視条件のみ同一視しないに変更される。これは、クエリにより、その都度同一視除外条件“except case”を指定することと等価である。 If it is specified in the identification condition setting request that only alphanumeric uppercase and lowercase identification conditions are not identified (not applicable), the execution of step S33 causes the alphanumeric identification conditions and the pseudonym identification conditions. Of these, only alphanumeric upper and lower case identification conditions are changed to not identify. This is equivalent to designating the identification exclusion condition “except case” each time by a query.
上記実施形態の第2の変形例によれば、ユーザから要求されたセッションに対応付けられている一括同一視指定の対象となる複数の同一視条件ごとに、同一視する/しない(適用/非適用)の設定を更新できるため、一括同一視指定の対象となる同一視条件の設定を当該セッションにおいて継続的に有効にできる。よってユーザは、同一視除外条件をクエリごとに設定する必要がない。 According to the second modified example of the above-described embodiment, the plurality of identification conditions that are targets of batch identification specification associated with the session requested by the user are / are not identified (applied / non-applicable). Because the setting of (apply) can be updated, it is possible to continuously make the setting of the same viewing condition that is the target of the batch identification specification in the session. Therefore, the user does not need to set the sameness exclusion condition for each query.
[第3の変形例]
上記実施形態(並びに当該実施形態の第1及び第2の変形例)では、一括同一視指定の対象として設定された個々の同一視条件に従って、検索キーワードが無条件に展開される。しかし、展開された語彙にヒットしなかった場合には、その展開に要した処理コストが無駄となる。
[Third Modification]
In the embodiment described above (and the first and second modifications of the embodiment), the search keywords are unconditionally expanded according to the individual identification conditions set as the target of batch identification. However, if the expanded vocabulary is not hit, the processing cost required for the expansion is wasted.
そこで、このような無意味な検索キーワードの展開を防止できるようにした上記実施形態の第3の変形例について説明する。 Therefore, a third modification of the above-described embodiment that can prevent the development of such meaningless search keywords will be described.
図9は上記実施形態の第3の変形例で適用される索引管理部55の構成を示すブロック図である。索引管理部55は、文字種情報記憶部550を含む。文字種情報記憶部550は、データベース42に登録されるXML文書の木構造上の階層ごとに、即ちXML文書の構造(パス)ごとに、その直下のテキストノードの文字種(テキストの文字種)と文字数を管理するのに用いられる文字種情報551を格納する。
FIG. 9 is a block diagram showing a configuration of the
図10は文字種情報551の一例を示す。第3の変形例において、文字種情報551は表形式で管理される。文字種情報551は、列要素としてパスと文字種を含む。ここでは文字種が、「英数字」、「仮名」及び「その他」の3種であるものとする。文字種情報551は、各パスについて、当該パスを表す文字列(XPath表記文字列)と、データベース42に登録されるXML文書の当該パスの直下のテキストノードの文字種ごとの文字数とを、それぞれ値(表要素の値)として持つ。このパスごとの、当該パスを表す文字列と文字種ごとの文字数との組からなる情報を、パス対応文字種情報と呼ぶ。図10の文字種情報551は、簡略化のために、データベース42に上記実施形態で挙げたXML文書だけが登録されている場合の例を示している。このXML文書の例では、<id>ノードの直下のテキストノードの値は“0001”であり、<name>ノードの直下のテキストノードの値は“社員Aさん”である。このため、図10において、パス「/item/id」に対応付けられた文字種「英数字,仮名,その他」の文字数は「4,0,0」であり、パス「/item/name」に対応付けられた文字種「英数字,仮名,その他」の文字数は「1,4,0」である。
FIG. 10 shows an example of
データベース42にXML文書が全く登録されていないときは、文字種情報551は空である。XML文書がデータベース42に登録されて、新たなパス(XPath表記)が増える度に、文字種情報551の行が追加され、そのXML文書に含まれている当該パスの直下のテキストノードの文字種ごとの値(文字数)が登録される。また、既に文字種情報551に登録されているパスについては、新たに登録されたXML文書に含まれている当該パスの直下のテキストノードの文字種の文字数だけ、既に登録されている当該文字種の文字数が増加される。同様に、XML文書がデータベース42から削除されると、当該削除されるXML文書に含まれている当該パスの直下のテキストノードの文字種の文字数だけ、既に登録されている当該文字種の文字数が減少される。また、XML文書の削除により存在しなくなったパスについては、そのパスに関する行が文字種情報551から削除される。
When no XML document is registered in the
<文書登録処理>
次に、上記実施形態の第3の変形例の動作について、構造化文書検索システム50における文書登録処理を例に図11のフローチャートを参照して説明する。なお、図11において、図4のフローチャートと同様のステップには同一参照符号を付してある。
<Document registration process>
Next, the operation of the third modified example of the above embodiment will be described with reference to the flowchart of FIG. 11 taking the document registration process in the structured
今、ユーザが、データベース42に登録されるべきXML文書を指定して、当該XML文書の登録を指示するための操作を、クライアント端末20上で行ったものとする。するとクライアント端末20は、構造化文書検索システム50に対して、指定のXML文書をデータベース42に登録させるための登録要求(文書登録要求)をネットワーク30経由で送出する(ステップS1)。
Now, it is assumed that the user designates an XML document to be registered in the
要求処理部52は、クライアント端末20からの登録要求を受け取ると、当該登録要求を文書登録部56に渡してXML文書(XMLドキュメント)の登録を要求する(ステップS2)。文書登録部56は、クライアント端末20からの登録要求を要求処理部52を介して受け取ると、当該要求で指定されたXML文書のパースを開始する(ステップS3)。すると、上記実施形態と同様に、XML文書から要素(ノード)が抽出される都度(ステップS4)、そのノードについて、索引管理部55による索引登録処理が行われる(ステップS5)。
Upon receiving the registration request from the client terminal 20, the
次に索引管理部55は文字種情報管理手段として機能して、索引登録の対象となったノード(要素)の内容(値)がテキストの場合、当該テキストを対象に文字種を識別すると共に文字数を計算し、文字種情報記憶部550に格納されている文字種情報551のうち、当該ノードのパスに対応付けられている当該識別された文字種の文字数を更新(例えば、当該計算された文字数だけ増加)する(ステップS40)。図7のフローチャートが図4のフローチャートと相違する点は、このステップS40が追加されたことである。なお、索引管理部55の文字種情報管理手段としての機能を、当該索引管理部55から独立の手段に持たせることも可能である。
Next, the
文書登録部56は、索引管理部55によって文字種情報551が更新されると(ステップS40)、抽出されたノードをデータベース42に格納するドキュメント格納処理を行う(ステップS6)。そして文書登録部56は、未処理のノードが残っているならば(ステップS7)、上記ステップS4に戻って次のノードについて処理を継続する。
When the
<検索処理>
次に、第3の変形例で適用される構造化文書検索システム50における検索処理について、上記実施形態と相違する点を中心に図12のフローチャートを参照して説明する。なお、図12において、図6のフローチャートと同様のステップには同一参照符号を付してある。
<Search process>
Next, search processing in the structured
まず、ユーザがクライアント端末20を操作することにより、当該クライアント端末20から構造化文書検索システム50に対して、ネットワーク30経由で検索要求が送出されたものとする(ステップS11)。この検索要求に含まれている検索式は上記実施形態と同様に一括同一視条件を含むものとする。この場合、上記実施形態と同様にステップS12乃至S16が行われて、一括同一視指定される個々の同一視条件が設定される。
First, it is assumed that when the user operates the client terminal 20, a search request is transmitted from the client terminal 20 to the structured
すると索引管理部55は、文字種情報記憶部550に格納されている文字種情報551から検索対象パスに固有の文字種情報(パス対応文字種情報)を取得する(ステップS50)。このステップS50において、索引管理部55は同一視条件除外手段として機能して、取得された文字種情報に含まれている文字種ごとの数(文字数)に基づいて、ヒットすることがない無駄な同一視条件を特定し、その特定された同一視条件を一括同一視指定された複数の同一視条件から除外する。図12のフローチャートが図6のフローチャートと相違する点は、このステップS50が追加されたことである。このステップS50の詳細な手順については後述する。なお、上記ステップS50を、検索処理部54が検索対象パスに固有の文字種情報(パス対応文字種情報)を索引管理部55に問い合わせることで、当該検索処理部54が行うようにしても構わない。
Then, the
一方、検索要求に含まれている検索式で一括同一視条件が指定されていない場合(ステップS14)、ステップS15及びS16をスキップしてステップS50が実行される。ここでは、検索式で直接指定されている同一視条件の中から上記特定された同一視条件が除外される。 On the other hand, if the batch identification condition is not specified in the search expression included in the search request (step S14), step S15 and step S16 are skipped, and step S50 is executed. Here, the above-identified identification conditions are excluded from the identification conditions directly specified by the search expression.
索引管理部55は、ステップS50が実行されると、解析されたクエリ(検索式)に含まれている検索キーワードと当該ステップS50で除外されなかった同一視条件とに従って、当該検索キーワードを展開する(ステップS17)。次に索引管理部55は、展開後の全ての検索キーワードに対し、データベース42に格納されている索引を用いて、検索条件に合致するノードのリストを検索結果として取得する(ステップS18)。ここでは、ヒットすることがない無駄な同一視条件は除外され、当該無駄な同一視条件に従う検索キーワードの展開は抑止されている。つまり検索キーワードの無駄な展開は抑止される。このため検索の高速化が図れる。
When step S50 is executed, the
<無駄な同一視条件を除外する処理>
次に索引管理部55による上記ステップS50の処理(即ち無駄な同一視条件を除外する処理)の詳細な手順について、図13のフローチャートを参照して説明する。
<Process to exclude useless identification conditions>
Next, a detailed procedure of the processing in step S50 (that is, processing for removing useless identification conditions) by the
まず索引管理部55は、文字種情報記憶部550に格納されている文字種情報551から、検索対象パスに固有の文字種情報(パス対応文字種情報)を取得する(ステップS61)。次に索引管理部55は、取得された文字種情報中の文字種「英数字」の数(文字数)が0であるかを判定する(ステップS62)。もし、英数字の数が0の場合(ステップS62)、索引管理部55は英数字同一視条件が指定されていても検索でヒットすることはないとして、当該英数字同一視条件を同一視条件から除外する(ステップS63)。即ち索引管理部55は、英数字同一視条件を“同一視しない”(非適用)として設定する。一方、英数字の数が0でない場合(ステップS62)、索引管理部55はステップS63をスキップする。
First, the
同様に索引管理部55は、取得された文字種情報中の文字種「仮名」の数(文字数)が0であるかを判定する(ステップS64)。もし、仮名の数が0の場合(ステップS64)、索引管理部55は仮名同一視条件が指定されていても検索でヒットすることはないとして、当該仮名同一視条件を同一視条件から除外する(ステップS65)。即ち索引管理部55は、仮名同一視条件を“同一視しない”(非適用)として設定する。一方、仮名の数が0でない場合(ステップS64)、索引管理部55はステップS65をスキップする。なお、上述の無駄な同一視条件を除外する処理(ステップS61乃至S65)を、検索処理部54が検索対象パスに固有の文字種情報(パス対応文字種情報)を索引管理部55に問い合わせることで、当該検索処理部54が行うことも可能である。
Similarly, the
上記実施形態の第3の変形例によれば、無駄な同一視条件が除外されることにより、検索キーワードの無駄な展開が抑止される。これにより、検索の処理コストが減り、検索を高速化できる。また、無駄な同一視条件を除外する処理が自動的に行われるので、ユーザは検索キーワードを構成する文字種を意識せず同一視検索のための検索式を設定できる。 According to the third modification of the above embodiment, useless expansion of search keywords is suppressed by eliminating useless identification conditions. Thereby, the search processing cost is reduced, and the search can be speeded up. In addition, since the process of eliminating useless identification conditions is automatically performed, the user can set a search expression for the identification search without considering the character types constituting the search keyword.
上記実施形態及びその変形例では、構造化文書がXML文書である場合を想定している。しかし、本発明は、例えば、SGML(Standard Generalized Markup Language)文書のようなXML文書以外の構造化文書にも同様に適用できる。 In the above-described embodiment and its modification, it is assumed that the structured document is an XML document. However, the present invention can be similarly applied to structured documents other than XML documents such as SGML (Standard Generalized Markup Language) documents.
なお、本発明は、上記実施形態またはその変形例そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態またはその変形例に開示されている複数の構成要素の適宜な組み合わせにより種々の発明を形成できる。例えば、実施形態またはその変形例に示される全構成要素から幾つかの構成要素を削除してもよい。 In addition, this invention is not limited to the said embodiment or its modification example as it is, A component can be deform | transformed and embodied in the range which does not deviate from the summary in an implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment or its modification. For example, you may delete a some component from all the components shown by embodiment or its modification.
10…データベースサーバ、11…メモリ、20…クライアント端末、30…ネットワーク、40…外部記憶装置、41…データベース管理プログラム、42…データベース、50…構造化文書検索システム、51…データベース管理システム、52…要求処理部、53…同一視条件管理部、54…検索処理部、55…索引管理部、56…文書登録部、530…同一視条件情報記憶部、531…同一視条件情報、550…文字種情報記憶部、551…文字種情報。
DESCRIPTION OF
Claims (5)
検索キーワードと同一視するための複数の同一視条件を格納する同一視条件情報記憶手段と、
クライアント端末から与えられる検索要求に含まれている検索式が全ての同一視条件を一括して指定するための一括同一視条件を含む場合、前記同一視条件情報記憶手段に格納されている前記複数の同一視条件の全てに基づいて前記検索式に含まれている検索キーワードを展開する同一視展開手段と、
前記検索式に含まれている検索キーワード及び前記展開された検索キーワードに基づいて、前記データベースから前記検索式の示す検索条件に合致する構造を含む構造化文書を検索する検索処理手段と、
前記同一視展開手段が前記同一視条件の各々に基づいて前記検索式に含まれている検索キーワードを展開するに際し、当該同一視条件の各々に固有の文字種の前記データベースに格納されている構造化文書に含まれる文字のうち前記検索式の示す構造に対応する文字の有無に基づき、当該同一視条件の各々での検索でヒットする可能性の有無を判定し、ヒットする可能性の無い同一視条件を除外する同一視条件除外手段とを具備し、
前記同一視展開手段は、前記同一視条件除外手段によって除外された同一視条件を前記検索キーワードの展開の対象外とする
ことを特徴とする構造化文書検索システム。 A database for storing multiple structured documents;
Identification condition information storage means for storing a plurality of identification conditions for identification with the search keyword;
When the retrieval formula included in the retrieval request given from the client terminal includes a batch identification condition for collectively specifying all identification conditions, the plurality of items stored in the identification condition information storage unit equated expansion means for expanding a search keyword included in the search expression based on all identified conditions,
Search processing means for searching a structured document including a structure that matches a search condition indicated by the search formula from the database, based on the search keyword included in the search formula and the expanded search keyword;
When the identification viewing means expands a search keyword included in the search formula based on each of the identification conditions, the structured data stored in the database of character types unique to the identification conditions. Based on the presence / absence of characters corresponding to the structure indicated by the search expression among the characters included in the document, the presence / absence of the possibility of hitting is determined by the search under each of the same identification conditions. And the same condition exclusion means for excluding conditions ,
The structured document search system, wherein the same view development means excludes the same view conditions excluded by the same view condition exclusion means from the search keyword expansion target .
前記同一視条件除外手段は、前記同一視条件の各々での検索でヒットする可能性の有無を、当該同一視条件の各々に固有の文字種及び前記検索式の示す構造に対応付けて前記文字種情報記憶手段に格納されている文字の有無を示す情報に基づき判定する
ことを特徴とする請求項1記載の構造化文書検索システム。 For each of a plurality of character types predetermined character type information storage means to store information indicating whether a character of the character type included in the structured document stored in the database, for each structure of the structured document further comprising,
The equivalence condition exclusion means associates the presence or absence of a possibility of a hit in a search under each of the identification conditions with the character type unique to each of the identification conditions and the structure indicated by the search formula. claim 1 Symbol mounting structured document retrieval system, wherein the determining based on the information indicating the presence or absence of characters stored in the storage means.
クライアント端末から与えられる検索要求を受け付けるステップと、
前記受け付けられた検索要求に含まれている検索式が全ての同一視条件を一括して指定するための一括同一視条件を含むかを判定するステップと、
前記検索式が前記一括同一視条件を含む場合、前記同一視条件情報記憶手段から前記複数の同一視条件を全て取得するステップと、
前記取得された同一視条件の各々に固有の文字種の前記データベースに格納されている構造化文書に含まれる文字のうち前記検索式の示す構造に対応する文字の有無に基づき、当該同一視条件の各々での検索でヒットする可能性の有無を判定するステップと、
前記取得された前記複数の同一視条件のうちの前記ヒットする可能性が無いと判定された同一視条件を除く同一視条件に基づいて前記検索式に含まれている検索キーワードを展開するステップと、
前記検索式に含まれている検索キーワード及び前記展開された検索キーワードに基づいて、前記データベースから前記検索式の示す検索条件に合致する構造を含む構造化文書を検索するステップと
を実行させるためのプログラム。 A database for storing a plurality of structured documents and a same-view condition information storage unit for storing a plurality of same-view conditions for identifying the search keyword, and a structured document stored in the database as a target To the database server computer that performs the search process
Receiving a search request given from a client terminal;
Determining whether the search formula included in the accepted search request includes a batch identification condition for collectively specifying all the identification conditions;
If the search formula includes the batch identification condition, obtaining all of the plurality of identification conditions from the identification condition information storage unit;
Based on the presence / absence of characters corresponding to the structure indicated by the search expression among the characters included in the structured document stored in the database of the character types unique to each of the acquired identification conditions, Determining whether or not there is a possibility of a hit in each search;
Developing a search keyword included in the search formula based on the same viewing condition excluding the same viewing condition determined not to be a hit among the plurality of the same viewing conditions acquired; ,
Searching for a structured document including a structure that matches a search condition indicated by the search expression from the database based on the search keyword included in the search expression and the expanded search keyword. program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007258085A JP4550876B2 (en) | 2007-10-01 | 2007-10-01 | Structured document retrieval system and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007258085A JP4550876B2 (en) | 2007-10-01 | 2007-10-01 | Structured document retrieval system and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2009087162A JP2009087162A (en) | 2009-04-23 |
JP4550876B2 true JP4550876B2 (en) | 2010-09-22 |
Family
ID=40660483
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007258085A Expired - Fee Related JP4550876B2 (en) | 2007-10-01 | 2007-10-01 | Structured document retrieval system and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4550876B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102375557B1 (en) * | 2020-07-24 | 2022-03-17 | 주식회사 한글과컴퓨터 | Electronic device that performs a search for an object inserted in a document through execution of a query corresponding to a search keyword and operating method thereof |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0528190A (en) * | 1991-07-19 | 1993-02-05 | Hitachi Ltd | Information retrieval terminal equipment |
JPH0644295A (en) * | 1992-05-07 | 1994-02-18 | Ricoh Co Ltd | Development system for different description in square form of japanese syllabary |
JP2000231559A (en) * | 1999-02-12 | 2000-08-22 | Matsushita Electric Ind Co Ltd | Information processor |
JP2002073656A (en) * | 2000-09-01 | 2002-03-12 | Ricoh Co Ltd | Method and device for normalizing and developing different notation, method and device for retrieving document by using the method, and program recording medium |
JP2006092316A (en) * | 2004-09-24 | 2006-04-06 | Toshiba Corp | Structured document retrieval device, structured document retrieval method, and storage medium storing data for structured document retrieval |
-
2007
- 2007-10-01 JP JP2007258085A patent/JP4550876B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0528190A (en) * | 1991-07-19 | 1993-02-05 | Hitachi Ltd | Information retrieval terminal equipment |
JPH0644295A (en) * | 1992-05-07 | 1994-02-18 | Ricoh Co Ltd | Development system for different description in square form of japanese syllabary |
JP2000231559A (en) * | 1999-02-12 | 2000-08-22 | Matsushita Electric Ind Co Ltd | Information processor |
JP2002073656A (en) * | 2000-09-01 | 2002-03-12 | Ricoh Co Ltd | Method and device for normalizing and developing different notation, method and device for retrieving document by using the method, and program recording medium |
JP2006092316A (en) * | 2004-09-24 | 2006-04-06 | Toshiba Corp | Structured document retrieval device, structured document retrieval method, and storage medium storing data for structured document retrieval |
Also Published As
Publication number | Publication date |
---|---|
JP2009087162A (en) | 2009-04-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4445509B2 (en) | Structured document retrieval system and program | |
US9767108B2 (en) | Retrieval device, method for controlling retrieval device, and recording medium | |
US6094649A (en) | Keyword searches of structured databases | |
US20080294619A1 (en) | System and method for automatic generation of search suggestions based on recent operator behavior | |
US8694510B2 (en) | Indexing XML documents efficiently | |
JP2010257488A (en) | System and method for interactive search query refinement | |
JP2000089989A (en) | Method for starting service using property imparted to document | |
US7457812B2 (en) | System and method for managing structured document | |
JP2009037501A (en) | Information retrieval apparatus, information retrieval method and program | |
US7996410B2 (en) | Word pluralization handling in query for web search | |
JP4237813B2 (en) | Structured document management system | |
JP2008090404A (en) | Document retrieval apparatus, method and program | |
US20110252313A1 (en) | Document information selection method and computer program product | |
JP2006127229A (en) | Structured document retrieval system, method for retrieving structured document and program | |
JP4550876B2 (en) | Structured document retrieval system and program | |
JP2006185167A (en) | File retrieval method, file retrieval device, and file retrieval program | |
JP2008026963A (en) | Retrieval processor and program | |
JP4199916B2 (en) | Document management method and apparatus | |
JP2006185059A (en) | Contents management apparatus | |
JP2003108582A (en) | Synonym extracting method and document retrieving device | |
JP2001134597A (en) | Method and device for accessing different kind of information sources and storage medium stored with different-kind information sources access program | |
JP2006106907A (en) | Structured document management system, method for constructing index, and program | |
JP4461151B2 (en) | Structured document management system and program | |
JP4304226B2 (en) | Structured document management system, structured document management method and program | |
JP2007025831A (en) | Content retrieval apparatus and its method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100223 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100426 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100608 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100708 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4550876 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130716 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |