Search based on relative position

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to exactly
come next to each other , any other order is considered as false result.
Is this possible using elasticsearch ?

Thanks
Vineeth

--
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 can use any query that supports the slop parameter. The span queries
will give you more control over the exact positioning. A slop of zero means
exact phrase matching.

Cheers,

Ivan

On Wed, Aug 28, 2013 at 9:29 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to
exactly come next to each other , any other order is considered as false
result.
Is this possible using elasticsearch ?

Thanks
Vineeth

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

Its called a phrase query.

On Wed, Aug 28, 2013 at 9:29 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to
exactly come next to each other , any other order is considered as false
result.
Is this possible using elasticsearch ?

Thanks
Vineeth

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

Thanks all.

That really helped

On Wed, Aug 28, 2013 at 10:06 PM, Randall McRee randall.mcree@gmail.comwrote:

Its called a phrase query.
Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Aug 28, 2013 at 9:29 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to
exactly come next to each other , any other order is considered as false
result.
Is this possible using elasticsearch ?

Thanks
Vineeth

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

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

One more question.

Is it possible to tell the relative position between the tokens.
Like

Is (TOKEN)[0-3] going home

Here "home" should be immediately followed by going but there can be
maximum of 3 tokens between is and going.

On Wed, Aug 28, 2013 at 10:08 PM, Ban Mido banmidobeyondtime@gmail.comwrote:

Thanks all.

That really helped

On Wed, Aug 28, 2013 at 10:06 PM, Randall McRee randall.mcree@gmail.comwrote:

Its called a phrase query.
Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Aug 28, 2013 at 9:29 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to
exactly come next to each other , any other order is considered as false
result.
Is this possible using elasticsearch ?

Thanks
Vineeth

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

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

Well, that is what "slop" is in that documentation you were pointed to.

Note that "is" can be a stopword, By definition, stopwords are not in the
index. So be careful that you understand how your analyzer is actually
indexing what you are giving it.

Spend some time understanding the query explanation that (optionally) comes
back from each hit.

On Wed, Aug 28, 2013 at 9:43 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

One more question.

Is it possible to tell the relative position between the tokens.
Like

Is (TOKEN)[0-3] going home

Here "home" should be immediately followed by going but there can be
maximum of 3 tokens between is and going.

On Wed, Aug 28, 2013 at 10:08 PM, Ban Mido banmidobeyondtime@gmail.comwrote:

Thanks all.

That really helped

On Wed, Aug 28, 2013 at 10:06 PM, Randall McRee randall.mcree@gmail.comwrote:

Its called a phrase query.
Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Aug 28, 2013 at 9:29 AM, Ban Mido banmidobeyondtime@gmail.comwrote:

Hi ,

Is it possible to search giving the relative position of keywords.

Like , i want to search for "Indian health" . I want these terms to
exactly come next to each other , any other order is considered as false
result.
Is this possible using elasticsearch ?

Thanks
Vineeth

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

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