Boost the first word in a multi-word query


(Jeremy-3) #1

In case of a multi-word query, is there a way to boost the first terms of
the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for "brown
dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put weight
accordingly the number of words.

Regards,
Jeremy

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(vineeth mohan-2) #2

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first terms of
the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for "brown
dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put weight
accordingly the number of words.

Regards,
Jeremy

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Jeremy-3) #3

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to keep
words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first terms of
the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for "brown
dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put weight
accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(vineeth mohan-2) #4

Hello Jeremy ,

You can try query_string then.

Query as "Brown^2 dog"

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query

Thanks
Vineeth

On Sat, Aug 23, 2014 at 12:11 AM, Jérémy merejy@gmail.com wrote:

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to keep
words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first terms
of the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for "brown
dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put
weight accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Jeremy-3) #5

Thanks Vineeth, I can certainly build something with the query string :slight_smile:

On Fri, Aug 22, 2014 at 8:50 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

You can try query_string then.

Query as "Brown^2 dog"

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query

Thanks
Vineeth

On Sat, Aug 23, 2014 at 12:11 AM, Jérémy merejy@gmail.com wrote:

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to
keep words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan <vm.vineethmohan@gmail.com

wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first terms
of the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for
"brown dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put
weight accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(vineeth mohan-2) #6

Hello Jeremy ,

Just a word of caution.
Its not reccomonded to expose query_string to end user.
Rather another version of it used instead -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

Thanks
Vineeth

On Mon, Aug 25, 2014 at 12:57 AM, Jérémy merejy@gmail.com wrote:

Thanks Vineeth, I can certainly build something with the query string :slight_smile:

On Fri, Aug 22, 2014 at 8:50 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

You can try query_string then.

Query as "Brown^2 dog"

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query

Thanks
Vineeth

On Sat, Aug 23, 2014 at 12:11 AM, Jérémy merejy@gmail.com wrote:

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to
keep words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan <
vm.vineethmohan@gmail.com> wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first terms
of the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for
"brown dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put
weight accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m%3D6T04KLCNCwKOy1bNiurZsFfNy4x-U%3DTKfd%2BebHmSsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Jeremy-3) #7

Thank you so much for the warning, I was about to make that mistake :wink:

On Mon, Aug 25, 2014 at 5:23 AM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

Just a word of caution.
Its not reccomonded to expose query_string to end user.
Rather another version of it used instead -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

Thanks
Vineeth

On Mon, Aug 25, 2014 at 12:57 AM, Jérémy merejy@gmail.com wrote:

Thanks Vineeth, I can certainly build something with the query string :slight_smile:

On Fri, Aug 22, 2014 at 8:50 PM, vineeth mohan <vm.vineethmohan@gmail.com

wrote:

Hello Jeremy ,

You can try query_string then.

Query as "Brown^2 dog"

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query

Thanks
Vineeth

On Sat, Aug 23, 2014 at 12:11 AM, Jérémy merejy@gmail.com wrote:

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to
keep words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan <
vm.vineethmohan@gmail.com> wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first
terms of the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for
"brown dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put
weight accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m%3D6T04KLCNCwKOy1bNiurZsFfNy4x-U%3DTKfd%2BebHmSsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m%3D6T04KLCNCwKOy1bNiurZsFfNy4x-U%3DTKfd%2BebHmSsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGNSLEyCC6YMUyx_o8nRLDhmaRfFH%3DcvK5_wQG874CpcaGHgpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Jeremy-3) #8

Hum I didn't notice the change of behavior of the + sign. I prefer the how
"query string" handle that.

Is there a way to have a "must be present" operator for "simple string
query"?

Cheers,
Jeremy

On Mon, Aug 25, 2014 at 9:33 AM, Jérémy merejy@gmail.com wrote:

Thank you so much for the warning, I was about to make that mistake :wink:

On Mon, Aug 25, 2014 at 5:23 AM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

Hello Jeremy ,

Just a word of caution.
Its not reccomonded to expose query_string to end user.
Rather another version of it used instead -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

Thanks
Vineeth

On Mon, Aug 25, 2014 at 12:57 AM, Jérémy merejy@gmail.com wrote:

Thanks Vineeth, I can certainly build something with the query string :slight_smile:

On Fri, Aug 22, 2014 at 8:50 PM, vineeth mohan <
vm.vineethmohan@gmail.com> wrote:

Hello Jeremy ,

You can try query_string then.

Query as "Brown^2 dog"

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-dsl-query-string-query

Thanks
Vineeth

On Sat, Aug 23, 2014 at 12:11 AM, Jérémy merejy@gmail.com wrote:

Thanks for your answer!

Unfortunately the phrase query is not enough, because I still want to
keep words optional. In my understanding, the phrase query requires all the
words of the query to be present.

Cheers,
Jeremy

On Fri, Aug 22, 2014 at 8:20 PM, vineeth mohan <
vm.vineethmohan@gmail.com> wrote:

Hello Jeremy ,

I feel what you are looking for is a phrase query . It takes into
consideration the order of words -
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html#_phrase

Thanks
Vineeth

On Fri, Aug 22, 2014 at 3:28 PM, Jeremy merejy@gmail.com wrote:

In case of a multi-word query, is there a way to boost the first
terms of the query?

For example, in the following query:
GET /my_index/my_type/_search
{
"query": {
"match": {
"title": "BROWN DOG!"
}
}
}

"Brown" should be prioritized over "dog", therefore searching for
"brown dog" will not return the same scores as searching for "dog brown".
I'm ideally looking for a solution which work with N words and put
weight accordingly the number of words.

Regards,
Jeremy

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/a53f5752-3da0-41de-b970-f84573b8f5a3%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 a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3D51EiC_SmiDXD0k2Yj0YacnvXVzaqUOshdkD81HFpgsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwjxRwLgfHAmNWxoGa0BX5ZSEtk6J0QFBvWCBcW8wX42Q%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k5M8vasScWqjx%2BwHUD%2B-EGof2cLGJGH3YueMKpW0hYFQ%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGNSLEwSTADYKzJo0HsxrLhpTteDYMDT-dkFcDHB8GZSmJ3_MA%40mail.gmail.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 a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ojEtydA4zAw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m%3D6T04KLCNCwKOy1bNiurZsFfNy4x-U%3DTKfd%2BebHmSsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5m%3D6T04KLCNCwKOy1bNiurZsFfNy4x-U%3DTKfd%2BebHmSsA%40mail.gmail.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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGNSLExep7RDde5KpDdv3emm3xs2p9%2B3QDtfxRE9agZM%2Boi1Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #9