db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <tdudg...@informaticsmatters.com>
Subject Re: Indexing and searching complex data types
Date Sun, 20 Mar 2011 16:08:07 GMT
On 20/03/2011 15:38, Bryan Pendleton wrote:
> Perhaps the Derby generated columns feature would be of help.
>
> You could write some code that would generate the search values
> by processing your blob of data, then build an index on the
> generated search terms.

Hi Bryan, thanks for the response.
That would be a solution to one aspect, but I'm not sure it helps me 
search as the search would not be simple "select ... from ... where ..." 
query using the generated columns, as Java code is also needed as part 
of the search algorithm.
The oracle cartridge based solution is to allow a function to be defined 
that can be used in the where part of the expression. Something like this:

select ... from .. where my_search_op(indexed_col, criteria ...) = 1

The my_search_op() function performs the search (using the generated 
custom index) and in effect works out which rows match (returned value 
or 1) and which rows don't match (returned value of 0).

I'm imagining this is a very non-standard need and probably not 
possible. But I can hope.

Tim


Mime
View raw message