Hi Tod,

Lucene doesn't know anything you don't tell it about your documents/ metadata. You would need to create fields for the metadata for a document and then index them. You could just do something like a document with fields:
text
author
createDate
...

These all can be "separate" when it comes to searching by creating the appropriate query against the fields.

So, I think the answer to your questions is yes, there is a way to query documents for metadata, but it isn't any different from querying anything else. After all, Lucene has no clue what a word document is to begin with anyway.


-Grant

On May 20, 2008, at 1:35 PM, Tod wrote:

I have a couple of quick questions about how Lucene indexes metadata:

- Does it do anything special with metadata or treat it as a supplement to the words in the document?

I have a feeling that the answer is that out of the box lucene does nothing special with metadata and that its treated just like any other regular words in the document. It would be up to the developer to design in its special treatment.

- If a particular document contains metadata is there a way after the indexing process to query a specific document to determine what metadata was indexed for it?

Simple example, I have a word document that has a specific title and a number of other properties. Once that document is indexed I'd like to be able to call a method that would identify all of the properties Lucene indexed from the document, completely separate from the document's actual content.


Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to