(Manually) reordering search results

Hi

I'm looking for a way to force specific selected documents to rank first
for a given query.

Is there a simple way to do this?

If not, what is the best complicated approach to take?

It seems like it might be possible to do this using native script fields.
I'm very new to Elasticsearch, and I don't completely understand script
fields - if you have a script field doesn't it mean that script has to be
executed for every single document in the index for every query? That
doesn't seem very performant for anything but the smallest index. What am I
missing there?

Nick

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

If you know the documents ids, you can have a bool query with one of the
clauses being a term query on that document id with a very high boost.

Have you looked into the rescore functionality? You can limit the scoring
on only the top n documents.

--
Ivan

On Mon, Sep 23, 2013 at 10:24 PM, Nick Lothian nick.lothian@gmail.comwrote:

Hi

I'm looking for a way to force specific selected documents to rank first
for a given query.

Is there a simple way to do this?

If not, what is the best complicated approach to take?

It seems like it might be possible to do this using native script fields.
I'm very new to Elasticsearch, and I don't completely understand script
fields - if you have a script field doesn't it mean that script has to be
executed for every single document in the index for every query? That
doesn't seem very performant for anything but the smallest index. What am I
missing there?

Nick

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