You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Max Ekstrom <ma...@yahoo.com> on 2003/01/02 19:35:01 UTC

more questions on indexing

Hi! I've been trying to figure out how to properly index things and it seems
this newsgroup has varying responses to this question. Since I've exhausted my
own approaches, I figured I'd drop you all a line.

Here is what I observe (on win xp, java 1.3, xindice 1.0):
When I create an index, my queries stop returning any results. It doesn't
matter whether the index is created before or after adding data. When the index
is deleted, the query begins operating normally again.

Here's an example of one of my documents:

<?xml version='1.0' encoding='UTF-8'?>
<file xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' version='1'
lastModified='Sun Feb 24 22:12:02 PST 2002'>
  <value id='id0'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Feature'>
    <uid xsi:type='xsd:string'>DUMMY</uid>
    <id id='id1' xsi:type='ns1:ID'>
      <path xsi:type='xsd:string'>/mmmm</path>
    </id>
    <title xsi:type='xsd:string'>mmmm</title>
    <isActive xsi:type='xsd:boolean'>true</isActive>
    <history id='id2' xmlns:ns1='http://www.themindelectric.com/collections/'
xsi:type='ns1:vector'>
      <item id='id3'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1002740612513</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>CREATED</action>
      </item>
      <item id='id4'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1002740652871</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Proposed</action>
        <comment xsi:type='xsd:string'>sdsdsd</comment>
      </item>
      <item id='id5'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1014617381984</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Rejected</action>
        <comment xsi:type='xsd:string'>asdfas</comment>
      </item>
      <item id='id6'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1014617476407</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Proposed</action>
        <comment xsi:type='xsd:string'>love me</comment>
      </item>
      <item id='id7'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1014617487958</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Rejected</action>
        <comment xsi:type='xsd:string'>clearing house</comment>
      </item>
      <item id='id8'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1014617504786</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Proposed</action>
        <comment xsi:type='xsd:string'>clearing house</comment>
      </item>
      <item id='id9'
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
xsi:type='ns1:Action'>
        <timestamp xsi:type='xsd:long'>1014617522484</timestamp>
        <caller xsi:type='xsd:string'>system</caller>
        <action xsi:type='xsd:string'>Rejected</action>
        <comment xsi:type='xsd:string'>clearing house</comment>
      </item>
    </history>
    <workflowState xsi:type='xsd:string'>Rejected</workflowState>
    <summary xsi:type='xsd:string'>wedsad</summary>
    <content xsi:type='xsd:string'><!--<fourohfour:AutoFormat isActive="true"
/>-->asdasd</content>
  </value>
</file>

Specifically: when I create an index with pattern "path", all my query results
vaporize. What am I doing wrong? Is this a bug? How can I index the "path"
elements correctly?


Thanks for any help or advice.

-maX



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: more questions on indexing

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
I don't know whether this is the problem, but unless whatever schema
declares the elements file,value, etc sets them up with
elementFormDefault="unqualified", they will not be valid against that
schema.  I believe the schema spec says that unqualified elements which are
global in the schema are in the targetNamespace of the schema, while
unqualified local elements are in no namespace.  The indexing may get
confused about this.  You could try taking some of the documents and putting
in
  xmlns="<targetnamespaceofschema>"
in the root element and see if you can then recreate the index and try to
retrieve those docs.

Jeff
----- Original Message -----
From: "Max Ekstrom" <ma...@yahoo.com>
To: <xi...@xml.apache.org>
Sent: Wednesday, January 08, 2003 8:13 PM
Subject: Re: more questions on indexing


