There is a related feature that is called payloads for terms. In
Elasticsearch you can assign payload to terms, e.g. numbers for custom
scoring.

See also

https://github.com/elasticsearch/elasticsearch/issues/3772
https://github.com/elasticsearch/elasticsearch/pull/4161

It uses DelimitedPayloadTokenFilter

http://lucene.apache.org/core/4_7_0/analyzers-common/org/apache/lucene/analysis/payloads/DelimitedPayloadTokenFilter.html

Jörg



On Wed, Apr 30, 2014 at 1:06 PM, Neeraj Makam <[email protected]> wrote:

> Hi
>
> Given a text,say "hello elastic search world",
> is there a way i can associate a field or some metadata per word in the
> text on which i can later query?
> for eg: give code number to each word, and should be able to search like
> text = "hello" AND code = "25"
> i.e return all "hello" words which have 25 in their code metadata.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elasticsearch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/f5f40059-e9e7-4a05-93f8-aacdff26abb0%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/f5f40059-e9e7-4a05-93f8-aacdff26abb0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEV56vGmxgKceY5dcSkEsJwEwrmtVXona-MH298YOExnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to