How to add document metadata?


(TheOutlander-2) #1

I want to associate metadata with a document after it has been inserted.
What is the ideal way to do this?

I saw the recent feature about updating elements in a document, but that
will re-index the entire document. Is that what I should be using? I was
thinking of adding elements like document.metadata.var1,
document.metadata.var2, etc.

Thanks,
Nick

--


(David Pilato) #2

IMHO, get your document from ES and add metadata, then push it again to ES.
(So yes, reindex it all)

My 2 cents

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 oct. 2012 à 00:40, TheOutlander theoutlander@gmail.com a écrit :

I want to associate metadata with a document after it has been inserted. What is the ideal way to do this?

I saw the recent feature about updating elements in a document, but that will re-index the entire document. Is that what I should be using? I was thinking of adding elements like document.metadata.var1, document.metadata.var2, etc.

Thanks,
Nick

--


(TheOutlander-2) #3

Almost forgot I had asked this question. Thanks for the answer. I'm
thinking of using the update document call that was recently released.
However, someone mentioned that Lucene supports an add field call which in
essence is add metadata.

Thanks,
Nick

On Tuesday, October 9, 2012 10:36:42 PM UTC-7, David Pilato wrote:

IMHO, get your document from ES and add metadata, then push it again to ES.
(So yes, reindex it all)

My 2 cents

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 10 oct. 2012 à 00:40, TheOutlander <theout...@gmail.com <javascript:>>
a écrit :

I want to associate metadata with a document after it has been inserted.
What is the ideal way to do this?

I saw the recent feature about updating elements in a document, but that
will re-index the entire document. Is that what I should be using? I was
thinking of adding elements like document.metadata.var1,
document.metadata.var2, etc.

Thanks,
Nick

--

--


(system) #4