> Do you think this is the issue? Would it explain the odd behavior? I'm
using
> third-party software to generate my XML (orthogonal persistence using XML
> serialization and deserialization), so I don't have much control over the
> default namespace.
>
> -maX
> --- Jeff Greif <jg...@alumni.princeton.edu> wrote:
> > Are you perhaps missing a declaration of the default namespace in the
> > document root element, e.g. xmlns="some-namespace"?
> >
> > Jeff
> > ----- Original Message -----
> > From: "Max Ekstrom" <ma...@yahoo.com>
> > To: <xi...@xml.apache.org>
> > Sent: Thursday, January 02, 2003 10:35 AM
> > Subject: more questions on indexing
> >
> >
> > > Hi! I've been trying to figure out how to properly index things and it
> > seems
> > > this newsgroup has varying responses to this question. Since I've
> > exhausted my
> > > own approaches, I figured I'd drop you all a line.
> > >
> > > Here is what I observe (on win xp, java 1.3, xindice 1.0):
> > > When I create an index, my queries stop returning any results. It
doesn't
> > > matter whether the index is created before or after adding data. When
the
> > index
> > > is deleted, the query begins operating normally again.
> > >
> > > Here's an example of one of my documents:
> > >
> > > <?xml version='1.0' encoding='UTF-8'?>
> > > <file xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> > > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> > > xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' version='1'
> > > lastModified='Sun Feb 24 22:12:02 PST 2002'>
> > >   <value id='id0'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Feature'>
> > >     <uid xsi:type='xsd:string'>DUMMY</uid>
> > >     <id id='id1' xsi:type='ns1:ID'>
> > >       <path xsi:type='xsd:string'>/mmmm</path>
> > >     </id>
> > >     <title xsi:type='xsd:string'>mmmm</title>
> > >     <isActive xsi:type='xsd:boolean'>true</isActive>
> > >     <history id='id2'
> > xmlns:ns1='http://www.themindelectric.com/collections/'
> > > xsi:type='ns1:vector'>
> > >       <item id='id3'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1002740612513</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>CREATED</action>
> > >       </item>
> > >       <item id='id4'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1002740652871</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Proposed</action>
> > >         <comment xsi:type='xsd:string'>sdsdsd</comment>
> > >       </item>
> > >       <item id='id5'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1014617381984</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Rejected</action>
> > >         <comment xsi:type='xsd:string'>asdfas</comment>
> > >       </item>
> > >       <item id='id6'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1014617476407</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Proposed</action>
> > >         <comment xsi:type='xsd:string'>love me</comment>
> > >       </item>
> > >       <item id='id7'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1014617487958</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Rejected</action>
> > >         <comment xsi:type='xsd:string'>clearing house</comment>
> > >       </item>
> > >       <item id='id8'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1014617504786</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Proposed</action>
> > >         <comment xsi:type='xsd:string'>clearing house</comment>
> > >       </item>
> > >       <item id='id9'
> > >
xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > > xsi:type='ns1:Action'>
> > >         <timestamp xsi:type='xsd:long'>1014617522484</timestamp>
> > >         <caller xsi:type='xsd:string'>system</caller>
> > >         <action xsi:type='xsd:string'>Rejected</action>
> > >         <comment xsi:type='xsd:string'>clearing house</comment>
> > >       </item>
> > >     </history>
> > >     <workflowState xsi:type='xsd:string'>Rejected</workflowState>
> > >     <summary xsi:type='xsd:string'>wedsad</summary>
> > >     <content xsi:type='xsd:string'><!--<fourohfour:AutoFormat
> > isActive="true"
> > > />-->asdasd</content>
> > >   </value>
> > > </file>
> > >
> > > Specifically: when I create an index with pattern "path", all my query
> > results
> > > vaporize. What am I doing wrong? Is this a bug? How can I index the
"path"
> > > elements correctly?
> > >
> > >
> > > Thanks for any help or advice.
> > >
> > > -maX
> > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > > http://mailplus.yahoo.com
> > >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>


Re: more questions on indexing

Posted by Max Ekstrom <ma...@yahoo.com>.
Do you think this is the issue? Would it explain the odd behavior? I'm using
third-party software to generate my XML (orthogonal persistence using XML
serialization and deserialization), so I don't have much control over the
default namespace.

-maX
--- Jeff Greif <jg...@alumni.princeton.edu> wrote:
> Are you perhaps missing a declaration of the default namespace in the
> document root element, e.g. xmlns="some-namespace"?
> 
> Jeff
> ----- Original Message -----
> From: "Max Ekstrom" <ma...@yahoo.com>
> To: <xi...@xml.apache.org>
> Sent: Thursday, January 02, 2003 10:35 AM
> Subject: more questions on indexing
> 
> 
> > Hi! I've been trying to figure out how to properly index things and it
> seems
> > this newsgroup has varying responses to this question. Since I've
> exhausted my
> > own approaches, I figured I'd drop you all a line.
> >
> > Here is what I observe (on win xp, java 1.3, xindice 1.0):
> > When I create an index, my queries stop returning any results. It doesn't
> > matter whether the index is created before or after adding data. When the
> index
> > is deleted, the query begins operating normally again.
> >
> > Here's an example of one of my documents:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <file xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> > xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> > xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' version='1'
> > lastModified='Sun Feb 24 22:12:02 PST 2002'>
> >   <value id='id0'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Feature'>
> >     <uid xsi:type='xsd:string'>DUMMY</uid>
> >     <id id='id1' xsi:type='ns1:ID'>
> >       <path xsi:type='xsd:string'>/mmmm</path>
> >     </id>
> >     <title xsi:type='xsd:string'>mmmm</title>
> >     <isActive xsi:type='xsd:boolean'>true</isActive>
> >     <history id='id2'
> xmlns:ns1='http://www.themindelectric.com/collections/'
> > xsi:type='ns1:vector'>
> >       <item id='id3'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1002740612513</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>CREATED</action>
> >       </item>
> >       <item id='id4'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1002740652871</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Proposed</action>
> >         <comment xsi:type='xsd:string'>sdsdsd</comment>
> >       </item>
> >       <item id='id5'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1014617381984</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Rejected</action>
> >         <comment xsi:type='xsd:string'>asdfas</comment>
> >       </item>
> >       <item id='id6'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1014617476407</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Proposed</action>
> >         <comment xsi:type='xsd:string'>love me</comment>
> >       </item>
> >       <item id='id7'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1014617487958</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Rejected</action>
> >         <comment xsi:type='xsd:string'>clearing house</comment>
> >       </item>
> >       <item id='id8'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1014617504786</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Proposed</action>
> >         <comment xsi:type='xsd:string'>clearing house</comment>
> >       </item>
> >       <item id='id9'
> > xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> > xsi:type='ns1:Action'>
> >         <timestamp xsi:type='xsd:long'>1014617522484</timestamp>
> >         <caller xsi:type='xsd:string'>system</caller>
> >         <action xsi:type='xsd:string'>Rejected</action>
> >         <comment xsi:type='xsd:string'>clearing house</comment>
> >       </item>
> >     </history>
> >     <workflowState xsi:type='xsd:string'>Rejected</workflowState>
> >     <summary xsi:type='xsd:string'>wedsad</summary>
> >     <content xsi:type='xsd:string'><!--<fourohfour:AutoFormat
> isActive="true"
> > />-->asdasd</content>
> >   </value>
> > </file>
> >
> > Specifically: when I create an index with pattern "path", all my query
> results
> > vaporize. What am I doing wrong? Is this a bug? How can I index the "path"
> > elements correctly?
> >
> >
> > Thanks for any help or advice.
> >
> > -maX
> >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: more questions on indexing

Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Are you perhaps missing a declaration of the default namespace in the
document root element, e.g. xmlns="some-namespace"?

