Creating the index at end of book
I am looking at how to finish my first cook book and realize one of the last touches is to create an index of the terms mentioned in the book. I'm not done yet, so the pages are shifting around a lot as I finish up, so I see there is no point in doing this yet.
I am searching in the forums and the only threads I found in relation to this are pretty dated. The only solution that seems to be discussed is indexbrutal / now Indexmatic on the indiscripts website. I am reading some of the docs, looks a bit complicated to setup. It also doesn't mention compatibility with the current version I am working with (CC). It says "CS5+"...
From what I see, first you have to create your own list of words you want to index, thats fine, I will do that when its time. However, for me the bulk of the work is to assemble the references to each page its on. Is there any built in or more current methods for creating the index at the back of the book?
That would work, but yeah you would think there would be a way to address this more efficiently.
It would be nice to see a bit more sophistication in the panel. It seems to help you index all occurrences of the word but only if you do so when you first enter the word. What if you add more content?
I ran into this concept as well when defining sections. If you edit the pages, the section remains on the page you defined it. I would like to anchor it to the heading on the page it relates to, in case that heading moves, the section would move as well. It seems there as well, its not worth doing this until you are dont with the content of the book. Seems kind of clunky to me.. what about revisions & "2nd editions"... looks to me like you would be best to delete the sections, TOC and index and start over.
Similar Messages
-
Please help me create the indexes for this XML
Hi Mark and others,
What is the way to create the correct index for this kind of XML (I posted earlier)? I created the indexes without using those prefixes without any problems but they do not seem to be used during processing. For 300 statutes, it took about 10 minutes! For the smplier verion, I created indexes and it took no more than 30 seconds to process more than 4000 statutes.
<AllStatuteQueryResponse xmlns="http://crimnet.state.mn.us/mnjustice/statute/service/3.0">
<ns1:Statutes xmlns:ns1="http://crimnet.state.mn.us/mnjustice/statute/messages/3.0">
<ns1:Statutes>
<ns2:StatuteId xmlns:ns2="http://crimnet.state.mn.us/mnjustice/statute/3.0">1</ns2:StatuteId>
<ns3:Chapter xmlns:ns3="http://crimnet.state.mn.us/mnjustice/statute/3.0">84</ns3:Chapter>
<ns4:Section xmlns:ns4="http://crimnet.state.mn.us/mnjustice/statute/3.0">82</ns4:Section>
<ns5:Subdivision xmlns:ns5="http://crimnet.state.mn.us/mnjustice/statute/3.0">1a</ns5:Subdivision>
<ns6:Year xmlns:ns6="http://crimnet.state.mn.us/mnjustice/statute/3.0">0</ns6:Year>
<ns7:LegislativeSessionCode xmlns:ns7="http://crimnet.state.mn.us/mnjustice/statute/3.0">
<ns7:StatuteCode>
<ns7:code>4</ns7:code>
<ns7:description>4</ns7:description>
</ns7:StatuteCode>
</ns7:LegislativeSessionCode>
<ns8:SessionTextIndicator xmlns:ns8="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns8:SessionTextIndicator>
<ns9:HeadNoteIndicator xmlns:ns9="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns9:HeadNoteIndicator>
<ns10:EffectiveDate xmlns:ns10="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns10:EffectiveDate>
<ns11:EnactmentDate xmlns:ns11="http://crimnet.state.mn.us/mnjustice/statute/3.0">1859-01-01</ns11:EnactmentDate>
<ns12:RepealedIndicator xmlns:ns12="http://crimnet.state.mn.us/mnjustice/statute/3.0">false</ns12:RepealedIndicator>
<j:DocumentLocationURI xmlns:j="http://www.it.ojp.gov/jxdm/3.0.2">
<j:ID xsi:type="j:TextType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">http://www.revisor.leg.state.mn.us/stats/84/82.html</j:ID>
</j:DocumentLocationURI>
<ns13:SummaryDescriptionText xmlns:ns13="http://crimnet.state.mn.us/mnjustice/statute/3.0">Snowmobiles-Snowmobile registration</ns13:SummaryDescriptionText>
<ns14:StatuteFunction xmlns:ns14="http://crimnet.state.mn.us/mnjustice/statute/3.0">
<ns14:StatuteIntegrationId>1</ns14:StatuteIntegrationId>
Thanks!
BenHi Mark, here is the schema. I did not register the schema, because when I processed the simpler version, I did not either and I just created the indexes. I did not create an VARRAY in the table. The DDL is simply create table CStatute_XML(id number, xmldoc xmltype).
Schema:
<?xml version="1.0" encoding="UTF-8"?>
<!-- CriMNet -->
<!-- Minnesota Criminal Justice Statute Web Service Data Dictionary -->
<!-- Dave Everson -->
<!-- Version 3.0 -->
<xsd:schema targetNamespace="http://crimnet.state.mn.us/mnjustice/statute/3.0" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://crimnet.state.mn.us/mnjustice/statute/3.0">
<xsd:element name="StatuteCode">
<xsd:annotation>
<xsd:documentation>
This complex type is a generic structure representing code value sets defined in the Minnesota Criminal Justice Statute Service.
A single element of the value set contains both a code value (e.g. F) and a description (e.g. Felony).
The following concepts within the MNCJSS are represented by this complex type:
OffenseSummary
OffenseSummarySeverityLevel
LegislativeSession
Function
OffenseLevel
OffenseSeverityLevel
DetailedOffenseCode
GeneralOffenseCode
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="code" type="xsd:string"/>
<xsd:element name="description" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="StatuteId" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>Primary Key reference to Minnesota Criminal Justice Statute Service disseminated by CriMNet</xsd:documentation>
<xsd:appinfo>Statute.statuteId</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="StatuteIntegrationId" type="xsd:integer">
<xsd:annotation>
<xsd:documentation>Primary Key reference to the StatuteFunction object within the Minnesota Criminal Justice Statute Service disseminated by CriMNet</xsd:documentation>
<xsd:appinfo>StatuteFunction.statuteIntegrationId</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="FunctionCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteFunction.Function</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="OffenseSummaryCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteFunction.OffenseSummary</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="OffenseSummarySeverityLevelCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteFunction.OffenseSummary.OffenseSummarySeverityLevel</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="OffenseLevelCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteFunction.OffenseLevel</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="OffenseSeverityLevelCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteFunction.OffenseSeverityLevel</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="LegislativeSessionCode">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteChapterSection.LegislativeSession</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GeneralOffenseCode" nillable="true">
<xsd:annotation>
<xsd:documentation>An integer (1-9) identifier of a general statute category code used for statistical analysis.</xsd:documentation>
<xsd:appinfo>StatuteFunction.DetailedOffenseCode.GeneralOffenseCode</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DetailedOffenseCode" nillable="true">
<xsd:annotation>
<xsd:documentation>An identification number associated with a statute offense type in the form of nnn.nnn. From a list of 350. Corresponds to the StatuteOffinseTypeText.</xsd:documentation>
<xsd:appinfo>StatuteFunction.DetailedOffenseCode</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteCode"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Chapter" type="xsd:string">
<xsd:annotation>
<xsd:documentation>A numeric identifier of a chapter within a statute.</xsd:documentation>
<xsd:appinfo>Statute.chapter; StatuteChapterSection.chapter</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Section" type="xsd:string" nillable="true">
<xsd:annotation>
<xsd:documentation>An integer number identifier of a section of a chapter of a statute.</xsd:documentation>
<xsd:appinfo>Statute.section; StatuteChapterSection.section</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Subdivision" type="xsd:string" nillable="true">
<xsd:annotation>
<xsd:documentation>An identifier of a subdivision within a code book.</xsd:documentation>
<xsd:appinfo>Statute.subdivision</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="HeadNoteIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteChapterSection.headNote</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Year" type="xsd:int">
<xsd:annotation>
<xsd:documentation>TBD</xsd:documentation>
<xsd:appinfo>StatuteChapterSection.year</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="EffectiveDate" type="xsd:date" nillable="true">
<xsd:annotation>
<xsd:documentation>The date a statute came into effect</xsd:documentation>
<xsd:appinfo>Statute.effectiveDate</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="ExpirationDate" type="xsd:date" nillable="true">
<xsd:annotation>
<xsd:documentation>The date a statute was not longer effective.</xsd:documentation>
<xsd:appinfo>Statute.effectiveDate</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="EnactmentDate" type="xsd:date" nillable="true">
<xsd:annotation>
<xsd:documentation>A date a statute was signed into law.</xsd:documentation>
<xsd:appinfo>Statute.enactmentDate</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="RepealedIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>A date a statute number was repealed, amended, or renumbered.</xsd:documentation>
<xsd:appinfo>Statute.repealedFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="HeadNote" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>Statute.headNote</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="SummaryDescriptionText" type="xsd:string" nillable="true">
<xsd:annotation>
<xsd:documentation>A long description of a statute.</xsd:documentation>
<xsd:appinfo>Statute.summaryText</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="LegislativeText" type="xsd:string" nillable="true">
<xsd:annotation>
<xsd:documentation>The legislative of a statute.</xsd:documentation>
<xsd:appinfo>StatuteChapterSection.legislativeText</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="SessionTextIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteChapterSection.sessionTextFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="FunctionText" type="xsd:string" nillable="true">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteFunction.functionText</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="JuvenileOnlyIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>An indicator identifying whether a statute applies to juveniles only.</xsd:documentation>
<xsd:appinfo>StatuteFunction.juvenileOnlyFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="CrimeOfViolenceIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>An indicator identifying whether a statute is a crime of violence under Minnesota statute 624 section 712 subdivision 5.</xsd:documentation>
<xsd:appinfo>StatuteFunction.crimeOfViolenceFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="EnhanceableIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>An indicator identifying whether the charges are enhanceable by specific factors (the definition of enhanceable is pending review).</xsd:documentation>
<xsd:appinfo>StatuteFunction.enhanceableFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="TargetedMisdemeanorIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation>An indicator identifying whether a statute is a targeted misdemeanor as defined in Minnnesota Statute 299C.10, subdivision. 1(d).</xsd:documentation>
<xsd:appinfo>StatuteFunction.targetedMisdemeanorFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="MandatoryAppearanceIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteFunction.mandatoryAppearanceFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="RegisterableOffenseIndicator" type="xsd:boolean">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteFunction.registerableOffenseFlag</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="StatuteFunction">
<xsd:annotation>
<xsd:documentation></xsd:documentation>
<xsd:appinfo>StatuteFunction</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="StatuteIntegrationId" />
<xsd:element ref="FunctionCode"/>
<xsd:element ref="FunctionText" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="CrimeOfViolenceIndicator"/>
<xsd:element ref="EnhanceableIndicator"/>
<xsd:element ref="TargetedMisdemeanorIndicator"/>
<xsd:element ref="RegisterableOffenseIndicator"/>
<xsd:element ref="JuvenileOnlyIndicator"/>
<xsd:element ref="MandatoryAppearanceIndicator"/>
<xsd:element ref="OffenseLevelCode" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="GeneralOffenseCode" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="DetailedOffenseCode" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="OffenseSummaryCode" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="OffenseSummarySeverityLevelCode" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="OffenseSeverityLevelCode" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Query:
first part to get the statute ID numbers,
insert into CriMNet_Statutes
select cs.StatuteId, cs.Chapter, cs.Section, cs.Subdivision, cs.Year, cs.LegCode,
cs.LegDesc, cs.SessionTextIndicator, cs.HeadNoteIndicator,
to_date(cs.EffectiveDate, 'yyyy/mm/dd') as eDate,
to_date(cs.EnactmentDate, 'yyyy/mm/dd') as EnDate,
cs.RepealedIndicator, cs.SummaryDescriptionText
from Cstatute_xml,
xmltable
xmlnamespaces
default 'http://crimnet.state.mn.us/mnjustice/statute/3.0',
--- or 'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs"
'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns1"
'/cx:AllStatuteQueryResponse/ns1:Statutes/ns1:Statutes'
--- '/AllStatuteQueryResponse//ns:Statutes' --- produces an extra row
passing SXMLDOC
columns
StatuteId varchar2(10) path '//StatuteId',
Chapter varchar2(10) path '//Chapter',
Section varchar2(20) path '//Section',
Subdivision varchar2(20) path '//Subdivision',
Year number path '//Year',
LegCode varchar2(10) path '//LegislativeSessionCode/StatuteCode/code',
LegDesc varchar2(10) path '//LegislativeSessionCode/StatuteCode/description',
SessionTextIndicator varchar2(10) path '//SessionTextIndicator',
HeadNoteIndicator varchar2(10) path '//HeadNoteIndicator',
EffectiveDate varchar2(15) path '//EffectiveDate',
EnactmentDate varchar2(15) path '//EnactmentDate',
RepealedIndicator varchar2(10) path '//RepealedIndicator',
SummaryDescriptionText varchar2(150) path '//SummaryDescriptionText'
) cs;
Second part to get the function code for each statute ID (one ID to many function codes).
declare
v_statuteID number;
v_statuteIDC varchar2(10);
cursor c_cmns is
select statuteid from CriMNet_Statutes;
begin
for v_cmns in c_cmns loop
v_StatuteID := v_cmns.StatuteID;
v_statuteIDC := to_char(v_statuteID);
insert into CriMNet_Statute_Function
select v_StatuteID, cf.* from Cstatute_xml,
xmltable
xmlnamespaces
'http://crimnet.state.mn.us/mnjustice/statute/3.0' as "cs",
'http://crimnet.state.mn.us/mnjustice/statute/service/3.0' as "cx",
'http://crimnet.state.mn.us/mnjustice/statute/messages/3.0' as "ns1"
'for $cxm in /cx:AllStatuteQueryResponse/ns1:Statutes/ns1:Statutes[cs:StatuteId = $val/pStatuteId]/cs:StatuteFunction
return
<cs:CSFunction>
<cs:StatuteIntegrationId>{$cxm//cs:StatuteIntegrationId}</cs:StatuteIntegrationId>
<cs:FunctionCode>{$cxm//cs:FunctionCode/cs:StatuteCode/cs:code}</cs:FunctionCode>
<cs:FunctionDesc>{$cxm//cs:FunctionCode/cs:StatuteCode/cs:description}</cs:FunctionDesc>
<cs:CrimeOfViolenceIndicator>{$cxm//cs:CrimeOfViolenceIndicator}</cs:CrimeOfViolenceIndicator>
<cs:EnhanceableIndicator>{$cxm//cs:EnhanceableIndicator}</cs:EnhanceableIndicator>
<cs:TargetedMisdIndicator>{$cxm//cs:TargetedMisdemeanorIndicator}</cs:TargetedMisdIndicator>
<cs:RegisterableOffIndicator>{$cxm//cs:RegisterableOffenseIndicator}</cs:RegisterableOffIndicator>
<cs:JuvenileOnlyIndicator>{$cxm//cs:JuvenileOnlyIndicator}</cs:JuvenileOnlyIndicator>
<cs:MandatoryAppIndicator>{$cxm//cs:MandatoryAppearanceIndicator}</cs:MandatoryAppIndicator>
<cs:OffenseLevelCode>{$cxm//cs:OffenseLevelCode/cs:StatuteCode/cs:code}</cs:OffenseLevelCode>
<cs:OffenseLevelDesc>{$cxm//cs:OffenseLevelCode/cs:StatuteCode/cs:description}</cs:OffenseLevelDesc>
<cs:GeneralOffenseCode>{$cxm//cs:GeneralOffenseCode/cs:StatuteCode/cs:code}</cs:GeneralOffenseCode>
<cs:GeneralOffenseDesc>{$cxm//cs:GeneralOffenseCode/cs:StatuteCode/cs:description}</cs:GeneralOffenseDesc>
<cs:DetailedOffenseCode>{$cxm//cs:DetailedOffenseCode/cs:StatuteCode/cs:code}</cs:DetailedOffenseCode>
<cs:DetailedOffenseDesc>{$cxm//cs:DetailedOffenseCode/cs:StatuteCode/cs:description}</cs:DetailedOffenseDesc>
<cs:OffenseSummaryCode>{$cxm//cs:OffenseSummaryCode/cs:StatuteCode/cs:code}</cs:OffenseSummaryCode>
<cs:OffenseSummaryDesc>{$cxm//cs:OffenseSummaryCode/cs:StatuteCode/cs:description}</cs:OffenseSummaryDesc>
<cs:OffenseSumSeverityLevelCode>{$cxm//cs:OffenseSummarySeverityLevelCode/cs:StatuteCode/cs:code}</cs:OffenseSumSeverityLevelCode>
<cs:OffenseSumSeverityLevelDesc>{$cxm//cs:OffenseSummarySeverityLevelCode/cs:StatuteCode/cs:description}</cs:OffenseSumSeverityLevelDesc>
</cs:CSFunction>'
passing SXMLDOC, xmlelement("pStatuteId", v_statuteIDC) as "val"
columns
StatuteIntegrationId number path '/cs:CSFunction/cs:StatuteIntegrationId',
FunctionCode varchar2(10) path '/cs:CSFunction/cs:FunctionCode',
FunctionDesc varchar2(30) path '/cs:CSFunction/cs:FunctionDesc',
CrimeOfViolenceIndicator varchar2(10) path '/cs:CSFunction/cs:CrimeOfViolenceIndicator',
EnhanceableIndicator varchar2(10) path '/cs:CSFunction/cs:EnhanceableIndicator',
TargetedMisdIndicator varchar2(10) path '/cs:CSFunction/cs:TargetedMisdIndicator',
RegisterableOffIndicator varchar2(10) path '/cs:CSFunction/cs:RegisterableOffIndicator',
JuvenileOnlyIndicator varchar2(10) path '/cs:CSFunction/cs:JuvenileOnlyIndicator',
MandatoryAppIndicator varchar2(10) path '/cs:CSFunction/cs:MandatoryAppIndicator',
OffenseLevelCode varchar2(10) path '/cs:CSFunction/cs:OffenseLevelCode',
OffenseLevelDesc varchar2(40) path '/cs:CSFunction/cs:OffenseLevelDesc',
GeneralOffenseCode varchar2(10) path '/cs:CSFunction/cs:GeneralOffenseCode',
GeneralOffenseDesc varchar2(60) path '/cs:CSFunction/cs:GeneralOffenseDesc',
DetailedOffenseCode varchar2(10) path '/cs:CSFunction/cs:DetailedOffenseCode',
DetailedOffenseDesc varchar2(60) path '/cs:CSFunction/cs:DetailedOffenseDesc',
OffenseSummaryCode varchar2(10) path '/cs:CSFunction/cs:OffenseSummaryCode',
OffenseSummaryDesc varchar2(60) path '/cs:CSFunction/cs:OffenseSummaryDesc',
OffenseSumSeverityLevelCode varchar2(10) path '/cs:CSFunction/cs:OffenseSumSeverityLevelCode',
OffenseSumSeverityLevelDesc varchar2(30) path '/cs:CSFunction/cs:OffenseSumSeverityLevelDesc'
) cf;
---dbms_output.put_line('Statute ID = ' || v_StatuteID);
end loop;
end;
You mentioned that I should include the namespace in the existsnode function but I did not. I am going to try after including it. Thanks.
Ben -
Creating the index takes forever
Hi,
I'm trying to index ~1100 PDF documents, who size varies between 20KB and 4MB, those PDF are stored in two directories on our Web server, so I use a URL_DATASTORE to get them. I have a column that contains the correct URL to the PDF, the column is a VARCHAR2(2000). 55% of documents are in French, the 45% remaining are English documents. I created this set of preferences :
begin
ctx_ddl.create_preference('AAPDF_DATA_PREF','URL_DATASTORE');
ctx_ddl.set_attribute('AAPDF_DATA_PREF','NO_PROXY','acaiq.com');
ctx_ddl.set_attribute('AAPDF_DATA_PREF','Timeout','60');
end;
begin
ctx_ddl.create_preference('LEXIQUE_ANGLAIS','BASIC_LEXER');
ctx_ddl.set_attribute('LEXIQUE_ANGLAIS','index_themes','no');
ctx_ddl.set_attribute('LEXIQUE_ANGLAIS','index_text','yes');
ctx_ddl.set_attribute('LEXIQUE_ANGLAIS','theme_language','english');
end;
begin
ctx_ddl.create_preference('LEXIQUE_FRANCAIS','BASIC_LEXER');
ctx_ddl.set_attribute('LEXIQUE_FRANCAIS','index_themes','no');
ctx_ddl.set_attribute('LEXIQUE_FRANCAIS','index_text','yes');
ctx_ddl.set_attribute('LEXIQUE_FRANCAIS','theme_language','french');
end;
begin
ctx_ddl.create_preference('LEXIQUE_GLOBAL','MULTI_LEXER');
ctx_ddl.add_sub_lexer('LEXIQUE_GLOBAL','DEFAULT','LEXIQUE_ANGLAIS');
ctx_ddl.add_sub_lexer('LEXIQUE_GLOBAL','french','LEXIQUE_FRANCAIS','fre');
end;
begin
ctx_ddl.create_preference('PREF_FUZZY', 'BASIC_WORDLIST');
ctx_ddl.set_attribute('PREF_FUZZY','FUZZY_MATCH','FRENCH');
ctx_ddl.set_attribute('PREF_FUZZY','FUZZY_SCORE','30');
ctx_ddl.set_attribute('PREF_FUZZY','FUZZY_NUMRESULTS','200');
ctx_ddl.set_attribute('PREF_FUZZY','SUBSTRING_INDEX','TRUE');
ctx_ddl.set_attribute('PREF_FUZZY','STEMMER','FRENCH');
end;
And I created the index with this DML :
CREATE INDEX ACAIQ.aapdf_index ON AA_PDF(AAPDF_CONTENU) INDEXTYPE IS ctxsys.context PARALLEL 1 PARAMETERS ('datastore AAPDF_DATA_PREF lexer LEXIQUE_GLOBAL language column AAPDF_LANGUE_ISO wordlist PREF_FUZZY memory 10M');
The problem is that it takes forever to create the index. I started the create process yesterday after lunch, and it still running :-/ I looked at my Web server logs and I do see my Oracle server fetching the PDF, but it fetch ~12 PDF per hour.
I'm doing this on our test server, it's a P4 1.4 Ghz with RedHat Linux 8 and Oracle 9i 9.2.02. It's not a fast server, but still I don't think it's normal to take 24 hours to index about 1 GB of data.I recreated the index with a 50M memory parameter instead of 10M. It don't speed up the process, in 40 minutes it only indexed 17 documents.
vmstat stats when indexing the PDF documents :
# vmstat -n 15
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
1 2 0 116104 6796 18120 489684 0 0 3 0 3 7 4 7 2
0 3 0 116104 6776 18200 489256 0 0 62 1500 671 317 48 3 49
1 1 0 116104 7084 18216 489728 0 0 37 1578 673 333 44 3 53
0 1 0 116104 6776 18256 489256 0 0 24 1577 669 322 50 3 47
1 0 0 116104 6908 18300 489876 0 0 18 1375 662 305 33 3 65
0 1 0 116104 7000 18328 488136 0 0 19 1425 662 314 33 3 64
0 1 0 116104 7812 18356 488892 0 0 31 1066 609 207 44 2 53
1 1 0 116104 6776 18380 489168 1 0 19 1198 648 285 19 2 79
0 1 0 116104 6776 18412 488212 0 0 23 1193 627 244 41 2 57
2 0 0 116104 6776 18432 489324 0 0 34 1524 664 313 48 3 49
1 0 0 116104 6780 18456 488572 0 0 26 1430 660 308 39 3 58
2 0 0 116104 6776 18500 488424 0 0 32 1484 667 316 45 3 52
1 1 0 116104 6776 18516 487488 0 0 11 1301 650 287 28 3 69
0 1 0 116104 6776 18560 488316 0 0 35 1183 637 264 30 2 68
0 1 0 116104 6776 18584 487344 0 0 34 1363 645 276 47 3 50
2 0 0 116104 6776 18604 488424 0 0 22 1437 660 306 39 3 58 -
What is the difference between the drop and create the index and rebuild index ?
Hi All,
what is the difference between drop and create index & rebuild index ? i think both are same...Please clarify if both are same or any difference...
Thanks in Advance,
rupBoth are same. Rebuilding an index drops and re-creates the index.
Ref:
SSMS - https://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx
TSQL - https://msdn.microsoft.com/en-us/library/ms188388.aspx
I would suggest you to also refer one of the best index maintenance script as below:
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html -
Question about create the index in shp2sdo...
hi, i'm new in oracle and gis
when i use shp2sdo, to convert the shapefile to oracle spatial.. i have problem in create the index...
i have a error when i execute the statement like this :
SQL> select mdsys.sdo_tune.estimate_tiling_level('peta','geom',10000,'avg_gid_extent') from dual;
why ??
the error is table or vies does not exist...
why ?? what i must to do ???SQL> select mdsys.sdo_tune.estimate_tiling_level('peta','geom',10000,'avg_gid_extent') from dual; For a start, put the table and column name in upper case - Oracle stores object names in capitals in the data dictionary, regardless of the case that was used to create them.
-
Please help me to create the index
hi gurus,
i have one table with one raw datatype column. It will stores encrypted data.
I created a view which shows decryted data of the above table. I need create an index on decrypted data for avoiding full table scan. Please help me to create the index.
thanks in advance..Perhaps you could create a function-based index, although if you're going to make it so easy to read the decrypted version I'm not sure why you want to encrypt it in the first place.
-
I am putting together a book. InDesign is all new to me. I can't find any info on how to create an index at the end of the book.
Check here: InDesign Help | Creating an index
-
SPLIT PARTITION creating the index in different Table Space
I am splitting the table every month. After splitting the Index is also Splitting. (It is natural). But it is creating in default table Space.
I want to split INDEX and creating into the index table space “ACTIVITY_IND_TS_1”
CREATE TABLE PART
PK_KEY NUMBER(15) NOT NULL,
PK_ID NUMBER(1) NOT NULL
TABLESPACE USERS PARTITION BY RANGE (PK_ID)
PARTITION PK_ID_PRD1 VALUES LESS THAN (1)
LOGGING
TABLESPACE ACTIVITY_TAB_TS_1,
PARTITION PK_ID_PRD2 VALUES LESS THAN (2)
LOGGING
TABLESPACE ACTIVITY_TAB_TS_1,
PARTITION PK_ID_PRD3 VALUES LESS THAN (3)
LOGGING
TABLESPACE ACTIVITY_TAB_TS_1,
PARTITION PK_ID_PRD4 VALUES LESS THAN (4)
LOGGING
TABLESPACE ACTIVITY_TAB_TS_1,
PARTITION PK_ID_PRD_MAXVALUE VALUES LESS THAN (MAXVALUE)
LOGGING
TABLESPACE ACTIVITY_TAB_TS_1
NOCACHE
NOPARALLEL
ENABLE ROW MOVEMENT;
CREATE INDEX PART_IX ON PART(PK_ID)
LOCAL (PARTITION PK_ID_PRD1 TABLESPACE ACTIVITY_IND_TS_1,
PARTITION PK_ID_PRD2 TABLESPACE ACTIVITY_IND_TS_1,
PARTITION PK_ID_PRD3 TABLESPACE ACTIVITY_IND_TS_1,
PARTITION PK_ID_PRD4 TABLESPACE ACTIVITY_IND_TS_1,
PARTITION PK_ID_PRD_MAXVALUE TABLESPACE ACTIVITY_IND_TS_1)
PARALLEL
NOLOGGING;
select unique tablespace_name from user_tab_partitions; -- ACTIVITY_TAB_TS_1
select unique tablespace_name from user_ind_partitions; -- ACTIVITY_IND_TS_1
ALTER TABLE PART SPLIT PARTITION PK_ID_PRD_MAXVALUE
AT (5) INTO (PARTITION PK_ID_PRD5, PARTITION PK_ID_PRD_MAXVALUE);
select unique tablespace_name from user_tab_partitions; -- ACTIVITY_TAB_TS_1
select unique tablespace_name from user_ind_partitions; -- ACTIVITY_TAB_TS_1 ACTIVITY_IND_TS_1
Edited by: sk123 on May 5, 2009 1:05 PMHello,
Once you split partition you need to rebuild indexes if you want indexes to be in their own tablespaces
ALTER TABLE PART
SPLIT PARTITION PK_ID_PRD_MAXVALUE AT
(6)
INTO (PARTITION PK_ID_PRD5
TABLESPACE ACTIVITY_TAB_TS_1
PARTITION PK_ID_PRD_MAXVALUE);
ALTER INDEX PART_IX
REBUILD PARTITION PK_ID_PRD5
TABLESPACE ACTIVITY_IND_TS_1;
ALTER INDEX PART_IX
REBUILD PARTITION PK_ID_PRD_MAXVALUE
TABLESPACE ACTIVITY_IND_TS_1;Regards -
Oracle intermedia error while creating the index
desc test
no number(2) primary key
name varchar2(20)
SQL> create index tindex on test(name) indextype is ctxsys.context;
create index tindex on test(name) indextype is ctxsys.context
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: ConText error:
ORA-06520: PL/SQL: Error loading external library
ORA-06522: ld.so.1: extprocep_agt1: fatal: relocation error: file
/export/home/oracle8i/OraHome1/ctx/lib/libctxx8.so: symbol ociepgoe: referenced
symbol not found
ORA-06512: at "CTXSYS.DRUE", line 122
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 34
ORA-06512: at line 1
what is the problem ??
i Add an entry in the tnsnames.ora:
extproc_connection_data =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = ipc)
(KEY = DBSID))
(CONNECT_DATA = (SID = ep_agt1)))
and
i Add the following in the listener SID_LIST:
(SID_DESC = (SID_NAME = ep_agt1)
(ORACLE_HOME = /oracle)
(ENVS = LD_LIBRARY_PATH=/oracle/ctx/lib)
(PROGRAM = extproc))
my os is sun solaris intel and oracle version is 8.1.5
nullTry the following:
1. Connect as ctxsys, and perform the following:
SQL> create or replace library dr$libx as '<ORA_HOME>/bin/oractxx8.dll';
2. Check the status of CTXSYS packages:
select object_name, status from user_objects where status like 'IN%';
OBJECT_NAME STATUS
DRIDISP INVALID
3. Re-compile any invalid packages (should be just dridisp) from the .plb file(s) in ?\ctx\admin
SQL> @<ORA_HOME>\ctx\admin\dridisp.plb
Package body created.
SQL> select object_name, status from user_objects where status like 'IN%';
no rows selected
conn test/test
SQL> create index simple_index on simple(text) indextype is ctxsys.context ;
Index created.
Notes
Note1. CONTEXT QUERIES WILL STILL NOT RUN.
SQL> insert into simple values (1, 'the cat sat on the mat') ;
1 row created.
SQL> commit;
Commit complete.
SQL> select pk from simple where contains(text, 'cat') >0 ;
select pk from simple where contains(text, 'cat') >0
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-06550: line 1, column 7:
PLS-00201: identifier 'CTXSYS.DR_REWRITE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Edit <ORA_HOME\admin\orcl\pfile\init.ora
where orcl is your database name
Remove the line "text_enable=true" and bounce the database.
SQL> select pk from simple where contains(text, 'cat') >0 ;
PK
1
Best Regards -
I'm new to Oracle Text, and I did the following on a Oracle 9i DB, and got the error as:
"ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10509: invalid text column: AD_FINALTEXT
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.CATINDEXMETHODS", line 100
Can anyone tell me what's wrong? Thanks a lot.
Steps I did:
CREATE TABLE print_media (
product_id NUMBER(6) PRIMARY KEY,
ad_finaltext CLOB )
INSERT INTO print_media VALUES (2056,
'The TIGER2 2056 mouse pad meets all known industrial standards.')
INSERT INTO print_media VALUES(3106,
'The TIGER2 3106 Keyboard has all the standard features of a keyboard.')
INSERT INTO print_media VALUES(5206,
'The TIGER2 5206 Keyboard includes a built-in mouse.')
COMMIT
CREATE INDEX print_media_ad_tx
ON print_media ( ad_finaltext )
INDEXTYPE IS ctxsys.ctxcatThis is the error you get when the text column is not one of the supported types. But in this case, it is
CLOB, so it should be working -- you're sure that you didn't make the text column an NCLOB by mistake?
NCLOB is not supported. -
What is the "No database index" means when you Creating Secondary Indexes?
HI,
I'm Creating Secondary Indexes in the maintenance screen of the table(se11)
There are three options under "Non-unique Index":
1.Index on all database systems
2.For selected database systems
3.No database index
My questions is :
What do u mean by "No Database Index" and when is it used.
Can anybody plz tell me what's the difference of this three options ?
Here is what i found in the help:
No database index: The index is not created in the database. If you
choose this option for an index that already exists in the database,
it is deleted when you activate this option.Hi,
It is clear from the help documentation,
Here see what the help document says:
Create the index in the database (selection)
Whether an index improves or worsens performance often depends on the database system. You can therefore set whether an index defined in the ABAP Dictionary should be created in the database.
This makes it easier to install a platform-specific customer system.
You can set this option as follows:
1. Index in all database systems: The index is always created in the database.
2. In selected database systems: The index is created depending on the database system used. In this option, you must specify the databases in which the indexes are to be created. You can do this either on an inclusive (list of systems on which it should be created) or an exclusinve (list of systems on which it should not be created) basis. In either case, you can list up to four different database systems.
3. No database index:: The index is not created in the database. If you set this option for an index that already exists in the database, it is deleted when you activate the table in the ABAP Dictionary.
Note: Unique indexes have an extra function, and must therefore always be created in the database. The database system prevents entries or index fields being duplicated. Since programs may rely on this database function, you cannot delete unique indexes from the database.
Hope it helps you,
Regards,
Abhijit G. Borkar -
DSO activation problem after creating the secondary indexes
Hi,
I am facing the problem with DSO activation after creating the secondary indexes.
Compared with Info Cubes there is no functionality available which allows dropping and recreating a secondary index before/after the data activation.
As a workaround I can write a simple report which drops and creates the indexes on database level.
By using a process chain, we can simply insert the drop index report before data activation and the create index report after the data activation process.
Can any body help me step by step procedure or Material to write the programs for delete index and create index reports on DSO object?..
Thanks in advance for your help.
Thanks & Regards,
Balahi,
in BI if you are using the dso for reporting then you can simply chk the settings of dso for SID generation.
no need to create the indexes or delete it.
if the dso is not used for report then no need to use indexes.
Ramesh -
Error while creating the CTXXPATH Index
Hi,
I tried to create the CTXXPATH index on my table, which has XMLTYPE column. But while creating the index i m getting the below error,
Error report:
SQL Error: ORA-29958: fatal error occurred in the execution of ODCIINDEXCREATE routine
ORA-29960: line 1,
DRG-11304: function-based indexes are not supported by this indextype
29958. 00000 - "fatal error occurred in the execution of ODCIINDEXCREATE routine"
*Cause: Failed to successfully execute the ODCIIndexCreate routine.
*Action: Check to see if the routine has been coded correctly.
I m using oracle 11g version. Could anyone please help me in resolving it.Hi,
you can have a look at document "How to Create a Context Index Using a Function [ID 1063279.1]" at Oracle Support. You tried to create a CONTEXT index using a function but a function-based index is not supported. Workaround given in the document is to use a Multi_Column_Datastore.
CTXXPATH is deprecated in Oracle 11.1, better is to use XMLINDEX, see http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/whatsnew.htm.
Herald ten Dam
http://htendam.wordpress.com -
How to make use of the index in my manual within Acrobat
I've created an index in my FrameMaker book and would like it to be of use when it's converted to PDF.
An index is most useful if it's provided in hard copy. How can I make it useful in Acrobat?
Do I do something within Frame or Acrobat or both?
Also, when I convert my document to PDF with bookmarks, a bookmark does not appear for my index.
I have Acrobat 9 Pro.
Thank you!In the book file, right-click the index file and select Set up Standard Index. In the subsequent dialog box, select Create Hypertext Links. Click Set. Update the book.
When you print the book, click PDF Setup. In the Links tab, select Create Named Destinations for All Elements and Paragraphs.
To make the Index appear in the bookmarks, check that its paragraph format style is included in the Include paragraphs list in the PDF setup dialog box.
Hope this helps,
Van -
Call a procedure in a function to create an Index
Hi,
i want to doing a text search and have to create some index
to doing that. I have to choose between create two index according to
what a search i want to doing.
The function, which call the sql-statement to search the text is:
CREATE OR REPLACE FUNCTION SEARCHTEXT(textToSearch IN VARCHAR2)
RETURN utilities.resultset_ft PIPELINED AS
BEGIN
BEGIN
INDEXTEST;
END;
DBMS_OUTPUT.PUT_LINE('get the data');
-- search the Text in the database Documents
FOR i in
(SELECT extract(Document, '/*/*/*/*/location[1]/uri/text()').getStringVal() as location, score(1) as score_nbr
FROM Mydocuments
WHERE contains(Document, textTosearch, 1) > 0
ORDER BY score_nbr)
LOOP
PIPE ROW(i);
END LOOP;
RETURN;
END ;
This function call the procedure "INDEXTEST", which create the index.
CREATE OR REPLACE PROCEDURE INDEXTEST
AS
BEGIN
EXECUTE IMMEDIATE 'CREATE INDEX FTS_INDEX ON Mydocuments (DOCUMENT)' || ' ' ||
'INDEXTYPE IS CTXSYS.CONTEXT' || ' ' ||
'PARAMETERS (''' || 'stoplist Doc_stoplist' || ' ' ||
'section group CTXSYS.PATH_SECTION_GROUP'')';
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(sqlerrm);
END INDEXTEST;
I call the statement:
select *
from TABLE(searchtext('%Let%'))
and i get this error:
Error starting at line 1 in command:
select *
from TABLE(searchtext('%Let%'))
Error report:
SQL Error: ORA-14552: DDL-, Commit- oder Rollback-Vorgang kann innerhalb einer Abfrage oder DML nicht durchgeführt werden
ORA-06512: in "INDEXTEST", Zeile 5
ORA-06512: in "SEARCHTEXT", Zeile 15
14552. 00000 - "cannot perform a DDL, commit or rollback inside a query or DML "
Cause: DDL operations like creation tables, views etc. and transaction<br /><br />control statements such as commit/rollback cannot be performed<br /><br />inside a query or a DML statement.<br /><br />Action: Ensure that the offending operation is not performed or
use autonomous transactions to perform the operation within
the query/DML operation.
<p>
Can someone help me?
</p>
Thanks for helpSo, in answer to your question, how to do this....
Create the necessary indexes before you issue the query to do the search.
Yes, that means you need to have some intermediate steps to do it, but you should be able to control that from your application level.
e.g.
1. User enters search criteria
2. Application processes criteria and creates necessary indexes
3. Application queries the results
4. Application drops the indexes.
Or, alternatively, it may be an idea to have a look at your overall design and solve the issue why you are actually having to try and create indexes on the fly. If the database structure was correct in the first place then you shouldn't have to create any more indexes than the permanent ones you will have already determined.
Maybe you are looking for
-
Cutting and piecing together video files
Hi, I'm currently working on a project where it will be necessary to take small segments of video from several different video files, and piece them all together to make a single video file. This splicing will generally be done in terms of times base
-
I finally was able to get Coldfusion installed with the proper user. I am now trying to run the administrator GUI /CFIDE/administrator/index.cfm and get the message "The Graphing service is not available". Can anyone please shed some light on this fo
-
Trying to put a file into a table
hello i am trying to put a file into a table but a don't know how to do it if somebody knows how to do it please send me an example. thanks a lot
-
Hi all, I would like to change the color of a "Pressed enable button". I see the possibility to change the color under the next option: "Simple Elements ->Buttons ->Standard Buttons ->Standard Backgroud Color" This option supposes changing the color
-
Distorted 3D figures in LabView 2013
Hello everyone. I am new to the forum and have a problem with 3D images. Figures appear incomplete or distorted. I have read that it can be a problem regarding OpenGL settings and the video card in that case I would like to help me set it up. These