Return fragment when no query defined

Hi,

iam looking for solution to get fragment returned by ES (so solution same
as highlight delivers) but i define query as match_all.

Any idea how to get it?
Thx in advance.

Milosz

--
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.

Hello!

Could you be more specific what you would like to get from ElasticSearch ? In case of match_all query, you are basically saying, that you are interested in all the documents and not any particular data.

--

Regards,

Rafał Kuć

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

Hi,

iam looking for solution to get fragment returned by ES (so solution same as highlight delivers) but i define query as match_all.

Any idea how to get it?

Thx in advance.

Milosz

--

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.

Hi,

i search in field 'description' with term X (set up 100 chars highlight).
In no search query X is defined i would like to get same lenght (fragment)
of description returned instead of full description.

On Sunday, March 10, 2013 10:21:32 PM UTC+1, Rafał Kuć wrote:

Hello!

Could you be more specific what you would like to get from ElasticSearch ?
In case of match_all query, you are basically saying, that you are
interested in all the documents and not any particular data.

*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

Hi,

iam looking for solution to get fragment returned by ES (so solution same
as highlight delivers) but i define query as match_all.

Any idea how to get it?
Thx in advance.

Milosz

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

--
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.

Hi

there are couple of options you can try.

a) if you did not disable _source field then you can get the whole field
content from it, for example you could use fields [1]
b) If your 'description' field is too long and you need to make it shorter
then you can either post-process it at the client side or try to use script
field [2]

What we do is that for each document we have a 'description' field that is
used in similar use case (i.e. query does not match any of fields that are
used to produce highlights). When users push documents into the search
server they can setup the 'description' field and they know that this value
will be used (i.e. displayed) if no highlights are created. So it is
something like a pitch field :slight_smile: and we get this field using 'fields' [1]
while the 'description' field is stored.

Regards,
Lukas

[1] http://www.elasticsearch.org/guide/reference/api/search/fields.html(not
that if _source is not enabled then you need to store particular
fields that you want to return)
[2]
http://www.elasticsearch.org/guide/reference/api/search/script-fields.html

On Sun, Mar 10, 2013 at 11:17 PM, milosz skurowski skurowski@gmail.comwrote:

Hi,

i search in field 'description' with term X (set up 100 chars highlight).
In no search query X is defined i would like to get same lenght (fragment)
of description returned instead of full description.

On Sunday, March 10, 2013 10:21:32 PM UTC+1, Rafał Kuć wrote:

Hello!

Could you be more specific what you would like to get from ElasticSearch
? In case of match_all query, you are basically saying, that you are
interested in all the documents and not any particular data.

*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
ElasticSearch

Hi,

iam looking for solution to get fragment returned by ES (so solution same
as highlight delivers) but i define query as match_all.

Any idea how to get it?
Thx in advance.

Milosz

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 elasticsearc...@**googlegroups.com.
For more options, visit https://groups.google.**com/groups/opt_outhttps://groups.google.com/groups/opt_out
.

--
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.

--
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.