Jeff
----- Original Message -----
From: "Max Ekstrom" <ma...@yahoo.com>
To: <xi...@xml.apache.org>
Sent: Thursday, January 02, 2003 10:35 AM
Subject: more questions on indexing


> Hi! I've been trying to figure out how to properly index things and it
seems
> this newsgroup has varying responses to this question. Since I've
exhausted my
> own approaches, I figured I'd drop you all a line.
>
> Here is what I observe (on win xp, java 1.3, xindice 1.0):
> When I create an index, my queries stop returning any results. It doesn't
> matter whether the index is created before or after adding data. When the
index
> is deleted, the query begins operating normally again.
>
> Here's an example of one of my documents:
>
> <?xml version='1.0' encoding='UTF-8'?>
> <file xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' version='1'
> lastModified='Sun Feb 24 22:12:02 PST 2002'>
>   <value id='id0'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Feature'>
>     <uid xsi:type='xsd:string'>DUMMY</uid>
>     <id id='id1' xsi:type='ns1:ID'>
>       <path xsi:type='xsd:string'>/mmmm</path>
>     </id>
>     <title xsi:type='xsd:string'>mmmm</title>
>     <isActive xsi:type='xsd:boolean'>true</isActive>
>     <history id='id2'
xmlns:ns1='http://www.themindelectric.com/collections/'
> xsi:type='ns1:vector'>
>       <item id='id3'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1002740612513</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>CREATED</action>
>       </item>
>       <item id='id4'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1002740652871</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Proposed</action>
>         <comment xsi:type='xsd:string'>sdsdsd</comment>
>       </item>
>       <item id='id5'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1014617381984</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Rejected</action>
>         <comment xsi:type='xsd:string'>asdfas</comment>
>       </item>
>       <item id='id6'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1014617476407</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Proposed</action>
>         <comment xsi:type='xsd:string'>love me</comment>
>       </item>
>       <item id='id7'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1014617487958</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Rejected</action>
>         <comment xsi:type='xsd:string'>clearing house</comment>
>       </item>
>       <item id='id8'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1014617504786</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Proposed</action>
>         <comment xsi:type='xsd:string'>clearing house</comment>
>       </item>
>       <item id='id9'
> xmlns:ns1='http://www.themindelectric.com/package/com.fourohfour.service/'
> xsi:type='ns1:Action'>
>         <timestamp xsi:type='xsd:long'>1014617522484</timestamp>
>         <caller xsi:type='xsd:string'>system</caller>
>         <action xsi:type='xsd:string'>Rejected</action>
>         <comment xsi:type='xsd:string'>clearing house</comment>
>       </item>
>     </history>
>     <workflowState xsi:type='xsd:string'>Rejected</workflowState>
>     <summary xsi:type='xsd:string'>wedsad</summary>
>     <content xsi:type='xsd:string'><!--<fourohfour:AutoFormat
isActive="true"
> />-->asdasd</content>
>   </value>
> </file>
>
> Specifically: when I create an index with pattern "path", all my query
results
> vaporize. What am I doing wrong? Is this a bug? How can I index the "path"
> elements correctly?
>
>
> Thanks for any help or advice.
>
> -maX
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>