lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject RE: Property comparison possible??
Date Fri, 09 Jun 2006 07:00:17 GMT
: 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, you're
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 apply
just the right amount of pressure -- but it's certainly not what it was
intended for)


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message