lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: question about field equality in query
Date Thu, 19 Apr 2007 21:43:56 GMT

: > Thank you for your reply, your solution doesnt work in my case because I
: > was thinking of indexing more than one document in a single index and each
: > document representing a table in database. so if I put more than one
: > document some fields for a single document will be empty. something like
: > this:
: >
: > Document:
: > field1             field2                field3          field4
: > test1             test2                 test3              --
: > --                  --                       test5          test3

i'm not udnerstanding your problem ... not every document needs to have
the same fields, and not every field of every document needs to have hte
same number of values.  you cna have a field falled field3_equal_field4
and only use it for hte documnts where it's true, and then it's easy to
query on ... you can do this for every permutation of fields you've got
and as long s you omitNorms on these ields, it won't "cost" much for your
index.  (althought i would suggest instead a sime "fields_have_same_value"
field where the tokens are "field3_field4" just for simplicity)


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

View raw message