On Thu, 07 Aug 2003 18:58:48 +0100, Darragh Murphy wrote:

> Hi all.
> 
> I've been having quite a bit of trouble with indexes in Xindice 1.1b. I
> create one index each on 10 different collections using the following
> code.
> There are about 1000 items in eaach collection.
> 
>                     AddIndexer ai = new AddIndexer();
>                     Hashtable h = new Hashtable();
>                     h.put("collection", "xmldb:xindice-embed:///db/" +
> type);
>                     h.put("nameOf", type + "Index");
>                     h.put("pattern", "Name");
>                     h.put("verbose", "true");
>                     h.put("type", "string");
>                     try
>                     {
>                         success = ai.execute(h);
>                     }
>                     catch (Throwable e)
>                     {
>                         e.printStackTrace();
>                         System.out.println(e.getMessage());
>                     }
>                     System.out.println(success);
> 
> This seems to work. I get the following reply for the creation of each
> index.
> 
> true
> Index node element =  <?xml version="1.0"?> <index
>       class="org.apache.xindice.core.indexer.ValueIndexer"
>       name="qmmVersionGeneralObjectIndex"
>       pattern="Name"
>       type="string"
> />
> 
> However, if I run a series of queries against the xml database some items
> which would be
> returned if I don't use indexes are not returned. I cannot seem to find
> any pattern to this problem.
> 
> One possible reason might me that the values being indexed contain '_'
> underscore's i.e. .  "mn_qa_author"
> Another is that the database needs time to complete the indexes before you
> can run queries against it.

This "shouldn't" have an effect. Are you using namespaces? What JVM are
you running (there have been reports of people moving from 1.4.0 to 1.4.2
and indexes not working any longer)? 

I'm in the process of creating unit tests for the indexing infrastructure
so keep and eye on bugzilla :).

-k.

Reply via email to