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 François Rüf <f....@netbreeze.ch> on 2003/11/06 16:16:47 UTC

Indexing with -t option ?

I have a collection with about 70'000 documents loaded.

I used the index command to add an index for a long value:

xindiceadmin add_indexer -c /db/netobjects/netpage -n netpage_index_date -p
date -t long

I store a Java Long Value in the date element.

Now if I'am trying to run a query against the collection with the xpath:

/netpage[date>100]

I receive no documents!

If I run a query against the collection with the xpath:

/netpage[date>VALUE] where the VALUE is near some dates in the DB
(difference about 2 mio millisecondes) - I receive a result - but its wrong.

If I index the collection without the "-t long" option it seems to work.

Does anyone have an idea, what could be wrong?

I saw the Bug #19203 in the bug-database - Is this my problem? If yes - I
did not understand the described solution. It would be very helpfull if
somebody could explain me this solution.

Thanks a lot for infos about this issue.

best regards

Frangois


Re: Indexing with -t option ?

Posted by Terry Rosenbaum <Te...@amicas.com>.
Bug 19203 is likely the cause of your problem.

The code change mentioned in the bug applies to Value.java
(org.apache.xindice.core.data package).

You can fix the behavior for positive integers by applying the
change to Value.java and rebuilding.

Or, you can go the whole way and figure out how to properly
represent Values in the DB to eliminate this problem and submit your
patches by attaching them to the bug in bugzilla.

Or, you may be able to make a string type index work by properly encoding
your numbers as strings.

-Terry

François Rüf wrote:

>I have a collection with about 70'000 documents loaded.
>
>I used the index command to add an index for a long value:
>
>xindiceadmin add_indexer -c /db/netobjects/netpage -n netpage_index_date -p
>date -t long
>
>I store a Java Long Value in the date element.
>
>Now if I'am trying to run a query against the collection with the xpath:
>
>/netpage[date>100]
>
>I receive no documents!
>
>If I run a query against the collection with the xpath:
>
>/netpage[date>VALUE] where the VALUE is near some dates in the DB
>(difference about 2 mio millisecondes) - I receive a result - but its wrong.
>
>If I index the collection without the "-t long" option it seems to work.
>
>Does anyone have an idea, what could be wrong?
>
>I saw the Bug #19203 in the bug-database - Is this my problem? If yes - I
>did not understand the described solution. It would be very helpfull if
>somebody could explain me this solution.
>
>Thanks a lot for infos about this issue.
>
>best regards
>
>Frangois
>
>  
>