Hi All
I am indexing a document like this...
Document doc = new Document();
doc.add(Field.Text("contents", new FileReader(f)));
doc.add(Field.Text("filename",f.getCanonicalPath()));
Iterator it = fields.keySet().iterator();
String element = "";
while (it.hasNext()) {
elemen
Right, Just add it twice, your document will be linked to the two categories.
Chris Lu
Free-Text Search on Any Database
http://www.dbsight.net
On 7/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I need to index multiple values to a single document field, such as
> category. An entry ca
I need to index multiple values to a single document field, such as
category. An entry can be associated with 2 or more categories. When the
search is performed, the user can opt to select result from documents
containing only one category value. What would be the best way to go
about this?
D
Never mind. I need to read the API more closely.
RAMDirectory(directory) is built into lucene and already does the trick
with just one line of code.
[EMAIL PROTECTED] wrote:
I was reading the Lucene book and came across the part where the author
detailed how to write index to ram dir and then