lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject multiple instances of fields or attributes
Date Sun, 03 Feb 2008 21:14:37 GMT

I am totally new to Lucene, and currently investigating the usage of
Lucene for a new development project. In fact, for evaluation I am using
the C port of Lucene, through the Perl "Lucene" module.  I believe my
question is generic, but please tell me if it is otherwise.
(Please adapt this question to the Java environment if needed, want I
want to know is the fundamentals of Lucene)

In perl, to add items to the Lucene index, I do sonething like
my $doc = new Lucene::document;
and that works fine.

Now my question is : can I have seperate "instances" of the field
'author' in the same document, like
'author' = 'Einstein, Albert'
'author' = 'Newton, Isaac'
'author' = 'Freud, Sigmund'

Could I just do several times
and would Lucene index separate "instances" of this field for the same
document ?

The reason being that I would like to search something like "Einstein
Albert"~1  (adjacent), but without finding another document which would
have a concatenated field like "Thomas, Albert; Einstein, Joseph".
(The same case occurs for instance for a field "keywords".)

Does this question make sense with Lucene ?
If the above is not possible, then is this type of case usually handled
otherwise in Lucene, and how ?

Thank you in advance,

View raw message