Highlighting across different indices


(Bibin Abraham) #1

Say I have two indices:
facebook > post > user , message
twitter > post > user , message

Now I search across these two indices. How can I highlight words from
twitter>post>message alone and not facebook>post>message

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Bibin Abraham) #2

Will multi-search solve the above issue?

On Friday, 20 September 2013 19:03:56 UTC+5:30, bin wrote:

Say I have two indices:
facebook > post > user , message
twitter > post > user , message

Now I search across these two indices. How can I highlight words from
twitter>post>message alone and not facebook>post>message

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Adrien Grand) #3

Hi,

On Mon, Sep 23, 2013 at 8:29 AM, bin bibin.abraham.dev@gmail.com wrote:

Will multi-search solve the above issue?

Multi-search would indeed allow for not highlighting twitter messages, but
the result sets will be disjoint. Multi-search is just a convenient way to
run several search requests in a single HTTP request.

On Friday, 20 September 2013 19:03:56 UTC+5:30, bin wrote:

Say I have two indices:
facebook > post > user , message
twitter > post > user , message

Now I search across these two indices. How can I highlight words from
twitter>post>message alone and not facebook>post>message

This is not a common requirement. I guess the only way to do so would be to
have different field names for the messages on your facebook and twitter
indices. But this would also make your query more complicated...

--
Adrien Grand

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Bibin Abraham) #4

Thanks Adrien for your help. Our app has ~10 entities. I thought of adding
each entity as an index with its sub-entities as its types rather than app
as an index. And further using organization_id as a routing value across
all indices. Since some entities are having common fields like name,
date,.., I needed more control over the highlighting fields. That is the
reason I asked for this question. Thanks once again.

On Monday, 23 September 2013 20:58:19 UTC+5:30, Adrien Grand wrote:

Hi,

On Mon, Sep 23, 2013 at 8:29 AM, bin <bibin.ab...@gmail.com <javascript:>>wrote:

Will multi-search solve the above issue?

Multi-search would indeed allow for not highlighting twitter messages, but
the result sets will be disjoint. Multi-search is just a convenient way to
run several search requests in a single HTTP request.

On Friday, 20 September 2013 19:03:56 UTC+5:30, bin wrote:

Say I have two indices:
facebook > post > user , message
twitter > post > user , message

Now I search across these two indices. How can I highlight words from
twitter>post>message alone and not facebook>post>message

This is not a common requirement. I guess the only way to do so would be
to have different field names for the messages on your facebook and twitter
indices. But this would also make your query more complicated...

--
Adrien Grand

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #5