lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Haycock" <>
Subject RE: Property comparison possible??
Date Fri, 09 Jun 2006 08:13:32 GMT
He he, nice comparison!

Cheers for the advice.


-----Original Message-----
From: Chris Hostetter [] 
Sent: 09 June 2006 08:00
Subject: RE: Property comparison possible??

: Is it possible to perform a search using fields instead of terms, eg.
: like this sql:

: SELECT col1, col2
: FROM table1
: WHERE col1 = col2

presumably "col1" and "col2" are untokenized fields? (otherwise equality
is kind of vague)

if you really wanted to add a constraint like this to an existing lucene
query, you could impliment it by walking the FieldCaches for the two
fields in parallel and recording any doc whose value is the same in each
-- but if this is a piece of information you expect to want a lot,
better of just testing this type of information when you index your doc,
and add it as a seperate field.

(i won't say this problem is a screw, and Lucene is a hammer; but this
problem is a phillips head screw, and Lucene is a tiny flat screwdriver
that just happens to fit in the philips head and can turn it if you
just the right amount of pressure -- but it's certainly not what it was
intended for)


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message