On Dec 01, 2004, at 20:43, Erik Hatcher wrote:

Sure, I could put it all together as a space separated String and use the WhitespaceAnalyzer, but why not do it this way? What other suggestions do you have for doing this?

If this works for you, I don't see any problem with it.

In general, I avoid storing any raw data in a Lucene Document. And only uses Lucene for, er, indexing... but this is just me :)

But lets go back to that fabled Map interface for Document... if the purpose of such interface is to keep thing simple it could behave just like Document.get() [1]:

"Returns the string value of the field with the given name if any exist in this document, or null. If multiple fields exist with this name, this method returns the first value added."

If for some reason(s) you need multiple values per field, stick with getFields()...

What's wrong with that?

PA.

[1] http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/document/ Document.html#get(java.lang.String)


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



Reply via email to