Title: Oracle Text
1Oracle Text
2????????
- Oracle 7.3 ConText Option
- ??????? ?? ?? ????? ???
- Oracle 8.0 ConText Cartidge
- ??????? ????????????? ???????
- Oracle 8.1.5 InterMedia Text
- ????? ? ?????? InterMedia
- ???? ?? ????????? ?????? ???????
3????????
- Oracle 8.1.6 interMedia Text
- ?? ?? ?????????? ???????????? ???????
- Oracle 8.1.7 interMedia Text
- ??????? ? ??? ??? ?????? CTXCAT
- Oracle 9.0.1 Oracle Text
- ??????? ? ??? ??? ?????? CTXRULE
4???????????? ?? ?????? ???????
- ?????????? ????? ?? ? ?????????????, ???????? ??
??? LONG ? LOB ?????? - ???????? ?? ????????????? ?????????? -
collections of objects - ?????????? ?????????? ????? ?? ????????? ?? ?????
????? ?? ??????? ??? ?????????.
5???????? ????? ?? ?????? ?????????
- ????????????
- ODCI Index ?????????
- ?????????
- Indextypes
- ??????????
- ODCI Statistics Interface
6ODCI Index ?????????
- Index Definition methods
- ODCIIndexCreate
- ODCIIndexAlter
- ODCIIndexTruncate
- ODCIIndexDrop
- Index Maintenance methods
- ODCIIndexInsert
- ODCIIndexUpdate
- ODCIIndexDelete
7ODCI Index ?????????
- Index Scan methods
- ODCIIndexStart
- ODCIIndexFetch
- ODCIIndexClose
- Index Metadata method
- ODCIIndexGetMetadata
8?????????
- ??? ???????? ?????? ?? ???????? ????????????
????? ??????????? ? ????????? - ? ?????? ?? WITH INDEX CONTEXT, SCAN CONTEXT ??
????????? ??? ???????????? ?????????? ??
????????? ????? ?? ??????? ??? ?????? ? ??????
???????
9Indextypes
- ??????????? ?? INDEXTYPE ? ??????????
???????????? ?????? ??? ???????????? ?? ??????
?????? ???. - ?????? ?? ?????? ?? ????????? ????? ?? ??????? ?
???? ??? ?????? ? ???????? ?? ????????? ?? ?????
?? ?????????? ????????? ?? ???????.
10?????????? ?? ????????
- CREATE TYPE DomainIndexMethods
- (
- FUNCTION ODCIIndexCreate(...) RETURN NUMBER,
- ...
- )
- CREATE TYPE BODY DomainIndexMethods
- (
- ...
- )
11?????????? ?? ????????
- CREATE FUNCTION TextContains (Text IN VARCHAR2,
- Key IN VARCHAR2, indexctx IN ODCIIndexCtx,
- scanctx IN OUT TextIndexMethods, scanflg IN
NUMBER) - RETURN NUMBER AS
- BEGIN
- ...
- END TextContains
- CREATE OPERATOR Contains
- BINDING (VARCHAR2, VARCHAR2)
- RETURN NUMBER
- WITH INDEX CONTEXT,
- SCAN CONTEXT TextIndexMethods
- USING TextContains
12?????????? ?? Indextype
- CREATE INDEXTYPE TextIndexType
- FOR Contains (VARCHAR2, VARCHAR2)
- USING TextIndexMethods
13????????? ?? ?????? ??????
- CREATE INDEX i_test_ctx
- ON test_table(text)
- INDEXTYPE IS CTXSYS.CONTEXT
- PARAMETERS ('')
14??????????? ?? CBO
- ODCIStats ?????????
- ODCIStatsCollect
- ODCIStatsDelete
- ODCIStatsSelectivity
- ODCIStatsFunctionCost
- ODCIStatsIndexCost
- ASSOCIATE STATISTICS WITH ... USING
15Oracle Text ???????????
16Datastore
DIRECT_DATASTORE ????? ?? ??????????? ?? ?????? ?? ??? VARCHAR2, CHAR, CLOB, BLOB, BFILE ??? XMLType
MULTI_COLUMN_DATASTORE ??????? ?????? ?? ?????????? ? ?? ?????????? ???? ???? ????
DETAIL_DATASTORE ???? ?????????? ?? ??????????? ?? master-detail ???????
FILE_DATASTORE ?????? ?? ??????? ?? ??????? ?? ????????????? ???????
NESTED_DATASTORE ???? ?????????? ?? ??????????? ?? nested ???????
URL_DATASTORE ?????? ?? ??????? ?? ????????? URL
USER_DATASTORE ?????? ?? ??????????? ?? ????????? ?? ????????????? ?????????
17Filter
NULL_FILTER ?? ?? ????????? ?????????????? ?? ??????
INSO_FILTER ??????? ?? ?????? ? ?????? ?? ??????????? ?? ???????????
CHARSET_FILTER ??????????? ?? ???????? ??????? ?? ?????? ??? ???? ?? ??????
18Sectioner
NULL_SECTION_GROUP ?????????? ???? ????????? ? ????????
BASIC_SECTION_GROUP ?????????? ????? ?? ???? ltTAGgt lt/TAGgt
HTML_SECTION_GROUP ?????????? HTML
XML_SECTION_GROUP ?????????? XML
AUTO_SECTION_GROUP ??????? ? ?? xml_section_group ??????????? ?????. ??????????? ?????????? ???????? ? ?.?.
PATH_SECTION_GROUP ??????? ?? auto_section_group. ????????? ???????????? ?? INPATH ? HASPATH ??? ???? ?? ???????. ???? ?????????????? ? Oracle Text
NEWS_SECTION_GROUP ?????????? newsgrops (RFC 1036)
19Lexer
- ??????? ????????? ????? ?? ???? (tokens) ??????
????? - ????????? ?????? ?????? ????????? ?????????
?????? ? ?????? ?????? (tokens) ?? ???????????
20Indexing Engine
- ????????? ???????????? ?? ??????? ?
?????????????? ? ? ??????? ? ????????? - ???????? ??????? ??? stopwords ?? ?? ????????
????? ????????? ? ?????????????? ???? - ???????? wordlist ?? ?? ????????
- ??? stemmer ?? ?? ???????? ?? ?????????? ????????
?? ?????? - ????????? ?? fuzzy ?????????
- ????????? ?? prefix ?????????????
- ?????????? ???? ???? ??? wildcard expansion
21Oracle TextIndex
- ????? ?? ??????? ? ????? ?? ?????????
???????????? ????????? ??? ??????? ?? ??????????? - ??????????? ?? ????????? ?? ????????? ??
?????????? ?????? ???????
22CONTEXT ???????
- ??????????
- ????? ????? ?? ??????? ?? ???????
- ???????? ?? ??????? ? ????????? ? ???????? ??
????????????? ????? - ???????????
- ?? ?? ?????????????
- ?????????? ? ?? ?? ???????????
23????????? ?? ???????
- ?????????????? ?????? ?? Oracle Server
- Oracle 8.1.7.3.0
- ??? ???????? ???????? ? INSO_FILTER
- Oracle 9.0.1.3.0
- ???????????
- ?? ??????? ????? ???????
- SOUNDEX, STEM
24????????? ?? ??????
- CREATE INDEX i_text_ctx ON news(text)
- INDEXTYPE IS CTXSYS.CONTEXT
- PARAMETERS ('FILTER CTXSYS.NULL_FILTER
- SECTION GROUP CTXSYS.HTML_SECTION_GROUP')
25???-????? ?????????? ????????? ?? ???????
AND ????????? ?, ????? ??-??????? ?????
OR ????????? ???, ????? ??-???????? ?????
NOT ????????? ??
ACCUMULATE , ??????? ? ?? ???, ????????? ??????? ?? ????????? ????
, _ ???????? ???? ? LIKE
NEAR (????????) ??????? ???? ?????? ???? ?? ????? ?? ?????? ????
WITHIN ????????? ??????? ??? ??????? ?? ?????? ??????
( ) ??????? ?????????????????? ?? ??????????
?????? ???????? ?????????
26???????? ?????? ?? ???????
- ???????? ????????
- ?????? (????????_ ??????)3
- ????? ???? ??????
- ???? (?????, ?????, ??????)
- near ((????, ?????), 3, TRUE)
- (??????????? ?????) WITHIN title
- (??????????? ?????) WITHIN PARAGRAPH
- (??????????? ?????) WITHIN SENTENCE
27??????? ??? ???????
- SELECT text, score(1) score FROM news
- WHERE contains(text, '??????', 1) gt 0
- ORDER BY score DESC
28CTXCAT ???????
- ??????????
- ?????????? ?????????? ?? ????????????? ?????? ???
??????? - ???????????? ??
- ?? ?? ????????????
- ???????????
- ????? ?? ?????????? 5-10 ???? ??????? ??
????????????? ????? - ??-????? ?? ????????
- ???????? ????? ?? ???????? ?? ???????
29?????? ? index set
- ? ctx_ddl ?? ??????? ???????? ?????????
- create_index_set(set_name)
- add_index(set_name, column_list)
- remove_index(set_name, column_list)
- drop_index_set(set_name)
30????????? ?? ???????
- begin
- ctx_ddl.create_index_set('item_set')
- ctx_ddl.add_index('item_set', 'price')
- end
- CREATE INDEX i_items_cat ON items(name)
- INDEXTYPE IS CTXSYS.CTXCAT
- PARAMETERS ('INDEX SET item_set')
31????????? ????????? ?? ??????? ? ???????
AND ltspacegt a b c
OR a b c
NOT ltspacegt- a b -c
PHRASE " " "a b" c
() (a b) c
32??????? ? ???????
- SELECT name, price FROM items WHERE
catsearch(name, '?????', - 'price lt 500 order by price') gt
0
33CTXRULE ???????
- ????????? ?? ?? ?????????????? ?? ????????
- ??????? ???? ? ?????? ?? ??? VARCHAR2 ? CLOB
- ????????? ??????? ? ????????????? ?????? ??
???????