lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wenhao Xu <xuwenhao2...@gmail.com>
Subject Could one filed include more than one value?
Date Tue, 10 Nov 2009 08:44:16 GMT
Hi, guys,
     I have such a problem:
     I have lots of files. In these files, two of them are related to each
other and should be deemed as a whole (There is a map file to map them
together). So they are somewhat like a set of pairs of files: <f11, f12>,
<f21, f22> , <f31, f32> ... . For a keyword search, the result should also
be like <fi1, fi2>,....  Their score should be computed together.

    As far as I know, I could use "doc.add(new Field("field1", new
FileReader(f11)));", and "doc.add(new Field("field2", new FileReader(f12)))"
for each file respectively.  But in this way, when searching, these two
fields (field1 and field2) can not be searched together in a single search.
As I said, these two files should be deemed as a whole and returned
together. So I am wondering, could I map one filed to more than one value,
    somewhat like doc.add(new Field("field", new FileReader(f11), new
FileReader(f12));

   Is there some way to do this? Or could you give me some suggestions how
to solve this problem?

Thanks,
W.

-- 
~_~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message