[英]How to add metadata to a lucene field
During indexing of documents, I need to store some metadata to fields. 在对文档建立索引期间,我需要将一些元数据存储到字段中。
For example: 例如:
new Field("myField", "myValue", ...)
to the document new Field("myField", "myValue", ...)
到文档中 myField
will return a list of all indexed values supplemented with that metadata. myField
所有值将返回以该元数据为补充的所有索引值的列表。 Is this possible at all? 这有可能吗? (May be I should better use some kind of database, but I have to use Lucene.)
(也许我应该更好地使用某种数据库,但是我必须使用Lucene。)
Thanks in advance 提前致谢
Concrete Example: 具体示例:
I have SVG-documents (XML) 我有SVG文档(XML)
Any of that documents gets fields of type "component" with the values "X35"
, "Z89"
and many more 该文档中的任何一个都将获得类型为“ component”的字段,其值分别为
"X35"
, "Z89"
等
I need to store some metadata to "X35"
, "Z89"
and other: 我需要将一些元数据存储到
"X35"
, "Z89"
和其他:
X35 => description="My X35 component", sizeX=10, sizeY=20<br>
Z89 => description="Z89 part", usage_note="...."<br>
and so on 等等
After doing some further research, I think, that it is not possible at all. 经过进一步的研究,我认为根本不可能。 I really should use a RDBMS ... ;)
我真的应该使用RDBMS ...;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.