admin 管理员组

文章数量: 1184232


2024年3月28日发(作者:前端冒泡排序代码)

中文捅要

在普通OA(OfficeAutomation办公自动化)系统中,随着信息量的日益增

多和爆炸式扩展,对于数据字段的普通模糊匹配搜索查询己远远不能满足不同的

用户需求。由于普通的0A系统搜索查询一般都是根据用户需求硬质编码在具体

模块中,与具体模块耦合较强,不易于扩展、维护和管理。同时搜索数据库和搜

索索引模块接口不能统一,使得开发人员使用不同接口难度增大。本文在深入分

析索引生成、中文分词、索引检索等搜索引擎核心技术的基础上,设计并实现了

OA系统个性化搜索引擎包。该搜索引擎包的目标是建立一个独立于具体模块、

与数据字段相关性较弱、可管理维护配置的个性化搜索引擎,支持中文分词、全

文检索等搜索引擎特征,同时对全文检索和数据库检索建立统一的查询接口和规

则,使得在全文检索和数据库检索中容易切换。

该搜索引擎包构建于Compass和Lucene之上,将0A系统数据库搜索和索

引搜索统一结合在一起,统一了查询接口并将OA系统搜索抽象成可管理和维护

的外部独立包,以此减少系统业务模块之间的耦合,减少重复编码,提高系统可

重构性:同时实现了全文检索系统的中文分词,优化了中文分词的词库结构。

系统通过Spring和Hibernate的支持,提供对数据库查询和索引搜索的容器

管理,通过对Hibernate映射的JAVA对象的声明式配置,实现了根据配置来维

护索引字段和索引表,并可配置管理分词和查询分析器,可以灵活实现系统的扩

展和伸缩。通过Compass和Hibernate结合,对数据库提供事务级索引,同时能

和数据库同步更新索引,提高构建索引的速度和索引的可维护性。

系统实现了将OA系统各层查询逻辑分离,通过对数据传输对象的设置,在

底层系统生成数据库查询语句和索引查询语句,延迟查询语句的生成时间,便于

各层之问进行协作。

系统可以极大改善OA系统的开发时间和开发效率,进一步降低系统的耦合

性,减少系统维护和管理带来的开销,使得开发重心迸一步转移到业务逻辑上,

同时又能增强普通数据字段模糊匹配带来功能不足的困扰,通过个性化配置,可

以使得搜索引擎满足不同用户功能需求,达到简化系统开发和增强系统功能的目

的。

关键词:搜索引擎,中文分词,Compass,数据库扩展

Abst

ract

Throughdeepstudy

ofsearch

engine’s

core

technology,such

parsing

Chinese

words,index

vague

malch

searing

alsothere

are

can

as

index

building,

searching.With

the

explosion

of

information,common

not

meetthe

user

requirement

in

office

automation

system,

to

many

logic

coding

forsearchin

specific

moduleswhichlead

to

unmanageable,unable

extend.Moreover,due

to

theinterfaceof

searching

database

in

use

and

searching

indexdidn’t

integrate;developermay

be

of

the

searching

package

is

to

build

to

specific

difficult

different

interface.The

object

package

whichis

manageable

searching

can

irrelevant

module

anddatafield

in

database,also

it

wordsbe

manageable.support

parsing

Chinese

integrates

theinterfaceof

to

switch

and

full

text

searching.It

also

to

makeit

dambase

searching

and

foil

text

searching

easier

betweendambase

paper

searching

and

full

text

searching.

This

designs

and

implements

office

automation

system

deployable

search

engine

package,thispackage

constructs

on

Compass

and

Lucene

information

retrieval

and

querytools,it

also

integrates

OA

system

dambase

to

searching,indexsearching

deployable

interface,abstract

OA

system

searching

decuple

system

system,it

business

an

manageable

and

and

package,it

module,reduce

repeatcodingimprove

the

structure

of

also

implementsparsing

Chinese

words

in

full

text

searchingsystem,

optimizing

the

dictionary

structure

of

parsing

words.

This

package

through

the

support

of

Spring

andHibernate

to

manage

the

instance

of

database

searching

and

index

searching,through

the

mapping

Java

of

object

Hibernate,implements

maintaining

searching

field

and

indexing

table

by

the

configure,it

alsomaintain

parsing

and

searching

interface

by

the

configure

to

implements

make

system

more

flexible.Through

the

integrating

of

Compass

and

Hibernate,it

supply

transaction

indexofdatabaseand

synchonizing

index

with

database

to

impmve

the

This

speed

of

building

index

and

maintaining

indexintransaction.

package

also

implements

decuple

business

logic

in

OA

system,through

in

setting

data

transport

object,system

delaygenerate

database

query

and

index

query

core

level

to

implements

the

cooperation

oftiers.

This

package

italso

could

improve

developing

efficiency

and

savingdeveloping

on

period,

system

reduce

the

coupling

in

the

system,and

decrease

the

costs

to

develop

business

managing

to

attach

importance

match

searching

to

109ic’it

of

alsoenhance

plain

datafield

vague

function.By

user

solvethe

problem

insufficient

personal

configuration,we

can

makethesearch

enginesatisfy

different

requirement

to


本文标签: 系统 查询 搜索引擎 数据库 搜索